ConnectingEurope / eInvoicing-EN16931

Validation artefacts for the European eInvoicing standard EN 16931
Other
129 stars 52 forks source link

Review code list validation rules #147

Closed oriol closed 5 years ago

oriol commented 5 years ago

CEF has published the list of code lists here: https://ec.europa.eu/cefdigital/wiki/display/CEFDIGITAL/Code+lists#Codelists-3

Code lists Tab name Version/as published on Usage Changes Remark on updates EN Business Terms
ISO 3166-1 — Country Codes Country 12.3.2019 Full list Yes "AN" is split up into CW, SX and BQ BT-40,BT-55,BT-69,BT-80,BT-159
ISO 4217 — Currency codes Currency 29.8.2018 Full list No  BT-5,BT-6
ISO/IEC 6523 — Identifier scheme code ICD 12.3.2019 Full list Yes codes 0198, 0199 and 0200 added BT-29-1,BT-30-1,BT-46-1,BT-47-1,BT-60-1,BT-61-1,BT-71-1,BT-157-1
UNTDID 1001 — Document type 1001 12.3.2019 Subset No   BT-3
UNTDID 1153 — Reference code qualifier 1153 18a Full list No   BT-18-1,BT-128-1
VAT Identifier VAT ID NA Subset Fixed   BT-31,BT-48,BT-63
VAT Category codeT VAT CAT NA Subset Fixed   BT-95,BT-102,BT-118,BT-151
UNTTCDID 2005/ UNTDID 2475 — Event time code Time NA Subset Fixed   BT-8
UNTDID 4451 — Text subject qualifier Text 18a Full list No   BT-21
UNTDID 4461 — Payment means Payment 18a Full list No   BT-81
UNTDID 5305  — Duty or tax or fee category 5305 NA Subset Fixed   BT-95,BT-102,BT-118,BT-151
UNTDID 5189 — Allowance codes Allowance 12.3.2019 Subset No   BT-98,BT-140
UNTDID 7143 — Item type identification code Item 18a Full list No   BT-158-1
UNTDID 7161 — Charge codes Charge 18a Full list Yes Added CAX,CAY,CAZ,DAC,DAF,DAG,DAH,DAI,DAJ,DAK,DAL,DAM,DAN,DAO,DAP,DAQ BT-105,BT-145
Mime type codes — Mime codes MIME NA Subset Fixed   BT-125-1
CEF EAS — Electronic address scheme identifier EAS 2 Full Yes Added 0198,0199,0200,9901,AN,AQ,AS,AU,EM removed 9902,9904,9905 BT-34-1,BT-49-1
CEF VATEX — VAT exemption reason code VATEX 1 Full Yes New list BT-121
UN/ECE Recommendation N°20 and UN/ECE Recommendation N°21 — Unit codes Unit Rec20r13+Rec21r9 Full lists No  BT-130,BT-150
phax commented 5 years ago

the changes lead to the following error in CII_example5.xml:

[ERROR] 2 failed Schematron assertions for XML file 'C:\dev\git\validation\cii\examples\CII_example5.xml'
[ERROR] [fatal_error] in /*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeAgreement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SellerTradeParty[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:URIUniversalCommunication[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:URIID[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] @ C:\dev\git\validation\cii\examples\CII_example5.xml [BR-CL-25]-Endpoint identifier scheme identifier MUST belong to the CEF EAS code list Test=((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0135 0142 0151 0184 0190 0191 0192 0193 0195 0196 0198 0199 0200 9901 9902 9904 9905 9906 9907 9910 9913 9914 9915 9917 9918 9919 9920 9921 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 9954 9955 9956 9957 9958 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' '))))
[ERROR] [fatal_error] in /*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeAgreement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:BuyerTradeParty[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:URIUniversalCommunication[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:URIID[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] @ C:\dev\git\validation\cii\examples\CII_example5.xml [BR-CL-25]-Endpoint identifier scheme identifier MUST belong to the CEF EAS code list Test=((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0135 0142 0151 0184 0190 0191 0192 0193 0195 0196 0198 0199 0200 9901 9902 9904 9905 9906 9907 9910 9913 9914 9915 9917 9918 9919 9920 9921 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 9954 9955 9956 9957 9958 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' '))))
phax commented 5 years ago

Test files are okay now