From ca3996c7729cce9828ab0ae9ecfc68e57477dccf Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Fri, 28 Oct 2022 15:58:06 +0200 Subject: [PATCH 1/4] Fix issue with normalize-space for elements that can occur multiple times. normalize-space() can only take a single string value. This works fine for xpath expressions that return a single node, but not for expressions that return a node list. This results in a run-time XPath error when validating documents that have multiple nodes that match an expression within a context. This commit changes the test expressions for empty values to an 'every $ in satisfies' clause. Note that most of these won't occur in a situation where the XML Schema is properly checked. However, because the result would be an Xpath error rather than a failed test, it's better to use this approach for all fields where we check emptiness by a normalize-space() != '' expression. --- cii/schematron/CII/EN16931-CII-model.sch | 38 ++++++++++++------------ ubl/schematron/UBL/EN16931-UBL-model.sch | 30 +++++++++---------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/cii/schematron/CII/EN16931-CII-model.sch b/cii/schematron/CII/EN16931-CII-model.sch index 600df2f4..6e6e65d2 100644 --- a/cii/schematron/CII/EN16931-CII-model.sch +++ b/cii/schematron/CII/EN16931-CII-model.sch @@ -6,17 +6,17 @@ - - - - - - - + + + + + + + - + - + @@ -26,11 +26,11 @@ - + - + @@ -53,17 +53,17 @@ - + - - - + + + - - - - + + + + diff --git a/ubl/schematron/UBL/EN16931-UBL-model.sch b/ubl/schematron/UBL/EN16931-UBL-model.sch index e339faf7..07590b21 100644 --- a/ubl/schematron/UBL/EN16931-UBL-model.sch +++ b/ubl/schematron/UBL/EN16931-UBL-model.sch @@ -5,31 +5,31 @@ --> - - - - - - - + + + + + + + - + - + - + - - + + - + @@ -50,9 +50,9 @@ - + - + From fbda3f3575171c64614c2808be2b7a8882d08db1 Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Tue, 1 Nov 2022 22:57:45 +0100 Subject: [PATCH 2/4] Re-generate the validation XSLT files --- .../EN16931-CII-validation-preprocessed.sch | 38 +++++----- cii/xslt/EN16931-CII-validation.xslt | 76 +++++++++---------- .../EN16931-UBL-validation-preprocessed.sch | 30 ++++---- ubl/xslt/EN16931-UBL-validation.xslt | 60 +++++++-------- 4 files changed, 102 insertions(+), 102 deletions(-) diff --git a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch index 21188169..8903c94d 100644 --- a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch +++ b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch @@ -22,7 +22,7 @@ - [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). + [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). [BR-51]-In accordance with card payments security standards an invoice should never include a full card primary account number (BT-97). At the moment PCI Security Standards Council has defined that the first 6 digits and last 4 digits are the maximum number of digits to be shown. @@ -32,7 +32,7 @@ [BR-61]-If the Payment means type code (BT-81) means SEPA credit transfer, Local credit transfer or Non-SEPA international credit transfer, the Payment account identifier (BT-84) shall be present. - [BR-57]-Each Deliver to address (BG-15) shall contain a Deliver to country code (BT-80). + [BR-57]-Each Deliver to address (BG-15) shall contain a Deliver to country code (BT-80). [BR-31]-Each Document level allowance (BG-20) shall have a Document level allowance amount (BT-92). @@ -75,20 +75,20 @@ [BR-DEC-18]-The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2. - [BR-01]-An Invoice shall have a Specification identifier (BT-24). - [BR-02]-An Invoice shall have an Invoice number (BT-1). - [BR-03]-An Invoice shall have an Invoice issue date (BT-2). - [BR-04]-An Invoice shall have an Invoice type code (BT-3). - [BR-05]-An Invoice shall have an Invoice currency code (BT-5). - [BR-06]-An Invoice shall contain the Seller name (BT-27). - [BR-07]-An Invoice shall contain the Buyer name (BT-44). + [BR-01]-An Invoice shall have a Specification identifier (BT-24). + [BR-02]-An Invoice shall have an Invoice number (BT-1). + [BR-03]-An Invoice shall have an Invoice issue date (BT-2). + [BR-04]-An Invoice shall have an Invoice type code (BT-3). + [BR-05]-An Invoice shall have an Invoice currency code (BT-5). + [BR-06]-An Invoice shall contain the Seller name (BT-27). + [BR-07]-An Invoice shall contain the Buyer name (BT-44). [BR-08]-An Invoice shall contain the Seller postal address (BG-5). - [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). + [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). [BR-10]-An Invoice shall contain the Buyer postal address (BG-8). - [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). + [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). [BR-16]-An Invoice shall have at least one Invoice line (BG-25). - [BR-62]-The Seller electronic address (BT-34) shall have a Scheme identifier. - [BR-63]-The Buyer electronic address (BT-49) shall have a Scheme identifier. + [BR-62]-The Seller electronic address (BT-34) shall have a Scheme identifier. + [BR-63]-The Buyer electronic address (BT-49) shall have a Scheme identifier. [BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110). [BR-CO-25]-In case the Amount due for payment (BT-115) is positive, either the Payment due date (BT-9) or the Payment terms (BT-20) shall be present. [BR-S-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Standard rated" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "Standard rated". @@ -104,16 +104,16 @@ [BR-B-02]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is “Split payment" shall not contain an invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is “Standard rated”. - [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). + [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). [BR-22]-Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129). [BR-23]-An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130). [BR-24]-Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131). - [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). + [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). [BR-26]-Each Invoice line (BG-25) shall contain the Item net price (BT-146). [BR-27]-The Item net price (BT-146) shall NOT be negative. [BR-28]-The Item gross price (BT-148) shall NOT be negative. - [BR-64]-The Item standard identifier (BT-157) shall have a Scheme identifier. - [BR-65]-The Item classification identifier (BT-158) shall have a Scheme identifier. + [BR-64]-The Item standard identifier (BT-157) shall have a Scheme identifier. + [BR-65]-The Item classification identifier (BT-158) 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. @@ -153,7 +153,7 @@ [BR-CO-27]- Either the IBAN or a Proprietary ID (BT-84) shall be used. - [BR-55]-Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25). + [BR-55]-Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25). [BR-CO-26]-In order for the buyer to automatically identify a supplier, the Seller identifier (BT-29), the Seller legal registration identifier (BT-30) and/or the Seller VAT identifier (BT-31) shall be present. @@ -162,7 +162,7 @@ [BR-18]-The Seller tax representative name (BT-62) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). [BR-19]-The Seller tax representative postal address (BG-12) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). [BR-20]-The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11). - [BR-56]-Each Seller tax representative party (BG-11) shall have a Seller tax representative VAT identifier (BT-63). + [BR-56]-Each Seller tax representative party (BG-11) shall have a Seller tax representative VAT identifier (BT-63). [BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117). diff --git a/cii/xslt/EN16931-CII-validation.xslt b/cii/xslt/EN16931-CII-validation.xslt index 2186b60e..c0b9e4b0 100644 --- a/cii/xslt/EN16931-CII-validation.xslt +++ b/cii/xslt/EN16931-CII-validation.xslt @@ -213,9 +213,9 @@ - + - + BR-52 fatal @@ -291,9 +291,9 @@ - + - + BR-57 fatal @@ -840,9 +840,9 @@ - + - + BR-01 fatal @@ -855,9 +855,9 @@ - + - + BR-02 fatal @@ -870,9 +870,9 @@ - + - + BR-03 fatal @@ -885,9 +885,9 @@ - + - + BR-04 fatal @@ -900,9 +900,9 @@ - + - + BR-05 fatal @@ -915,9 +915,9 @@ - + - + BR-06 fatal @@ -930,9 +930,9 @@ - + - + BR-07 fatal @@ -960,9 +960,9 @@ - + - + BR-09 fatal @@ -990,9 +990,9 @@ - + - + BR-11 fatal @@ -1020,9 +1020,9 @@ - + - + BR-62 fatal @@ -1035,9 +1035,9 @@ - + - + BR-63 fatal @@ -1251,9 +1251,9 @@ - + - + BR-21 fatal @@ -1311,9 +1311,9 @@ - + - + BR-25 fatal @@ -1371,9 +1371,9 @@ - + - + BR-64 fatal @@ -1386,9 +1386,9 @@ - + - + BR-65 fatal @@ -1794,9 +1794,9 @@ - + - + BR-55 fatal @@ -1881,9 +1881,9 @@ - + - + BR-56 fatal diff --git a/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch b/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch index c856d29c..ad7b14b8 100644 --- a/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch +++ b/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch @@ -21,7 +21,7 @@ - [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). + [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). [BR-CO-25]-In case the Amount due for payment (BT-115) is positive, either the Payment due date (BT-9) or the Payment terms (BT-20) shall be present. @@ -30,7 +30,7 @@ [BR-63]-The Buyer electronic address (BT-49) shall have a Scheme identifier. - [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). + [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). [BR-51]-In accordance with card payments security standards an invoice should never include a full card primary account number (BT-87). At the moment PCI Security Standards Council has defined that the first 6 digits and last 4 digits are the maximum number of digits to be shown. @@ -76,13 +76,13 @@ [BR-DEC-18]-The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2.  - [BR-01]-An Invoice shall have a Specification identifier (BT-24).    - [BR-02]-An Invoice shall have an Invoice number (BT-1). - [BR-03]-An Invoice shall have an Invoice issue date (BT-2). - [BR-04]-An Invoice shall have an Invoice type code (BT-3). - [BR-05]-An Invoice shall have an Invoice currency code (BT-5). - [BR-06]-An Invoice shall contain the Seller name (BT-27). - [BR-07]-An Invoice shall contain the Buyer name (BT-44). + [BR-01]-An Invoice shall have a Specification identifier (BT-24).    + [BR-02]-An Invoice shall have an Invoice number (BT-1). + [BR-03]-An Invoice shall have an Invoice issue date (BT-2). + [BR-04]-An Invoice shall have an Invoice type code (BT-3). + [BR-05]-An Invoice shall have an Invoice currency code (BT-5). + [BR-06]-An Invoice shall contain the Seller name (BT-27). + [BR-07]-An Invoice shall contain the Buyer name (BT-44). [BR-08]-An Invoice shall contain the Seller postal address. [BR-10]-An Invoice shall contain the Buyer postal address (BG-8). [BR-16]-An Invoice shall have at least one Invoice line (BG-25) @@ -140,11 +140,11 @@ [BR-B-02]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is “Split payment" shall not contain an invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is “Standard rated”. - [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). + [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). [BR-22]-Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129). [BR-23]-An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130). [BR-24]-Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131). - [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). + [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). [BR-26]-Each Invoice line (BG-25) shall contain the Item net price (BT-146). [BR-27]-The Item net price (BT-146) shall NOT be negative. [BR-28]-The Item gross price (BT-148) shall NOT be negative. @@ -191,7 +191,7 @@ [BR-17]-The Payee name (BT-59) shall be provided in the Invoice, if the Payee (BG-10) is different from the Seller (BG-4) - [BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-17) information is provided in the Invoice. + [BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-17) information is provided in the Invoice. [BR-49]-A Payment instruction (BG-16) shall specify the Payment means type code (BT-81). @@ -207,15 +207,15 @@ [BR-62]-The Seller electronic address (BT-34) shall have a Scheme identifier. - [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). + [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). - [BR-18]-The Seller tax representative name (BT-62) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11) + [BR-18]-The Seller tax representative name (BT-62) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11) [BR-19]-The Seller tax representative postal address (BG-12) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). [BR-56]-Each Seller tax representative party (BG-11) shall have a Seller tax representative VAT identifier (BT-63). - [BR-20]-The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11). + [BR-20]-The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11). [BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117). diff --git a/ubl/xslt/EN16931-UBL-validation.xslt b/ubl/xslt/EN16931-UBL-validation.xslt index c6438ebd..36fe1240 100644 --- a/ubl/xslt/EN16931-UBL-validation.xslt +++ b/ubl/xslt/EN16931-UBL-validation.xslt @@ -215,9 +215,9 @@ - + - + BR-52 fatal @@ -278,9 +278,9 @@ - + - + BR-11 fatal @@ -824,9 +824,9 @@ - + - + BR-01 fatal @@ -839,9 +839,9 @@ - + - + BR-02 fatal @@ -854,9 +854,9 @@ - + - + BR-03 fatal @@ -869,9 +869,9 @@ - + - + BR-04 fatal @@ -884,9 +884,9 @@ - + - + BR-05 fatal @@ -899,9 +899,9 @@ - + - + BR-06 fatal @@ -914,9 +914,9 @@ - + - + BR-07 fatal @@ -1760,9 +1760,9 @@ - + - + BR-21 fatal @@ -1820,9 +1820,9 @@ - + - + BR-25 fatal @@ -2285,9 +2285,9 @@ - + - + BR-50 fatal @@ -2405,9 +2405,9 @@ - + - + BR-09 fatal @@ -2426,9 +2426,9 @@ - + - + BR-18 fatal @@ -2477,9 +2477,9 @@ - + - + BR-20 fatal From 94423edb33d14485552e42b00d96ecd0df468dc1 Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Tue, 28 Feb 2023 22:41:29 +0100 Subject: [PATCH 3/4] Add an existence check to each 'for every $node' statement. Without the existence check, the tests incorrectly pass if the relevant element is left out completely. --- cii/schematron/CII/EN16931-CII-model.sch | 36 ++++++++++++------------ ubl/schematron/UBL/EN16931-UBL-model.sch | 30 ++++++++++---------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/cii/schematron/CII/EN16931-CII-model.sch b/cii/schematron/CII/EN16931-CII-model.sch index 6e6e65d2..96630a17 100644 --- a/cii/schematron/CII/EN16931-CII-model.sch +++ b/cii/schematron/CII/EN16931-CII-model.sch @@ -6,17 +6,17 @@ - - - - - - - + + + + + + + - + - + @@ -26,11 +26,11 @@ - + - + @@ -53,17 +53,17 @@ - + - - + + - - - - + + + + diff --git a/ubl/schematron/UBL/EN16931-UBL-model.sch b/ubl/schematron/UBL/EN16931-UBL-model.sch index 07590b21..78114889 100644 --- a/ubl/schematron/UBL/EN16931-UBL-model.sch +++ b/ubl/schematron/UBL/EN16931-UBL-model.sch @@ -5,31 +5,31 @@ --> - - - - - - - + + + + + + + - + - + - + - - + + - + @@ -50,9 +50,9 @@ - + - + From ea64e5dfd4088caa05636fe9b9767a8ad6b6292b Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Tue, 28 Feb 2023 23:41:18 +0100 Subject: [PATCH 4/4] Re-generate the validation XSLT files --- .../EN16931-CII-validation-preprocessed.sch | 36 +++++----- cii/xslt/EN16931-CII-validation.xslt | 72 +++++++++---------- .../EN16931-UBL-validation-preprocessed.sch | 30 ++++---- ubl/xslt/EN16931-UBL-validation.xslt | 60 ++++++++-------- 4 files changed, 99 insertions(+), 99 deletions(-) diff --git a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch index 8903c94d..f1bd67fe 100644 --- a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch +++ b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch @@ -22,7 +22,7 @@ - [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). + [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). [BR-51]-In accordance with card payments security standards an invoice should never include a full card primary account number (BT-97). At the moment PCI Security Standards Council has defined that the first 6 digits and last 4 digits are the maximum number of digits to be shown. @@ -75,20 +75,20 @@ [BR-DEC-18]-The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2. - [BR-01]-An Invoice shall have a Specification identifier (BT-24). - [BR-02]-An Invoice shall have an Invoice number (BT-1). - [BR-03]-An Invoice shall have an Invoice issue date (BT-2). - [BR-04]-An Invoice shall have an Invoice type code (BT-3). - [BR-05]-An Invoice shall have an Invoice currency code (BT-5). - [BR-06]-An Invoice shall contain the Seller name (BT-27). - [BR-07]-An Invoice shall contain the Buyer name (BT-44). + [BR-01]-An Invoice shall have a Specification identifier (BT-24). + [BR-02]-An Invoice shall have an Invoice number (BT-1). + [BR-03]-An Invoice shall have an Invoice issue date (BT-2). + [BR-04]-An Invoice shall have an Invoice type code (BT-3). + [BR-05]-An Invoice shall have an Invoice currency code (BT-5). + [BR-06]-An Invoice shall contain the Seller name (BT-27). + [BR-07]-An Invoice shall contain the Buyer name (BT-44). [BR-08]-An Invoice shall contain the Seller postal address (BG-5). - [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). + [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). [BR-10]-An Invoice shall contain the Buyer postal address (BG-8). - [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). + [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). [BR-16]-An Invoice shall have at least one Invoice line (BG-25). - [BR-62]-The Seller electronic address (BT-34) shall have a Scheme identifier. - [BR-63]-The Buyer electronic address (BT-49) shall have a Scheme identifier. + [BR-62]-The Seller electronic address (BT-34) shall have a Scheme identifier. + [BR-63]-The Buyer electronic address (BT-49) shall have a Scheme identifier. [BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110). [BR-CO-25]-In case the Amount due for payment (BT-115) is positive, either the Payment due date (BT-9) or the Payment terms (BT-20) shall be present. [BR-S-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Standard rated" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "Standard rated". @@ -104,16 +104,16 @@ [BR-B-02]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is “Split payment" shall not contain an invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is “Standard rated”. - [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). + [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). [BR-22]-Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129). [BR-23]-An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130). [BR-24]-Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131). - [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). + [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). [BR-26]-Each Invoice line (BG-25) shall contain the Item net price (BT-146). [BR-27]-The Item net price (BT-146) shall NOT be negative. [BR-28]-The Item gross price (BT-148) shall NOT be negative. - [BR-64]-The Item standard identifier (BT-157) shall have a Scheme identifier. - [BR-65]-The Item classification identifier (BT-158) shall have a Scheme identifier. + [BR-64]-The Item standard identifier (BT-157) shall have a Scheme identifier. + [BR-65]-The Item classification identifier (BT-158) 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. @@ -153,7 +153,7 @@ [BR-CO-27]- Either the IBAN or a Proprietary ID (BT-84) shall be used. - [BR-55]-Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25). + [BR-55]-Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25). [BR-CO-26]-In order for the buyer to automatically identify a supplier, the Seller identifier (BT-29), the Seller legal registration identifier (BT-30) and/or the Seller VAT identifier (BT-31) shall be present. @@ -162,7 +162,7 @@ [BR-18]-The Seller tax representative name (BT-62) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). [BR-19]-The Seller tax representative postal address (BG-12) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). [BR-20]-The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11). - [BR-56]-Each Seller tax representative party (BG-11) shall have a Seller tax representative VAT identifier (BT-63). + [BR-56]-Each Seller tax representative party (BG-11) shall have a Seller tax representative VAT identifier (BT-63). [BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117). diff --git a/cii/xslt/EN16931-CII-validation.xslt b/cii/xslt/EN16931-CII-validation.xslt index c0b9e4b0..51979bcc 100644 --- a/cii/xslt/EN16931-CII-validation.xslt +++ b/cii/xslt/EN16931-CII-validation.xslt @@ -213,9 +213,9 @@ - + - + BR-52 fatal @@ -840,9 +840,9 @@ - + - + BR-01 fatal @@ -855,9 +855,9 @@ - + - + BR-02 fatal @@ -870,9 +870,9 @@ - + - + BR-03 fatal @@ -885,9 +885,9 @@ - + - + BR-04 fatal @@ -900,9 +900,9 @@ - + - + BR-05 fatal @@ -915,9 +915,9 @@ - + - + BR-06 fatal @@ -930,9 +930,9 @@ - + - + BR-07 fatal @@ -960,9 +960,9 @@ - + - + BR-09 fatal @@ -990,9 +990,9 @@ - + - + BR-11 fatal @@ -1020,9 +1020,9 @@ - + - + BR-62 fatal @@ -1035,9 +1035,9 @@ - + - + BR-63 fatal @@ -1251,9 +1251,9 @@ - + - + BR-21 fatal @@ -1311,9 +1311,9 @@ - + - + BR-25 fatal @@ -1371,9 +1371,9 @@ - + - + BR-64 fatal @@ -1386,9 +1386,9 @@ - + - + BR-65 fatal @@ -1794,9 +1794,9 @@ - + - + BR-55 fatal @@ -1881,9 +1881,9 @@ - + - + BR-56 fatal diff --git a/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch b/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch index ad7b14b8..db6bfd49 100644 --- a/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch +++ b/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch @@ -21,7 +21,7 @@ - [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). + [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). [BR-CO-25]-In case the Amount due for payment (BT-115) is positive, either the Payment due date (BT-9) or the Payment terms (BT-20) shall be present. @@ -30,7 +30,7 @@ [BR-63]-The Buyer electronic address (BT-49) shall have a Scheme identifier. - [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). + [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). [BR-51]-In accordance with card payments security standards an invoice should never include a full card primary account number (BT-87). At the moment PCI Security Standards Council has defined that the first 6 digits and last 4 digits are the maximum number of digits to be shown. @@ -76,13 +76,13 @@ [BR-DEC-18]-The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2.  - [BR-01]-An Invoice shall have a Specification identifier (BT-24).    - [BR-02]-An Invoice shall have an Invoice number (BT-1). - [BR-03]-An Invoice shall have an Invoice issue date (BT-2). - [BR-04]-An Invoice shall have an Invoice type code (BT-3). - [BR-05]-An Invoice shall have an Invoice currency code (BT-5). - [BR-06]-An Invoice shall contain the Seller name (BT-27). - [BR-07]-An Invoice shall contain the Buyer name (BT-44). + [BR-01]-An Invoice shall have a Specification identifier (BT-24).    + [BR-02]-An Invoice shall have an Invoice number (BT-1). + [BR-03]-An Invoice shall have an Invoice issue date (BT-2). + [BR-04]-An Invoice shall have an Invoice type code (BT-3). + [BR-05]-An Invoice shall have an Invoice currency code (BT-5). + [BR-06]-An Invoice shall contain the Seller name (BT-27). + [BR-07]-An Invoice shall contain the Buyer name (BT-44). [BR-08]-An Invoice shall contain the Seller postal address. [BR-10]-An Invoice shall contain the Buyer postal address (BG-8). [BR-16]-An Invoice shall have at least one Invoice line (BG-25) @@ -140,11 +140,11 @@ [BR-B-02]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is “Split payment" shall not contain an invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is “Standard rated”. - [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). + [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). [BR-22]-Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129). [BR-23]-An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130). [BR-24]-Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131). - [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). + [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). [BR-26]-Each Invoice line (BG-25) shall contain the Item net price (BT-146). [BR-27]-The Item net price (BT-146) shall NOT be negative. [BR-28]-The Item gross price (BT-148) shall NOT be negative. @@ -191,7 +191,7 @@ [BR-17]-The Payee name (BT-59) shall be provided in the Invoice, if the Payee (BG-10) is different from the Seller (BG-4) - [BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-17) information is provided in the Invoice. + [BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-17) information is provided in the Invoice. [BR-49]-A Payment instruction (BG-16) shall specify the Payment means type code (BT-81). @@ -207,15 +207,15 @@ [BR-62]-The Seller electronic address (BT-34) shall have a Scheme identifier. - [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). + [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). - [BR-18]-The Seller tax representative name (BT-62) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11) + [BR-18]-The Seller tax representative name (BT-62) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11) [BR-19]-The Seller tax representative postal address (BG-12) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). [BR-56]-Each Seller tax representative party (BG-11) shall have a Seller tax representative VAT identifier (BT-63). - [BR-20]-The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11). + [BR-20]-The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11). [BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117). diff --git a/ubl/xslt/EN16931-UBL-validation.xslt b/ubl/xslt/EN16931-UBL-validation.xslt index 36fe1240..422c0711 100644 --- a/ubl/xslt/EN16931-UBL-validation.xslt +++ b/ubl/xslt/EN16931-UBL-validation.xslt @@ -215,9 +215,9 @@ - + - + BR-52 fatal @@ -278,9 +278,9 @@ - + - + BR-11 fatal @@ -824,9 +824,9 @@ - + - + BR-01 fatal @@ -839,9 +839,9 @@ - + - + BR-02 fatal @@ -854,9 +854,9 @@ - + - + BR-03 fatal @@ -869,9 +869,9 @@ - + - + BR-04 fatal @@ -884,9 +884,9 @@ - + - + BR-05 fatal @@ -899,9 +899,9 @@ - + - + BR-06 fatal @@ -914,9 +914,9 @@ - + - + BR-07 fatal @@ -1760,9 +1760,9 @@ - + - + BR-21 fatal @@ -1820,9 +1820,9 @@ - + - + BR-25 fatal @@ -2285,9 +2285,9 @@ - + - + BR-50 fatal @@ -2405,9 +2405,9 @@ - + - + BR-09 fatal @@ -2426,9 +2426,9 @@ - + - + BR-18 fatal @@ -2477,9 +2477,9 @@ - + - + BR-20 fatal