From f7fae7672963e5d41f057051b43985ebfd6a57ab Mon Sep 17 00:00:00 2001 From: Stefan Wienert Date: Wed, 27 Nov 2024 15:54:29 +0000 Subject: [PATCH] Chore: Factur-X Version updated - Refac: also changed factur-x folder for future updates Process for updating - download ZUGFeRD zip here https://www.ferd-net.de/standards/paket-downloads/index.html - unzip, copy folder factur-x content into schemas --- lib/secretariat/validator.rb | 6 +- .../Factur-X_1.07.2_EN16931.sch} | 136 +++++++++--------- .../Factur-X_1.07.2_EN16931.xsd} | 6 +- .../Factur-X_1.07.2_EN16931_codedb.xml} | 38 ++++- ...t_data_standard_QualifiedDataType_100.xsd} | 0 ...ggregateBusinessInformationEntity_100.xsd} | 4 +- ...data_standard_UnqualifiedDataType_100.xsd} | 0 7 files changed, 113 insertions(+), 77 deletions(-) rename schemas/{factur-x_1.0.0.7/Factur-X_1.0.07_EN16931.sch => factur-x_1/Factur-X_1.07.2_EN16931.sch} (96%) rename schemas/{factur-x_1.0.0.7/Factur-X_1.0.07_EN16931.xsd => factur-x_1/Factur-X_1.07.2_EN16931.xsd} (84%) rename schemas/{factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_codedb.xml => factur-x_1/Factur-X_1.07.2_EN16931_codedb.xml} (96%) rename schemas/{factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd => factur-x_1/Factur-X_1.07.2_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd} (100%) rename schemas/{factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_urn_un_unece_uncefact_data_standard_RABIE_100.xsd => factur-x_1/Factur-X_1.07.2_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd} (97%) rename schemas/{factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd => factur-x_1/Factur-X_1.07.2_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd} (100%) diff --git a/lib/secretariat/validator.rb b/lib/secretariat/validator.rb index 2f65811..d2625b5 100644 --- a/lib/secretariat/validator.rb +++ b/lib/secretariat/validator.rb @@ -25,17 +25,17 @@ class ValidatorError < StandardError; end class Validator SCHEMATRON = [ '../../schemas/zugferd_1/ZUGFeRD1p0.sch', - '../../schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931.sch' + '../../schemas/factur-x_1/Factur-X_1.07.2_EN16931.sch' ] SCHEMA = [ '../../schemas/zugferd_1/ZUGFeRD1p0.xsd', - '../../schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931.xsd' + '../../schemas/factur-x_1/Factur-X_1.07.2_EN16931.xsd' ] SCHEMA_DIR = [ '../../schemas/zugferd_1', - '../../schemas/factur-x_1.0.0.7/' + '../../schemas/factur-x_1/' ] attr_accessor :doc, :version diff --git a/schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931.sch b/schemas/factur-x_1/Factur-X_1.07.2_EN16931.sch similarity index 96% rename from schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931.sch rename to schemas/factur-x_1/Factur-X_1.07.2_EN16931.sch index d2d70fd..359c453 100644 --- a/schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931.sch +++ b/schemas/factur-x_1/Factur-X_1.07.2_EN16931.sch @@ -2,7 +2,7 @@ - Schema for Factur-X; 1.0.07; EN16931-COMPLIANT (FULLY) + Schema for Factur-X; 1.07.2; EN16931-COMPLIANT (FULLY) @@ -133,7 +133,7 @@ [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-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2. @@ -261,7 +261,7 @@ [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). - + [BR-AG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero. @@ -333,7 +333,7 @@ [BR-AG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) 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-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero. @@ -421,12 +421,16 @@ [BR-CO-27]-Either the IBAN or a Proprietary ID (BT-84) shall be used. + + + + [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-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-16) information is provided in the Invoice. - - [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. @@ -561,7 +565,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. @@ -670,7 +674,7 @@ - + Value of 'ram:SubjectCode' is not allowed. @@ -695,14 +699,14 @@ - + Value of '@format' is not allowed. - + Value of 'ram:TypeCode' is not allowed. @@ -735,7 +739,7 @@ - + Value of 'ram:ID' is not allowed. @@ -806,14 +810,14 @@ - + Value of 'ram:ReferenceTypeCode' is not allowed. - + Value of 'ram:TypeCode' is not allowed. @@ -870,7 +874,7 @@ - + Value of 'ram:TypeCode' is not allowed. @@ -903,7 +907,7 @@ - + Value of '@mimeCode' is not allowed. @@ -934,7 +938,7 @@ - + Value of 'ram:TypeCode' is not allowed. @@ -1061,7 +1065,7 @@ - + Value of '@schemeID' is not allowed. @@ -1082,7 +1086,7 @@ - + Value of 'ram:CountryID' is not allowed. @@ -1101,7 +1105,7 @@ - + Value of '@schemeID' is not allowed. @@ -1120,7 +1124,7 @@ - + Value of '@schemeID' is not allowed. @@ -1145,7 +1149,7 @@ - + Value of '@schemeID' is not allowed. @@ -1302,7 +1306,7 @@ - + Value of 'ram:CountryID' is not allowed. @@ -1339,7 +1343,7 @@ - + Value of '@schemeID' is not allowed. @@ -1406,7 +1410,7 @@ - + Value of '@schemeID' is not allowed. @@ -1427,7 +1431,7 @@ - + Value of 'ram:CountryID' is not allowed. @@ -1446,7 +1450,7 @@ - + Value of '@schemeID' is not allowed. @@ -1501,7 +1505,7 @@ - + Value of '@schemeID' is not allowed. @@ -1532,7 +1536,7 @@ - + Value of '@format' is not allowed. @@ -1673,7 +1677,7 @@ - + Value of '@schemeID' is not allowed. @@ -1694,7 +1698,7 @@ - + Value of 'ram:CountryID' is not allowed. @@ -1771,21 +1775,21 @@ - + Value of 'ram:CategoryCode' is not allowed. - + Value of 'ram:DueDateTypeCode' is not allowed. - + Value of 'ram:ExemptionReasonCode' is not allowed. @@ -1810,14 +1814,14 @@ - + Value of '@format' is not allowed. - + Value of 'ram:TypeCode' is not allowed. @@ -1830,7 +1834,7 @@ - + Value of '@format' is not allowed. @@ -1843,7 +1847,7 @@ - + Value of '@format' is not allowed. @@ -1856,7 +1860,7 @@ - + Value of 'ram:InvoiceCurrencyCode' is not allowed. @@ -1883,7 +1887,7 @@ - + Value of '@format' is not allowed. @@ -1954,7 +1958,7 @@ - + Value of '@schemeID' is not allowed. @@ -1973,7 +1977,7 @@ - + Value of '@schemeID' is not allowed. @@ -2052,7 +2056,7 @@ - + Value of 'ram:CategoryCode' is not allowed. @@ -2083,14 +2087,14 @@ - + Value of 'ram:TypeCode' is not allowed. - + Value of 'ram:ReasonCode' is not allowed. @@ -2139,7 +2143,7 @@ - + Value of 'ram:CategoryCode' is not allowed. @@ -2170,14 +2174,14 @@ - + Value of 'ram:TypeCode' is not allowed. - + Value of 'ram:ReasonCode' is not allowed. @@ -2204,7 +2208,7 @@ - + Value of '@format' is not allowed. @@ -2283,7 +2287,7 @@ - + Value of '@currencyID' is not allowed. @@ -2296,7 +2300,7 @@ - + Value of '@currencyID' is not allowed. @@ -2373,14 +2377,14 @@ - + Value of 'ram:TypeCode' is not allowed. - + Value of 'ram:TaxCurrencyCode' is not allowed. @@ -2537,7 +2541,7 @@ - + Value of '@unitCode' is not allowed. @@ -2562,7 +2566,7 @@ - + Value of '@unitCode' is not allowed. @@ -2587,7 +2591,7 @@ - + Value of '@unitCode' is not allowed. @@ -2644,14 +2648,14 @@ - + Value of 'ram:ReferenceTypeCode' is not allowed. - + Value of 'ram:TypeCode' is not allowed. @@ -2684,7 +2688,7 @@ - + Value of 'ram:CategoryCode' is not allowed. @@ -2715,7 +2719,7 @@ - + Value of 'ram:TypeCode' is not allowed. @@ -2728,7 +2732,7 @@ - + Value of '@format' is not allowed. @@ -2741,7 +2745,7 @@ - + Value of '@format' is not allowed. @@ -2786,7 +2790,7 @@ - + Value of 'ram:ReasonCode' is not allowed. @@ -2819,7 +2823,7 @@ - + Value of 'ram:ReasonCode' is not allowed. @@ -2866,7 +2870,7 @@ - + Value of '@listID' is not allowed. @@ -2879,7 +2883,7 @@ - + Value of '@schemeID' is not allowed. @@ -2892,7 +2896,7 @@ - + Value of 'ram:ID' is not allowed. diff --git a/schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931.xsd b/schemas/factur-x_1/Factur-X_1.07.2_EN16931.xsd similarity index 84% rename from schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931.xsd rename to schemas/factur-x_1/Factur-X_1.07.2_EN16931.xsd index aee4909..4e1bd3a 100644 --- a/schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931.xsd +++ b/schemas/factur-x_1/Factur-X_1.07.2_EN16931.xsd @@ -6,9 +6,9 @@ xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" targetNamespace="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" elementFormDefault="qualified"> - - - + + + diff --git a/schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_codedb.xml b/schemas/factur-x_1/Factur-X_1.07.2_EN16931_codedb.xml similarity index 96% rename from schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_codedb.xml rename to schemas/factur-x_1/Factur-X_1.07.2_EN16931_codedb.xml index 493e688..00cbbc3 100644 --- a/schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_codedb.xml +++ b/schemas/factur-x_1/Factur-X_1.07.2_EN16931_codedb.xml @@ -692,6 +692,14 @@ + + + + + + + + @@ -4561,6 +4569,14 @@ + + + + + + + + @@ -4788,6 +4804,14 @@ + + + + + + + + @@ -4805,6 +4829,7 @@ + @@ -4836,6 +4861,7 @@ + @@ -4969,7 +4995,6 @@ - @@ -5062,6 +5087,7 @@ + @@ -5086,6 +5112,7 @@ + @@ -5207,6 +5234,8 @@ + + @@ -5222,6 +5251,7 @@ + @@ -5506,7 +5536,6 @@ - @@ -5599,6 +5628,7 @@ + @@ -5623,6 +5653,7 @@ + @@ -5687,7 +5718,6 @@ - @@ -5780,6 +5810,7 @@ + @@ -5804,6 +5835,7 @@ + diff --git a/schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd b/schemas/factur-x_1/Factur-X_1.07.2_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd similarity index 100% rename from schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd rename to schemas/factur-x_1/Factur-X_1.07.2_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd diff --git a/schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_urn_un_unece_uncefact_data_standard_RABIE_100.xsd b/schemas/factur-x_1/Factur-X_1.07.2_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd similarity index 97% rename from schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_urn_un_unece_uncefact_data_standard_RABIE_100.xsd rename to schemas/factur-x_1/Factur-X_1.07.2_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd index 431afdc..8e7375f 100644 --- a/schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_urn_un_unece_uncefact_data_standard_RABIE_100.xsd +++ b/schemas/factur-x_1/Factur-X_1.07.2_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd @@ -5,8 +5,8 @@ xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" targetNamespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" elementFormDefault="qualified"> - - + + diff --git a/schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd b/schemas/factur-x_1/Factur-X_1.07.2_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd similarity index 100% rename from schemas/factur-x_1.0.0.7/Factur-X_1.0.07_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd rename to schemas/factur-x_1/Factur-X_1.07.2_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd