Skip to content

Commit

Permalink
Merge pull request #64 from OpenPEPPOL/2020-Spring-Fix02
Browse files Browse the repository at this point in the history
Update PEPPOL-EN16931-UBL.sch
  • Loading branch information
jerouris authored Jun 30, 2020
2 parents 8e6b30f + d95f1ba commit 9f74863
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rules/sch/PEPPOL-EN16931-UBL.sch
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ This schematron uses business terms defined the CEN/EN16931-1 and is reproduced
<let name="UNCL5189" value="tokenize('41 42 60 62 63 64 65 66 67 68 70 71 88 95 100 102 103 104 105', '\s')"/>
<let name="UNCL7161" value="tokenize('AA AAA AAC AAD AAE AAF AAH AAI AAS AAT AAV AAY AAZ ABA ABB ABC ABD ABF ABK ABL ABN ABR ABS ABT ABU ACF ACG ACH ACI ACJ ACK ACL ACM ACS ADC ADE ADJ ADK ADL ADM ADN ADO ADP ADQ ADR ADT ADW ADY ADZ AEA AEB AEC AED AEF AEH AEI AEJ AEK AEL AEM AEN AEO AEP AES AET AEU AEV AEW AEX AEY AEZ AJ AU CA CAB CAD CAE CAF CAI CAJ CAK CAL CAM CAN CAO CAP CAQ CAR CAS CAT CAU CAV CAW CD CG CS CT DAB DAD DL EG EP ER FAA FAB FAC FC FH FI GAA HAA HD HH IAA IAB ID IF IR IS KO L1 LA LAA LAB LF MAE MI ML NAA OA PA PAA PC PL RAB RAC RAD RAF RE RF RH RV SA SAA SAD SAE SAI SG SH SM SU TAB TAC TT TV V1 V2 WH XAA YY ZZZ', '\s')"/>
<let name="UNCL5305" value="tokenize('AE E S Z G O K L M', '\s')"/>
<let name="eaid" value="tokenize('0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0151 0183 0184 0190 0191 0192 0193 0195 0196 0198 0199 0200 0201 0202 0204 9901 9906 9907 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9955 9956 9957 9958', '\s')"/>
<let name="eaid" value="tokenize('0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0151 0183 0184 0190 0191 0192 0193 0195 0196 0198 0199 0200 0201 0202 0204 0208 9901 9906 9907 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9955 9956 9957 9958', '\s')"/>
<rule context="cbc:EmbeddedDocumentBinaryObject[@mimeCode]">
<assert id="PEPPOL-EN16931-CL001" test="
some $code in $MIMECODE
Expand Down
36 changes: 36 additions & 0 deletions rules/unit-UBL-PEPPOL/PEPPOL-COMMON-EAS.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<testSet xmlns="http://difi.no/xsd/vefa/validator/1.0" configuration="peppolbis-en16931-01-3.0-ubl-invoice">
<assert>
<scope>PEPPOL-EN16931-CL008</scope>
</assert>
<test>
<assert>
<description>Check that code 0208, part of EAS and PEPPOL succeeds validation</description>
<success>PEPPOL-EN16931-CL008</success>
</assert>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0208">1234567890</cbc:EndpointID>
</cac:Party>
</cac:AccountingCustomerParty>
</Invoice>
</test>
<test>
<assert>
<description>Check that code 0207, part of EAS and not part of PEPPOL fails validation</description>
<error>PEPPOL-EN16931-CL008</error>
</assert>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cac:AccountingSellerParty>
<cac:Party>
<cbc:EndpointID schemeID="0207">1234567890</cbc:EndpointID>
</cac:Party>
</cac:AccountingSellerParty>
</Invoice>
</test>
</testSet>

0 comments on commit 9f74863

Please sign in to comment.