From 50bdbc6e81b4864b987ebb69b1d0719966de9e00 Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Fri, 14 Feb 2020 13:43:13 +0100 Subject: [PATCH] Fix issue #24 --- Changelog | 13 +- .../{si-ubl-2.0.2.sch => si-ubl-2.0.sch} | 5 +- schematron/si-ubl-2.0/si-ubl-2.0-nlcius.sch | 310 +++++++++--------- tools/build_all_linux.sh | 2 +- xsl/{si-ubl-2.0.2.xsl => si-ubl-2.0.xsl} | 2 +- 5 files changed, 171 insertions(+), 161 deletions(-) rename schematron/{si-ubl-2.0.2.sch => si-ubl-2.0.sch} (96%) rename xsl/{si-ubl-2.0.2.xsl => si-ubl-2.0.xsl} (99%) diff --git a/Changelog b/Changelog index d7d2a44..2c8e3e6 100644 --- a/Changelog +++ b/Changelog @@ -3,9 +3,15 @@ Scheduled for next release -------------------------- -- Added validation artefacts for the SI-UBL 2.0 g-account extension. +- Added validation artefacts for the SI-UBL 2.0 g-account extension +- Updated SI-UBL 2.0 - Updated SI-UBL 1.2 to version 1.2.1 +- For consistency, SI-UBL 2.0 .sch and .xsl files no longer contain the bugfix release number (this is present in the file itself) +SI-UBL 2.0 +---------- + +- Fixed issue #24: using whitespace before or after the CustomizationID would disable SI-UBL 2.0 rule validation SI-UBL 1.2 Release 1.2.1 ------------------------ @@ -26,6 +32,11 @@ SI-UBL 1.2 Release 1.2.1 SG:UEN (0195) UBLBE (0193) +SI-UBL 2.0 g-account extension +------------------------------ + +- Initial release + ------------------ Published releases diff --git a/schematron/si-ubl-2.0.2.sch b/schematron/si-ubl-2.0.sch similarity index 96% rename from schematron/si-ubl-2.0.2.sch rename to schematron/si-ubl-2.0.sch index 8b1795d..52554a6 100644 --- a/schematron/si-ubl-2.0.2.sch +++ b/schematron/si-ubl-2.0.sch @@ -7,11 +7,10 @@ xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"> PC434-NL-specific Validation diff --git a/schematron/si-ubl-2.0/si-ubl-2.0-nlcius.sch b/schematron/si-ubl-2.0/si-ubl-2.0-nlcius.sch index 9f03816..4f6c095 100644 --- a/schematron/si-ubl-2.0/si-ubl-2.0-nlcius.sch +++ b/schematron/si-ubl-2.0/si-ubl-2.0-nlcius.sch @@ -1,169 +1,169 @@ - - - - - - - - - - - - - - - - - - [BR-NL-1] For suppliers in the Netherlands the supplier MUST provide either a KVK or OIN number for its legal entity identifier (cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID with schemeID 0106 or 0190) - - - [BR-NL-2] For suppliers in the Netherlands, the invoice MUST contain either the buyer reference (cbc:BuyerReference) or the order reference (cac:OrderReference/cbc:ID) - - + + + + + + + + + + + + + + + + + + [BR-NL-1] For suppliers in the Netherlands the supplier MUST provide either a KVK or OIN number for its legal entity identifier (cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID with schemeID 0106 or 0190) + + + [BR-NL-2] For suppliers in the Netherlands, the invoice MUST contain either the buyer reference (cbc:BuyerReference) or the order reference (cac:OrderReference/cbc:ID) + + [BR-NL-3] For suppliers in the Netherlands the supplier's address (cac:AccountingSupplierParty/cac:Party/cac:PostalAddress) MUST contain street name (cbc:StreetName), city (cbc:CityName) and postal zone (cbc:PostalZone) - - + cbc:PostalZone" flag="fatal">[BR-NL-3] For suppliers in the Netherlands the supplier's address (cac:AccountingSupplierParty/cac:Party/cac:PostalAddress) MUST contain street name (cbc:StreetName), city (cbc:CityName) and postal zone (cbc:PostalZone) + + [BR-NL-4] For suppliers in the Netherlands, if the customer is in the Netherlands, the customer address (cac:AccountingCustomerParty/cac:Party/cac:PostalAddress) MUST contain the street name (cbc:StreetName), the city (cbc:CityName) and the postal zone (cbc:PostalZone) - - + cbc:PostalZone)" flag="fatal">[BR-NL-4] For suppliers in the Netherlands, if the customer is in the Netherlands, the customer address (cac:AccountingCustomerParty/cac:Party/cac:PostalAddress) MUST contain the street name (cbc:StreetName), the city (cbc:CityName) and the postal zone (cbc:PostalZone) + + [BR-NL-5] For suppliers in the Netherlands, if the fiscal representative is in the Netherlands, the representative's address (cac:TaxRepresentativeParty/cac:PostalAddress) MUST contain street name (cbc:StreetName), city (cbc:CityName) and postal zone (cbc:PostalZone) - - - - [BR-NL-7] The invoice type code (cbc:InvoiceTypeCode) MUST have one of the following values: 380, 381, 384, 389 - [BR-NL-8] If the invoice type code (cbc:InvoiceTypeCode) is 381, the document MUST use the CreditNote scheme - [BR-NL-8] If the invoice type code (cbc:InvoiceTypeCode) is 380, 384 or 389, the document MUST use the Invoice scheme + cbc:PostalZone)" flag="fatal">[BR-NL-5] For suppliers in the Netherlands, if the fiscal representative is in the Netherlands, the representative's address (cac:TaxRepresentativeParty/cac:PostalAddress) MUST contain street name (cbc:StreetName), city (cbc:CityName) and postal zone (cbc:PostalZone) + + + + [BR-NL-7] The invoice type code (cbc:InvoiceTypeCode) MUST have one of the following values: 380, 381, 384, 389 + [BR-NL-8] If the invoice type code (cbc:InvoiceTypeCode) is 381, the document MUST use the CreditNote scheme + [BR-NL-8] If the invoice type code (cbc:InvoiceTypeCode) is 380, 384 or 389, the document MUST use the Invoice scheme [BR-NL-9] For suppliers in the Netherlands, if the document is a corrective invoice (cbc:InvoiceTypeCode = 384), the document MUST contain an invoice reference (cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID) - - - [BR-NL-10] For suppliers in the Netherlands, if the customer is in the Netherlands, the customer's legal entity identifier (cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID) MUST be either a KVK (schemeID=0106) or OIN number (schemeID=0190) - - - [BR-NL-11] For suppliers in the Netherlands, the supplier MUST provide a means of payment (cac:PaymentMeans) if the payment is from customer to supplier - - + /*/cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID" flag="fatal">[BR-NL-9] For suppliers in the Netherlands, if the document is a corrective invoice (cbc:InvoiceTypeCode = 384), the document MUST contain an invoice reference (cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID) + + + [BR-NL-10] For suppliers in the Netherlands, if the customer is in the Netherlands, the customer's legal entity identifier (cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID) MUST be either a KVK (schemeID=0106) or OIN number (schemeID=0190) + + + [BR-NL-11] For suppliers in the Netherlands, the supplier MUST provide a means of payment (cac:PaymentMeans) if the payment is from customer to supplier + + [BR-NL-12] For suppliers in the Netherlands, the payment means code (cac:PaymentMeans/cbc:PaymentMeansCode) MUST be one of 30, 48, 49, 57, 58 or 59 - - - - [BR-NL-31] The use of a payment service provider identifier (cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cbc:ID) is not recommended for SEPA payments (cac:PaymentMeans/cbc:PaymentMeansCode = 58 or 59) - - - - - - [BR-NL-19] The use of a tax currency code (cbc:TaxCurrencyCode) is not recommended - - - [BR-NL-20] The use of a tax point date (cbc:TaxPointDate) is not recommended, and its value will be ignored - - - [BR-NL-21] The use of a tax point date code (cac:InvoicePeriod/cbc:DescriptionCode) is not recommended, and its value will be ignored - - - - - [BR-NL-24] The use of a preceding invoice issue date (cac:BillingReference/cac:InvoiceDocumentReference/cbc:IssueDate) is not recommended - - - [BR-NL-25] The use of a seller tax registration identifier (cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) is not recommended when the tax scheme is not VAT, since this is not applicable to suppliers in the Netherlands - - - [BR-NL-26] The use of the seller additional legal information field (cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyLegalForm) is not recommended, since this is not applicable for suppliers in the Netherlands - - - [BR-NL-27] The use of the seller address line 3 (cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:AddressLine/cbc:Line) is not recommended - - - [BR-NL-27] The use of the customer address line 3 (cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:AddressLine/cbc:Line) is not recommended - - - [BR-NL-27] The use of the tax representative address line 3 (cac:TaxRepresentativePart/cac:PostalAddress/cac:AddressLine/cbc:Line) is not recommended - - - [BR-NL-27] The use of the delivery address line 3 (cac:Delivery/cac:DeliveryLocation/cac:Address/cac:AddressLine/cbc:Line) is not recommended - - - [BR-NL-28] The use of a country subdivision (cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity) is not recommended - - - [BR-NL-28] The use of a country subdivision (cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity) is not recommended - - - [BR-NL-28] The use of a country subdivision (cac:TaxRepresentativePart/cac:PostalAddress/cbc:CountrySubentity) is not recommended - - - [BR-NL-28] The use of a country subdivision (cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:CountrySubentity) is not recommended - - - [BR-NL-29] The use of a payment means text (cac:PaymentMeans/cbc:PaymentMeansCode/@name) is not recommended - - - [BR-NL-30] The use of a payment account name (cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:Name) is not recommended - - - [BR-NL-32] The use of an allowance reason code (cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) is not recommended - - - [BR-NL-32] The use of an allowance reason code (cac:InvoiceLine/cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) is not recommended - - - [BR-NL-32] The use of an allowance reason code (cac:CreditNoteLine/cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) is not recommended - - - - [BR-NL-33] The use of a tax total in accounting currency (cac:TaxTotal/cbc:TaxAmount/@currencyID different than DocumentCurrencyCode) is not recommended - - - [BR-NL-34] The use of a charge reason code (cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) is not recommended - - - [BR-NL-34] The use of a charge reason code (cac:InvoiceLine/cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) is not recommended - - - [BR-NL-34] The use of a charge reason code (cac:CreditNoteLine/cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) is not recommended - - - [BR-NL-35] The use of a tax exemption reason code (cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:TaxExemptionReasonCode) is not recommended - - + cbc:PaymentMeansCode = 59" flag="fatal">[BR-NL-12] For suppliers in the Netherlands, the payment means code (cac:PaymentMeans/cbc:PaymentMeansCode) MUST be one of 30, 48, 49, 57, 58 or 59 + + + + [BR-NL-31] The use of a payment service provider identifier (cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cbc:ID) is not recommended for SEPA payments (cac:PaymentMeans/cbc:PaymentMeansCode = 58 or 59) + + + + + + [BR-NL-19] The use of a tax currency code (cbc:TaxCurrencyCode) is not recommended + + + [BR-NL-20] The use of a tax point date (cbc:TaxPointDate) is not recommended, and its value will be ignored + + + [BR-NL-21] The use of a tax point date code (cac:InvoicePeriod/cbc:DescriptionCode) is not recommended, and its value will be ignored + + + + + [BR-NL-24] The use of a preceding invoice issue date (cac:BillingReference/cac:InvoiceDocumentReference/cbc:IssueDate) is not recommended + + + [BR-NL-25] The use of a seller tax registration identifier (cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) is not recommended when the tax scheme is not VAT, since this is not applicable to suppliers in the Netherlands + + + [BR-NL-26] The use of the seller additional legal information field (cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyLegalForm) is not recommended, since this is not applicable for suppliers in the Netherlands + + + [BR-NL-27] The use of the seller address line 3 (cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:AddressLine/cbc:Line) is not recommended + + + [BR-NL-27] The use of the customer address line 3 (cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:AddressLine/cbc:Line) is not recommended + + + [BR-NL-27] The use of the tax representative address line 3 (cac:TaxRepresentativePart/cac:PostalAddress/cac:AddressLine/cbc:Line) is not recommended + + + [BR-NL-27] The use of the delivery address line 3 (cac:Delivery/cac:DeliveryLocation/cac:Address/cac:AddressLine/cbc:Line) is not recommended + + + [BR-NL-28] The use of a country subdivision (cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity) is not recommended + + + [BR-NL-28] The use of a country subdivision (cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity) is not recommended + + + [BR-NL-28] The use of a country subdivision (cac:TaxRepresentativePart/cac:PostalAddress/cbc:CountrySubentity) is not recommended + + + [BR-NL-28] The use of a country subdivision (cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:CountrySubentity) is not recommended + + + [BR-NL-29] The use of a payment means text (cac:PaymentMeans/cbc:PaymentMeansCode/@name) is not recommended + + + [BR-NL-30] The use of a payment account name (cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:Name) is not recommended + + + [BR-NL-32] The use of an allowance reason code (cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) is not recommended + + + [BR-NL-32] The use of an allowance reason code (cac:InvoiceLine/cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) is not recommended + + + [BR-NL-32] The use of an allowance reason code (cac:CreditNoteLine/cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) is not recommended + + + + [BR-NL-33] The use of a tax total in accounting currency (cac:TaxTotal/cbc:TaxAmount/@currencyID different than DocumentCurrencyCode) is not recommended + + + [BR-NL-34] The use of a charge reason code (cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) is not recommended + + + [BR-NL-34] The use of a charge reason code (cac:InvoiceLine/cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) is not recommended + + + [BR-NL-34] The use of a charge reason code (cac:CreditNoteLine/cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) is not recommended + + + [BR-NL-35] The use of a tax exemption reason code (cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:TaxExemptionReasonCode) is not recommended + + diff --git a/tools/build_all_linux.sh b/tools/build_all_linux.sh index 8993cdc..3b4ab36 100755 --- a/tools/build_all_linux.sh +++ b/tools/build_all_linux.sh @@ -5,7 +5,7 @@ ./tools/convert_linux.sh schematron/si-ubl-1.1.sch xsl/si-ubl-1.1.xsl ./tools/convert_linux.sh schematron/si-ubl-1.2.sch xsl/si-ubl-1.2.xsl ./tools/convert_linux.sh schematron/si-ubl-1.2-purchaseorder.sch xsl/si-ubl-1.2-purchaseorder.xsl -./tools/convert_linux.sh schematron/si-ubl-2.0.2.sch xsl/si-ubl-2.0.2.xsl +./tools/convert_linux.sh schematron/si-ubl-2.0.sch xsl/si-ubl-2.0.xsl ./tools/convert_linux.sh schematron/si-ubl-2.0-ext-gaccount.sch xsl/si-ubl-2.0-ext-gaccount.xsl #saxon-xslt -o documentation/si-ubl-1.0/si-ubl-1.0-inv-rules-overview.html xsl/si-ubl-1.0.xsl tools/convert_xsl/rules-overview.xsl diff --git a/xsl/si-ubl-2.0.2.xsl b/xsl/si-ubl-2.0.xsl similarity index 99% rename from xsl/si-ubl-2.0.2.xsl rename to xsl/si-ubl-2.0.xsl index 1f399d1..b17d63d 100644 --- a/xsl/si-ubl-2.0.2.xsl +++ b/xsl/si-ubl-2.0.xsl @@ -16542,7 +16542,7 @@ - +