From f5e0a50d8865a44b32ee477ac21c85661f231366 Mon Sep 17 00:00:00 2001 From: oriol Date: Wed, 11 Sep 2024 08:54:07 +0200 Subject: [PATCH 1/6] resolves #379 --- cii/schematron/CII/EN16931-CII-model.sch | 2 +- .../EN16931-CII-validation-preprocessed.sch | 18 +++-- cii/xslt/EN16931-CII-validation.xslt | 72 +++++++++++++++++-- 3 files changed, 78 insertions(+), 14 deletions(-) diff --git a/cii/schematron/CII/EN16931-CII-model.sch b/cii/schematron/CII/EN16931-CII-model.sch index 4d48a5a..eb070f7 100644 --- a/cii/schematron/CII/EN16931-CII-model.sch +++ b/cii/schematron/CII/EN16931-CII-model.sch @@ -140,7 +140,7 @@ - + diff --git a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch index 2efd856..3d21501 100644 --- a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch +++ b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch @@ -121,7 +121,7 @@ [BR-64]-The Item standard identifier (BT-157) shall have a Scheme identifier. [BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151). [BR-CO-18]-An Invoice shall at least have one VAT breakdown group (BG-23). - [BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2. + [BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2. [BR-41]-Each Invoice line allowance (BG-27) shall have an Invoice line allowance amount (BT-136). @@ -216,7 +216,7 @@ [BR-AG-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63). - [BR-AG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero. + [BR-AG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero. [BR-AG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63). @@ -830,16 +830,20 @@ [CII-SR-004] - Value should not be present [CII-SR-005] - SpecifiedDocumentVersion should not be present - + + [CII-DT-001] - schemeName should not be present + [CII-DT-002] - schemeAgencyName should not be present + [CII-DT-003] - schemeDataURI should not be present + [CII-DT-004] - schemeURI should not be present [CII-DT-005] - schemeID should not be present [CII-DT-006] - schemeAgencyID should not be present [CII-DT-007] - schemeVersionID should not be present - [CII-DT-001] - schemeName should not be present - [CII-DT-002] - schemeAgencyName should not be present - [CII-DT-003] - schemeDataURI should not be present - [CII-DT-004] - schemeURI should not be present + [CII-DT-001] - schemeName should not be present + [CII-DT-002] - schemeAgencyName should not be present + [CII-DT-003] - schemeDataURI should not be present + [CII-DT-004] - schemeURI should not be present [CII-DT-008] - name should not be present diff --git a/cii/xslt/EN16931-CII-validation.xslt b/cii/xslt/EN16931-CII-validation.xslt index 7ab9052..5112658 100644 --- a/cii/xslt/EN16931-CII-validation.xslt +++ b/cii/xslt/EN16931-CII-validation.xslt @@ -1458,9 +1458,9 @@ - + - + BR-DEC-23 fatal @@ -2355,9 +2355,9 @@ - + - + BR-AG-05 fatal @@ -10496,8 +10496,68 @@ - - + + + + + + + + + CII-DT-001 + fatal + + + + [CII-DT-001] - schemeName should not be present + + + + + + + + + + CII-DT-002 + fatal + + + + [CII-DT-002] - schemeAgencyName should not be present + + + + + + + + + + CII-DT-003 + fatal + + + + [CII-DT-003] - schemeDataURI should not be present + + + + + + + + + + CII-DT-004 + fatal + + + + [CII-DT-004] - schemeURI should not be present + + + From 75adcaca6d4d9d115ab56763d6a9339909568e15 Mon Sep 17 00:00:00 2001 From: oriol Date: Wed, 11 Sep 2024 09:33:50 +0200 Subject: [PATCH 2/6] closes #381 --- cii/schematron/abstract/EN16931-CII-syntax.sch | 4 ++-- .../preprocessed/EN16931-CII-validation-preprocessed.sch | 4 ++-- cii/xslt/EN16931-CII-validation.xslt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cii/schematron/abstract/EN16931-CII-syntax.sch b/cii/schematron/abstract/EN16931-CII-syntax.sch index df0ba68..e0b4f09 100644 --- a/cii/schematron/abstract/EN16931-CII-syntax.sch +++ b/cii/schematron/abstract/EN16931-CII-syntax.sch @@ -373,8 +373,8 @@ [CII-SR-456] - DefinedTradeContact of BuyerTradeParty shall exist maximum once [CII-SR-457] - IssuerAssignedID with TypeCode 50 should exist maximum once [CII-SR-458] - IssuerAssignedID with TypeCode 130 should exist maximum once - [CII-SR-459] - SellerTradeParty URIUniversalCommunication should exist maximum once - [CII-SR-460] - BuyerTradeParty URIUniversalCommunication should exist maximum once + [CII-SR-459] - SellerTradeParty URIUniversalCommunication should exist maximum once + [CII-SR-460] - BuyerTradeParty URIUniversalCommunication should exist maximum once [CII-SR-308] - RelatedSupplyChainConsignment should not be present diff --git a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch index 3d21501..0f40214 100644 --- a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch +++ b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch @@ -680,8 +680,8 @@ [CII-SR-456] - DefinedTradeContact of BuyerTradeParty shall exist maximum once [CII-SR-457] - IssuerAssignedID with TypeCode 50 should exist maximum once [CII-SR-458] - IssuerAssignedID with TypeCode 130 should exist maximum once - [CII-SR-459] - SellerTradeParty URIUniversalCommunication should exist maximum once - [CII-SR-460] - BuyerTradeParty URIUniversalCommunication should exist maximum once + [CII-SR-459] - SellerTradeParty URIUniversalCommunication should exist maximum once + [CII-SR-460] - BuyerTradeParty URIUniversalCommunication should exist maximum once [CII-SR-308] - RelatedSupplyChainConsignment should not be present diff --git a/cii/xslt/EN16931-CII-validation.xslt b/cii/xslt/EN16931-CII-validation.xslt index 5112658..5149c27 100644 --- a/cii/xslt/EN16931-CII-validation.xslt +++ b/cii/xslt/EN16931-CII-validation.xslt @@ -8384,7 +8384,7 @@ CII-SR-459 - warning + fatal @@ -8399,7 +8399,7 @@ CII-SR-460 - warning + fatal From d2df04fe6a7d1807888cceff5618e0f58c34db00 Mon Sep 17 00:00:00 2001 From: oriol Date: Wed, 11 Sep 2024 09:59:04 +0200 Subject: [PATCH 3/6] modifies country code list refers to #390 --- cii/schematron/codelist/EN16931-CII-codes.sch | 6 +++--- .../EN16931-CII-validation-preprocessed.sch | 6 +++--- cii/xslt/EN16931-CII-validation.xslt | 12 ++++++------ ubl/schematron/codelist/EN16931-UBL-codes.sch | 6 +++--- .../EN16931-UBL-validation-preprocessed.sch | 6 +++--- ubl/xslt/EN16931-UBL-validation.xslt | 12 ++++++------ 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cii/schematron/codelist/EN16931-CII-codes.sch b/cii/schematron/codelist/EN16931-CII-codes.sch index 1066be1..e083ca5 100644 --- a/cii/schematron/codelist/EN16931-CII-codes.sch +++ b/cii/schematron/codelist/EN16931-CII-codes.sch @@ -14,21 +14,21 @@ [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 diff --git a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch index 0f40214..03dd3c5 100644 --- a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch +++ b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch @@ -959,13 +959,13 @@ [BR-CL-01]-The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001. - [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 + [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 - [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 + [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 - [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 + [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 [BR-CL-06]-Value added tax point date code MUST be coded using a restriction of UNTDID 2475. diff --git a/cii/xslt/EN16931-CII-validation.xslt b/cii/xslt/EN16931-CII-validation.xslt index 5149c27..41e77e7 100644 --- a/cii/xslt/EN16931-CII-validation.xslt +++ b/cii/xslt/EN16931-CII-validation.xslt @@ -12086,9 +12086,9 @@ - + - + BR-CL-03 fatal @@ -12107,9 +12107,9 @@ - + - + BR-CL-04 fatal @@ -12128,9 +12128,9 @@ - + - + BR-CL-05 fatal diff --git a/ubl/schematron/codelist/EN16931-UBL-codes.sch b/ubl/schematron/codelist/EN16931-UBL-codes.sch index 4819759..0f20c49 100644 --- a/ubl/schematron/codelist/EN16931-UBL-codes.sch +++ b/ubl/schematron/codelist/EN16931-UBL-codes.sch @@ -15,20 +15,20 @@ [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 diff --git a/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch b/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch index 43b85cf..6c8ba13 100644 --- a/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch +++ b/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch @@ -1149,13 +1149,13 @@ [BR-CL-01]-The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001. - [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 + [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 - [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 + [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 - [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 + [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 [BR-CL-06]-Value added tax point date code MUST be coded using a restriction of UNTDID 2005. diff --git a/ubl/xslt/EN16931-UBL-validation.xslt b/ubl/xslt/EN16931-UBL-validation.xslt index bc20971..8feacdf 100644 --- a/ubl/xslt/EN16931-UBL-validation.xslt +++ b/ubl/xslt/EN16931-UBL-validation.xslt @@ -15097,9 +15097,9 @@ - + - + BR-CL-03 fatal @@ -15118,9 +15118,9 @@ - + - + BR-CL-04 fatal @@ -15139,9 +15139,9 @@ - + - + BR-CL-05 fatal From 5117f6b01e7f1dbfb2be1f00f1c0039f0448b8f4 Mon Sep 17 00:00:00 2001 From: oriol Date: Wed, 11 Sep 2024 11:08:49 +0200 Subject: [PATCH 4/6] resolves #387 --- cii/schematron/CII/EN16931-CII-syntax.sch | 2 +- .../EN16931-CII-validation-preprocessed.sch | 2 +- cii/xslt/EN16931-CII-validation.xslt | 4 +- test/cii/factur-x_F2024000223.xml | 710 ++++++++++++++++++ test/cii/factur-x_F2024000224.xml | 710 ++++++++++++++++++ 5 files changed, 1424 insertions(+), 4 deletions(-) create mode 100644 test/cii/factur-x_F2024000223.xml create mode 100644 test/cii/factur-x_F2024000224.xml diff --git a/cii/schematron/CII/EN16931-CII-syntax.sch b/cii/schematron/CII/EN16931-CII-syntax.sch index ba8aa02..d59517e 100644 --- a/cii/schematron/CII/EN16931-CII-syntax.sch +++ b/cii/schematron/CII/EN16931-CII-syntax.sch @@ -631,7 +631,7 @@ - + diff --git a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch index 03dd3c5..fef1bad 100644 --- a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch +++ b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch @@ -807,7 +807,7 @@ [CII-SR-452] - Only one SpecifiedTradePaymentTerms should be present [CII-SR-453] - Only one SpecifiedTradePaymentTerms Description should be present [CII-SR-461] - Only one TaxPointDate shall be present - [CII-SR-462] - Only one DueDateTypeCode shall be present + [CII-SR-462] - Only one DueDateTypeCode shall be present [CII-SR-411] - InformationAmount should not be present diff --git a/cii/xslt/EN16931-CII-validation.xslt b/cii/xslt/EN16931-CII-validation.xslt index 41e77e7..9eb0c09 100644 --- a/cii/xslt/EN16931-CII-validation.xslt +++ b/cii/xslt/EN16931-CII-validation.xslt @@ -10237,9 +10237,9 @@ - + - + CII-SR-462 fatal diff --git a/test/cii/factur-x_F2024000223.xml b/test/cii/factur-x_F2024000223.xml new file mode 100644 index 0000000..97e0a93 --- /dev/null +++ b/test/cii/factur-x_F2024000223.xml @@ -0,0 +1,710 @@ + + + + + A1 + + + urn:cen.eu:en16931:2017 + + + + F2024000223 + 380 + + 20240131 + + + FOURNISSEUR F SARL au capital de 50 000 EUR + REG + + + RCS MAVILLE 123 456 782 + ABL + + + 35 ma rue a moi, code postal Ville Pays – contact@masociete.fr - www.masociete.fr – N° TVA : FR32 123 456 789 + AAI + + + Tout retard de paiement engendre une pénalité exigible à compter de la date d'échéance, calculée sur la base de trois fois le taux d'intérêt légal. + PMD + + + Indemnité forfaitaire pour frais de recouvrement en cas de retard de paiement : 40 €. + PMT + + + Les réglements reçus avant la date d'échéance ne donneront pas lieu à escompte. + AAB + + + + + + 1 + + DONT 0,50 EUR de DEEE + + + + 598785412598745 + ART_1254 + REF5487 + PRESTATION SUPPORT + Description + + CATEGORIE + JOUR 8H-20H + + + SKU2578 + + + + + 1 + + + 65.0000 + 1.0000 + + + false + + 5.0000 + + + + 60.0000 + 1.0000 + + + + 1.0000 + + + + VAT + E + 0.00 + + + + 20240101 + + + 20240131 + + + + + false + + 1.00 + 100.00 + 1.00 + 71 + REMISE VOLUME + + + + false + + 1.00 + 71 + REMISE VOLUME + + + + false + + 1.00 + 71 + REMISE VOLUME + + + + false + + 1.00 + 100 + + + + true + + 1.00 + FRAIS PALETTE + + + + true + + 1.00 + FRAIS PALETTE + + + + true + + 1.00 + FRAIS PALETTE + + + + true + + 1.00 + FRAIS PALETTE + + + 60.00 + + + EQUIPE_A + 130 + AOP + + + BUY_ACC_REF + + + + + + 2 + + DONT 0,50 EUR de DEEE + + + + ART_9874 + REF9854 + FOURNITURES PAPIER + Description + + COULEUR + BLANC + + + GRAMMAGE + 80g + + + LOT6254784 + + + FR + + + + + 3 + + + 31.0000 + 3.0000 + + + false + + 1.0000 + + + + 30.0000 + 3.0000 + + + + 3.0000 + + + + VAT + S + 10.00 + + + + 20240101 + + + 20240131 + + + + + false + + 2.00 + 71 + REMISE VOLUME + + + + false + + 1.00 + 71 + REMISE VOLUME + + + + false + + 1.00 + 71 + REMISE VOLUME + + + + false + + 1.00 + 100 + + + + true + + 1.00 + ADL + + + + true + + 1.00 + FRAIS PALETTE + + + + true + + 1.00 + FRAIS PALETTE + + + 28.00 + + + TARIF_2022 + 130 + AFG + + + BUY_ACC_REF + + + + + + 3 + + DONT 0,50 EUR de DEEE + + + + APPEL + Description + + + + 2 + + + 7.0000 + + + false + + 0.0000 + + + + 7.0000 + + + + 1.0000 + + + + VAT + S + 20.00 + + + 7.00 + + + BUY_ACC_REF + + + + + SERVEXEC + + 123 + 587451236587 + 12345678200077 + DUNS1235487 + ODETTE254879 + LE FOURNISSEUR + SARL AU CAPITAL DE 50 000 EUROS + + 123456782 + SELLER TRADE NAME + + + M. CONTACT + DEP SELLER + + 01 02 03 54 87 + + + seller@seller.com + + + + 75018 + 35 rue d'ici + Seller line 2 + Seller line 3 + PARIS + FR + + + moi@seller.com + + + FR11123456782 + + + + 3654789851 + LE CLIENT + + 987654321 + + + Buyer contact name + Buyer dep + + 01 01 25 45 87 + + + buyer@buyer.com + + + + 06000 + MON ADRESSE LIGNE 1 + Buyer line 2 + Buyer line 3 + MA VILLE + FR + + + me@buyer.com + + + FR 05 987 654 321 + + + + SELLER TAX REP + + 75018 + 35 rue d'ici + Seller line 2 + Seller line 3 + PARIS + FR + + + FR 05 987 654 321 + + + + SALES REF 2547 + + + PO201925478 + + + CT2018120802 + + + SUPPort doc + url:gffter + 916 + support descript + + + TENDER-002 + 50 + + + REFCLI0215 + 130 + IT + + + PROJET2547 + Project reference + + + + + PRIVATE_ID_DEL + DEL Name + + 06000 + DEL ADRESSE LIGNE 1 + DEL line 2 + NICE + FR + + + + + 20240128 + + + + DESPADV002 + + + RECEIV-ADV002 + + + + CREDID + F20180023BUYER + EUR + + 587451236586 + PAYEE NAME + + 303656847 + + + + 30 + Virement + + FRDEBIT + + + FR20 1254 2547 2569 8542 5874 698 + MON COMPTE BANCAIRE + LOC BANK ACCOUNT + + + BIC_MONCOMPTE + + + + 2.20 + VAT + 11.00 + S + 5 + 20.00 + + + 0.00 + VAT + DEBOURS + 60.00 + E + VATEX-EU-79-C + 72 + 0.00 + + + 2.70 + VAT + 27.00 + S + 72 + 10.00 + + + 0.00 + VAT + LIVRAISON INTRACOMMUNAUTAIRE + 2.00 + K + VATEX-EU-IC + 72 + 0.00 + + + + 20220101 + + + 20221231 + + + + + false + + 5.00 + 100.00 + 5.00 + 95 + REMISE COMMERCIALE + + VAT + S + 20.00 + + + + + false + + 1.00 + 100.00 + 1.00 + 100 + REMISE COMMERCIALE + + VAT + S + 20.00 + + + + + false + + 1.00 + 100.00 + 1.00 + 100 + REMISE COMMERCIALE + + VAT + S + 20.00 + + + + + false + + 2.00 + 100.00 + 2.00 + REMISE COMMERCIALE + + VAT + S + 10.00 + + + + + true + + 10.00 + 100.00 + 10.00 + FC + FRAIS DEPLACEMENT + + VAT + S + 20.00 + + + + + true + + 1.00 + 100.00 + 1.00 + ADR + FRAIS DEPLACEMENT + + VAT + S + 20.00 + + + + + true + + 2.00 + 100.00 + 2.00 + FC + FRAIS DEPLACEMENT + + VAT + K + 0.00 + + + + + true + + 1.00 + 100.00 + 1.00 + FC + FRAIS DEPLACEMENT + + VAT + S + 10.00 + + + + PAIEMENT 30 JOURS NET + + 20220302 + + MANDATE PT + + + 95.00 + 14.00 + 9.00 + 100.00 + 4.90 + 0.00 + 104.90 + 0.00 + 104.90 + + + F2024000203 + + 20240101 + + + + BUYER ACCOUNT REF + + + + \ No newline at end of file diff --git a/test/cii/factur-x_F2024000224.xml b/test/cii/factur-x_F2024000224.xml new file mode 100644 index 0000000..9d1aa18 --- /dev/null +++ b/test/cii/factur-x_F2024000224.xml @@ -0,0 +1,710 @@ + + + + + A1 + + + urn:cen.eu:en16931:2017 + + + + F2024000224 + 380 + + 20240131 + + + FOURNISSEUR F SARL au capital de 50 000 EUR + REG + + + RCS MAVILLE 123 456 782 + ABL + + + 35 ma rue a moi, code postal Ville Pays – contact@masociete.fr - www.masociete.fr – N° TVA : FR32 123 456 789 + AAI + + + Tout retard de paiement engendre une pénalité exigible à compter de la date d'échéance, calculée sur la base de trois fois le taux d'intérêt légal. + PMD + + + Indemnité forfaitaire pour frais de recouvrement en cas de retard de paiement : 40 €. + PMT + + + Les réglements reçus avant la date d'échéance ne donneront pas lieu à escompte. + AAB + + + + + + 1 + + DONT 0,50 EUR de DEEE + + + + 598785412598745 + ART_1254 + REF5487 + PRESTATION SUPPORT + Description + + CATEGORIE + JOUR 8H-20H + + + SKU2578 + + + + + 1 + + + 65.0000 + 1.0000 + + + false + + 5.0000 + + + + 60.0000 + 1.0000 + + + + 1.0000 + + + + VAT + E + 0.00 + + + + 20240101 + + + 20240131 + + + + + false + + 1.00 + 100.00 + 1.00 + 71 + REMISE VOLUME + + + + false + + 1.00 + 71 + REMISE VOLUME + + + + false + + 1.00 + 71 + REMISE VOLUME + + + + false + + 1.00 + 100 + + + + true + + 1.00 + FRAIS PALETTE + + + + true + + 1.00 + FRAIS PALETTE + + + + true + + 1.00 + FRAIS PALETTE + + + + true + + 1.00 + FRAIS PALETTE + + + 60.00 + + + EQUIPE_A + 130 + AOP + + + BUY_ACC_REF + + + + + + 2 + + DONT 0,50 EUR de DEEE + + + + ART_9874 + REF9854 + FOURNITURES PAPIER + Description + + COULEUR + BLANC + + + GRAMMAGE + 80g + + + LOT6254784 + + + FR + + + + + 3 + + + 31.0000 + 3.0000 + + + false + + 1.0000 + + + + 30.0000 + 3.0000 + + + + 3.0000 + + + + VAT + S + 10.00 + + + + 20240101 + + + 20240131 + + + + + false + + 2.00 + 71 + REMISE VOLUME + + + + false + + 1.00 + 71 + REMISE VOLUME + + + + false + + 1.00 + 71 + REMISE VOLUME + + + + false + + 1.00 + 100 + + + + true + + 1.00 + ADL + + + + true + + 1.00 + FRAIS PALETTE + + + + true + + 1.00 + FRAIS PALETTE + + + 28.00 + + + TARIF_2022 + 130 + AFG + + + BUY_ACC_REF + + + + + + 3 + + DONT 0,50 EUR de DEEE + + + + APPEL + Description + + + + 2 + + + 7.0000 + + + false + + 0.0000 + + + + 7.0000 + + + + 1.0000 + + + + VAT + S + 20.00 + + + 7.00 + + + BUY_ACC_REF + + + + + SERVEXEC + + 123 + 587451236587 + 12345678200077 + DUNS1235487 + ODETTE254879 + LE FOURNISSEUR + SARL AU CAPITAL DE 50 000 EUROS + + 123456782 + SELLER TRADE NAME + + + M. CONTACT + DEP SELLER + + 01 02 03 54 87 + + + seller@seller.com + + + + 75018 + 35 rue d'ici + Seller line 2 + Seller line 3 + PARIS + FR + + + moi@seller.com + + + FR11123456782 + + + + 3654789851 + LE CLIENT + + 987654321 + + + Buyer contact name + Buyer dep + + 01 01 25 45 87 + + + buyer@buyer.com + + + + 06000 + MON ADRESSE LIGNE 1 + Buyer line 2 + Buyer line 3 + MA VILLE + FR + + + me@buyer.com + + + FR 05 987 654 321 + + + + SELLER TAX REP + + 75018 + 35 rue d'ici + Seller line 2 + Seller line 3 + PARIS + FR + + + FR 05 987 654 321 + + + + SALES REF 2547 + + + PO201925478 + + + CT2018120802 + + + SUPPort doc + url:gffter + 916 + support descript + + + TENDER-002 + 50 + + + REFCLI0215 + 130 + IT + + + PROJET2547 + Project reference + + + + + PRIVATE_ID_DEL + DEL Name + + 06000 + DEL ADRESSE LIGNE 1 + DEL line 2 + NICE + FR + + + + + 20240128 + + + + DESPADV002 + + + RECEIV-ADV002 + + + + CREDID + F20180023BUYER + EUR + + 587451236586 + PAYEE NAME + + 303656847 + + + + 30 + Virement + + FRDEBIT + + + FR20 1254 2547 2569 8542 5874 698 + MON COMPTE BANCAIRE + LOC BANK ACCOUNT + + + BIC_MONCOMPTE + + + + 2.20 + VAT + 11.00 + S + 72 + 20.00 + + + 0.00 + VAT + DEBOURS + 60.00 + E + VATEX-EU-79-C + 72 + 0.00 + + + 2.70 + VAT + 27.00 + S + 72 + 10.00 + + + 0.00 + VAT + LIVRAISON INTRACOMMUNAUTAIRE + 2.00 + K + VATEX-EU-IC + 5 + 0.00 + + + + 20220101 + + + 20221231 + + + + + false + + 5.00 + 100.00 + 5.00 + 95 + REMISE COMMERCIALE + + VAT + S + 20.00 + + + + + false + + 1.00 + 100.00 + 1.00 + 100 + REMISE COMMERCIALE + + VAT + S + 20.00 + + + + + false + + 1.00 + 100.00 + 1.00 + 100 + REMISE COMMERCIALE + + VAT + S + 20.00 + + + + + false + + 2.00 + 100.00 + 2.00 + REMISE COMMERCIALE + + VAT + S + 10.00 + + + + + true + + 10.00 + 100.00 + 10.00 + FC + FRAIS DEPLACEMENT + + VAT + S + 20.00 + + + + + true + + 1.00 + 100.00 + 1.00 + ADR + FRAIS DEPLACEMENT + + VAT + S + 20.00 + + + + + true + + 2.00 + 100.00 + 2.00 + FC + FRAIS DEPLACEMENT + + VAT + K + 0.00 + + + + + true + + 1.00 + 100.00 + 1.00 + FC + FRAIS DEPLACEMENT + + VAT + S + 10.00 + + + + PAIEMENT 30 JOURS NET + + 20220302 + + MANDATE PT + + + 95.00 + 14.00 + 9.00 + 100.00 + 4.90 + 0.00 + 104.90 + 0.00 + 104.90 + + + F2024000203 + + 20240101 + + + + BUYER ACCOUNT REF + + + + \ No newline at end of file From 232e76fad02ccbc58eeba69df98592b0074d3fab Mon Sep 17 00:00:00 2001 From: oriol Date: Thu, 3 Oct 2024 16:21:15 +0200 Subject: [PATCH 5/6] resolves issue #390 --- cii/schematron/codelist/EN16931-CII-codes.sch | 18 +++++++++--------- ubl/schematron/codelist/EN16931-UBL-codes.sch | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cii/schematron/codelist/EN16931-CII-codes.sch b/cii/schematron/codelist/EN16931-CII-codes.sch index e083ca5..dcbf581 100644 --- a/cii/schematron/codelist/EN16931-CII-codes.sch +++ b/cii/schematron/codelist/EN16931-CII-codes.sch @@ -14,21 +14,21 @@ [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 @@ -56,7 +56,7 @@ [BR-CL-10]-Any identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. @@ -64,7 +64,7 @@ [BR-CL-11]-Any registration identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. @@ -132,7 +132,7 @@ [BR-CL-21]-Item standard identifier scheme identifier MUST belong to the ISO 6523 ICD code list @@ -140,7 +140,7 @@ [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list @@ -161,14 +161,14 @@ [BR-CL-25]-Endpoint identifier scheme identifier MUST belong to the CEF EAS code list [BR-CL-26]-Delivery location identifier scheme identifier MUST belong to the ISO 6523 ICD code list diff --git a/ubl/schematron/codelist/EN16931-UBL-codes.sch b/ubl/schematron/codelist/EN16931-UBL-codes.sch index 0f20c49..9c37004 100644 --- a/ubl/schematron/codelist/EN16931-UBL-codes.sch +++ b/ubl/schematron/codelist/EN16931-UBL-codes.sch @@ -15,20 +15,20 @@ [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 @@ -49,14 +49,14 @@ [BR-CL-10]-Any identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. [BR-CL-11]-Any registration identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. @@ -125,14 +125,14 @@ [BR-CL-21]-Item standard identifier scheme identifier MUST belong to the ISO 6523 ICD code list [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list @@ -154,14 +154,14 @@ [BR-CL-25]-Endpoint identifier scheme identifier MUST belong to the CEF EAS code list [BR-CL-26]-Delivery location identifier scheme identifier MUST belong to the ISO 6523 ICD code list From bef46972527bd8e10bbafd61537fa0ff385d617c Mon Sep 17 00:00:00 2001 From: oriol Date: Thu, 3 Oct 2024 17:19:39 +0200 Subject: [PATCH 6/6] resolves #395 --- cii/schematron/CII/EN16931-CII-syntax.sch | 9 +- .../abstract/EN16931-CII-syntax.sch | 4 +- .../EN16931-CII-validation-preprocessed.sch | 22 ++--- cii/xslt/EN16931-CII-validation.xslt | 88 ++++++++++--------- .../EN16931-UBL-validation-preprocessed.sch | 18 ++-- ubl/xslt/EN16931-UBL-validation.xslt | 36 ++++---- 6 files changed, 95 insertions(+), 82 deletions(-) diff --git a/cii/schematron/CII/EN16931-CII-syntax.sch b/cii/schematron/CII/EN16931-CII-syntax.sch index d59517e..0a0ada3 100644 --- a/cii/schematron/CII/EN16931-CII-syntax.sch +++ b/cii/schematron/CII/EN16931-CII-syntax.sch @@ -171,9 +171,6 @@ value="not(ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge/ram:CategoryTradeTax)"/> - - @@ -207,6 +204,11 @@ + + + + @@ -815,4 +817,5 @@ + diff --git a/cii/schematron/abstract/EN16931-CII-syntax.sch b/cii/schematron/abstract/EN16931-CII-syntax.sch index e0b4f09..bfe7bf6 100644 --- a/cii/schematron/abstract/EN16931-CII-syntax.sch +++ b/cii/schematron/abstract/EN16931-CII-syntax.sch @@ -160,7 +160,6 @@ [CII-SR-129] - TypeCode should not be present [CII-SR-130] - CategoryTradeTax should not be present [CII-SR-131] - ActualTradeCurrencyExchange should not be present - [CII-SR-440] - ActualAmount should exist maximum once [CII-SR-445] - IncludedTradeTax should not be present [CII-SR-132] - ValiditySpecifiedPeriod should not be present @@ -189,6 +188,9 @@ [CII-SR-447] - UltimateCustomerOrderReferencedDocument should not be present + + [CII-SR-440] - ActualAmount should exist maximum once + [CII-SR-151] - RequestedQuantity should not be present [CII-SR-152] - ReceivedQuantity should not be present diff --git a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch index fef1bad..bf61312 100644 --- a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch +++ b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch @@ -489,7 +489,6 @@ [CII-SR-129] - TypeCode should not be present [CII-SR-130] - CategoryTradeTax should not be present [CII-SR-131] - ActualTradeCurrencyExchange should not be present - [CII-SR-440] - ActualAmount should exist maximum once [CII-SR-445] - IncludedTradeTax should not be present [CII-SR-132] - ValiditySpecifiedPeriod should not be present [CII-SR-133] - DeliveryTradeLocation should not be present @@ -513,6 +512,9 @@ [CII-SR-150] - IncludedSpecifiedMarketplace should not be present [CII-SR-447] - UltimateCustomerOrderReferencedDocument should not be present + + [CII-SR-440] - ActualAmount should exist maximum once + [CII-SR-151] - RequestedQuantity should not be present [CII-SR-152] - ReceivedQuantity should not be present @@ -959,13 +961,13 @@ [BR-CL-01]-The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001. - [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 + [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 - [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 + [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 - [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 + [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 [BR-CL-06]-Value added tax point date code MUST be coded using a restriction of UNTDID 2475. @@ -977,10 +979,10 @@ [BR-CL-08]-Subject Code MUST be coded using a restriction of UNTDID 4451. - [BR-CL-10]-Any identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. + [BR-CL-10]-Any identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. - [BR-CL-11]-Any registration identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. + [BR-CL-11]-Any registration identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. [BR-CL-13]-Item classification identifier identification scheme identifier MUST be coded using one of the UNTDID 7143 list. @@ -1007,11 +1009,11 @@ [BR-CL-20]-Coded charge reasons MUST belong to the UNCL 7161 code list - [BR-CL-21]-Item standard identifier scheme identifier MUST belong to the ISO 6523 ICD + [BR-CL-21]-Item standard identifier scheme identifier MUST belong to the ISO 6523 ICD code list - [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list + [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list [BR-CL-23]-Unit code MUST be coded according to the UN/ECE Recommendation 20 with Rec 21 extension @@ -1020,10 +1022,10 @@ [BR-CL-24]-For Mime code in attribute use MIMEMediaType. - [BR-CL-25]-Endpoint identifier scheme identifier MUST belong to the CEF EAS code list + [BR-CL-25]-Endpoint identifier scheme identifier MUST belong to the CEF EAS code list - [BR-CL-26]-Delivery location identifier scheme identifier MUST belong to the ISO 6523 ICD + [BR-CL-26]-Delivery location identifier scheme identifier MUST belong to the ISO 6523 ICD code list diff --git a/cii/xslt/EN16931-CII-validation.xslt b/cii/xslt/EN16931-CII-validation.xslt index 9eb0c09..208a12d 100644 --- a/cii/xslt/EN16931-CII-validation.xslt +++ b/cii/xslt/EN16931-CII-validation.xslt @@ -3620,7 +3620,7 @@ - + @@ -3776,7 +3776,7 @@ - + @@ -4067,7 +4067,7 @@ - + @@ -4088,7 +4088,7 @@ - + @@ -4169,7 +4169,7 @@ - + @@ -4265,7 +4265,7 @@ - + @@ -5111,7 +5111,7 @@ - + @@ -5147,7 +5147,7 @@ - + @@ -5587,21 +5587,6 @@ - - - - CII-SR-440 - fatal - - - - [CII-SR-440] - ActualAmount should exist maximum once - - - - - - @@ -5932,6 +5917,27 @@ + + + + + + + + + + CII-SR-440 + fatal + + + + [CII-SR-440] - ActualAmount should exist maximum once + + + + + + @@ -12086,9 +12092,9 @@ - + - + BR-CL-03 fatal @@ -12107,9 +12113,9 @@ - + - + BR-CL-04 fatal @@ -12128,9 +12134,9 @@ - + - + BR-CL-05 fatal @@ -12212,9 +12218,9 @@ - + - + BR-CL-10 fatal @@ -12233,9 +12239,9 @@ - + - + BR-CL-11 fatal @@ -12422,9 +12428,9 @@ - + - + BR-CL-21 fatal @@ -12444,9 +12450,9 @@ - + - + BR-CL-22 fatal @@ -12507,9 +12513,9 @@ - + - + BR-CL-25 fatal @@ -12528,9 +12534,9 @@ - + - + BR-CL-26 fatal diff --git a/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch b/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch index 6c8ba13..d566514 100644 --- a/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch +++ b/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch @@ -1149,13 +1149,13 @@ [BR-CL-01]-The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001. - [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 + [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 - [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 + [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 - [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 + [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 [BR-CL-06]-Value added tax point date code MUST be coded using a restriction of UNTDID 2005. @@ -1164,10 +1164,10 @@ [BR-CL-07]-Object identifier identification scheme identifier MUST be coded using a restriction of UNTDID 1153. - [BR-CL-10]-Any identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. + [BR-CL-10]-Any identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. - [BR-CL-11]-Any registration identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. + [BR-CL-11]-Any registration identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. [BR-CL-13]-Item classification identifier identification scheme identifier MUST be @@ -1195,10 +1195,10 @@ [BR-CL-20]-Coded charge reasons MUST belong to the UNCL 7161 code list - [BR-CL-21]-Item standard identifier scheme identifier MUST belong to the ISO 6523 ICD code list + [BR-CL-21]-Item standard identifier scheme identifier MUST belong to the ISO 6523 ICD code list - [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list + [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list [BR-CL-23]-Unit code MUST be coded according to the UN/ECE Recommendation 20 with @@ -1208,10 +1208,10 @@ [BR-CL-24]-For Mime code in attribute use MIMEMediaType. - [BR-CL-25]-Endpoint identifier scheme identifier MUST belong to the CEF EAS code list + [BR-CL-25]-Endpoint identifier scheme identifier MUST belong to the CEF EAS code list - [BR-CL-26]-Delivery location identifier scheme identifier MUST belong to the ISO 6523 ICD code list + [BR-CL-26]-Delivery location identifier scheme identifier MUST belong to the ISO 6523 ICD code list diff --git a/ubl/xslt/EN16931-UBL-validation.xslt b/ubl/xslt/EN16931-UBL-validation.xslt index 8feacdf..467ce4e 100644 --- a/ubl/xslt/EN16931-UBL-validation.xslt +++ b/ubl/xslt/EN16931-UBL-validation.xslt @@ -15097,9 +15097,9 @@ - + - + BR-CL-03 fatal @@ -15118,9 +15118,9 @@ - + - + BR-CL-04 fatal @@ -15139,9 +15139,9 @@ - + - + BR-CL-05 fatal @@ -15202,9 +15202,9 @@ - + - + BR-CL-10 fatal @@ -15223,9 +15223,9 @@ - + - + BR-CL-11 fatal @@ -15413,9 +15413,9 @@ - + - + BR-CL-21 fatal @@ -15434,9 +15434,9 @@ - + - + BR-CL-22 fatal @@ -15498,9 +15498,9 @@ - + - + BR-CL-25 fatal @@ -15519,9 +15519,9 @@ - + - + BR-CL-26 fatal