From c30ece7ef0f3c0c118d51d6a373cbe95333fa35d Mon Sep 17 00:00:00 2001 From: Georg Date: Tue, 24 Sep 2024 13:41:43 +0000 Subject: [PATCH] adding sb rules --- project.xml | 6 + rules/sch/PEPPOL-EN16931-sb-UBL.sch | 492 ++++++++++++++++++++++++++++ 2 files changed, 498 insertions(+) create mode 100644 rules/sch/PEPPOL-EN16931-sb-UBL.sch diff --git a/project.xml b/project.xml index 5ff7837..0040018 100644 --- a/project.xml +++ b/project.xml @@ -63,6 +63,12 @@ rules/sch/PEPPOL-EN16931-UBL.sch Rules for Peppol BIS 3.0 Billing + + ubl-peppol-sb + native:Schematron + rules/sch/PEPPOL-EN16931-sb-UBL.sch + Rules for Peppol BIS 3.0 Self-Billing + diff --git a/rules/sch/PEPPOL-EN16931-sb-UBL.sch b/rules/sch/PEPPOL-EN16931-sb-UBL.sch new file mode 100644 index 0000000..96ae958 --- /dev/null +++ b/rules/sch/PEPPOL-EN16931-sb-UBL.sch @@ -0,0 +1,492 @@ + + + + Rules for Peppol BIS 3.0 Billing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Document MUST not contain empty elements. + + + + + + Only one project reference is allowed on document level + + + + + The Uniform Resource Locater should start with http(s):// or ftp(s):// + + + + + + Business process MUST be provided. + Business process MUST be in the format 'urn:fdc:peppol.eu:2017:poacc:billing:NN:1.0' where NN indicates the process number. + No more than one note is allowed on document level, unless both the buyer and seller are German organizations. + A buyer reference or purchase order reference MUST be provided. + Specification identifier MUST have the value 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0'. + Only one tax total with tax subtotals MUST be provided. + Only one tax total without tax subtotals MUST be provided when tax currency code is provided. + Invoice total VAT amount and Invoice total VAT amount in accounting currency MUST have the same operational sign + + + VAT accounting currency code MUST be different from invoice currency code when provided. + + + + Buyer electronic address MUST be provided + + + + Seller electronic address MUST be provided + + + + Allowance/charge base amount MUST be provided when allowance/charge percentage is provided. + + + Allowance/charge percentage MUST be provided when allowance/charge base amount is provided. + + + Allowance/charge amount must equal base amount * percentage/100 if base amount and percentage exists + Allowance/charge ChargeIndicator value MUST equal 'true' or 'false' + + + + Mandate reference MUST be provided for direct debit. + + + + All currencyID attributes must have the same value as the invoice currency code (BT-5), except for the invoice total VAT amount in accounting currency (BT-111). + + + + Start date of line period MUST be within invoice period. + + + End date of line period MUST be within invoice period. + + + + + + + + + + Invoice line net amount MUST equal (Invoiced quantity * (Item net price/item price base quantity) + Sum of invoice line charge amount - sum of invoice line allowance amount + Base quantity MUST be a positive number above zero. + Only one invoiced object is allowed pr line + Element Document reference can only be used for Invoice line object + + + + Charge on price level is NOT allowed. Only value 'false' allowed. + Item net price MUST equal (Gross price - Allowance amount) when gross price is provided. + + + + + + Unit code of price base quantity MUST be same as invoiced quantity. + + + + GLN must have a valid format according to GS1 rules. + + + Norwegian organization number MUST be stated in the correct format. + + + Danish organization number (CVR) MUST be stated in the correct format. + + + Belgian enterprise number MUST be stated in the correct format. + + + IPA Code (Codice Univoco Unità Organizzativa) must be stated in the correct format + + + Tax Code (Codice Fiscale) must be stated in the correct format + + + Tax Code (Codice Fiscale) must be stated in the correct format + + + Italian VAT Code (Partita Iva) must be stated in the correct format + + + + Swedish organization number MUST be stated in the correct format. + + + Australian Business Number (ABN) MUST be stated in the correct format. + + + + + + + + + + + + + + + + + + Mime code must be according to subset of IANA code list. + + + Reason code MUST be according to subset of UNCL 5189 D.16B. + + + Reason code MUST be according to UNCL 7161 D.16B. + + + Invoice period description code must be according to UNCL 2005 D.16B. + + + Currency code must be according to ISO 4217:2005 + + + Invoice type code MUST be set according to the profile. + + + Credit note type code MUST be set according to the profile. + + + A date + MUST be formatted YYYY-MM-DD. + + + Electronic address identifier scheme must be from the codelist "Electronic Address Identifier Scheme" + + + Tax Category G MUST be used when exemption reason code is VATEX-EU-G + + + Tax Category O MUST be used when exemption reason code is VATEX-EU-O + + + Tax Category K MUST be used when exemption reason code is VATEX-EU-IC + + + Tax Category AE MUST be used when exemption reason code is VATEX-EU-AE + + + Tax Category E MUST be used when exemption reason code is VATEX-EU-D + + + Tax Category E MUST be used when exemption reason code is VATEX-EU-F + + + Tax Category E MUST be used when exemption reason code is VATEX-EU-I + + + Tax Category E MUST be used when exemption reason code is VATEX-EU-J + + +