diff --git a/.gitignore b/.gitignore index 7f60c7b8..d2c4c6db 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,6 @@ hs_err_pid* .project *.iml target/ +target-cii/ +target-ubl/ zz* diff --git a/README.md b/README.md index af4e9978..e2319e2f 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,11 @@ Derivative work created from https://github.com/ConnectingEurope/eInvoicing-EN16 That was Licensed under the Apache License, Version 2.0 # News and noteworthy + +* v1.3.6a - 2021-08-03 (UBL and CII only) + * This contains a fix for BR-CO-15 as required by XRechnung 2.1.1 - when https://github.com/ConnectingEurope/eInvoicing-EN16931/pull/292 is merged, the next XRechnung release can be again based on the official rule release. No further hot fixes are assumed. * v1.3.6 - 2021-05-31 (UBL and CII only) + * See all fixed issues: https://github.com/ConnectingEurope/eInvoicing-EN16931/issues?q=is%3Aissue+is%3Aclosed+milestone%3Av1.3.6 * Hot fix to support country codes 1A - Kosovo and XI - United Kingdom (Northern Ireland) in rule BR-CO-09 * v1.3.5 - 2021-03-29 (UBL and CII only) * See all fixed issues: https://github.com/ConnectingEurope/eInvoicing-EN16931/issues?q=is%3Aissue+is%3Aclosed+milestone%3Av1.3.5 diff --git a/buildconfig-cii.xml b/buildconfig-cii.xml index ecefb77a..131e7f9c 100644 --- a/buildconfig-cii.xml +++ b/buildconfig-cii.xml @@ -9,6 +9,7 @@ CEN TC434 CII cii/examples + test/cii tc434-cii diff --git a/buildconfig-ubl.xml b/buildconfig-ubl.xml index efaba00e..08688931 100644 --- a/buildconfig-ubl.xml +++ b/buildconfig-ubl.xml @@ -8,8 +8,8 @@ CEN TC434 UBL - ubl/examples - test/testfiles + ubl/examples + test/testfiles test/Invoice-unit-UBL test/CreditNote-unit-UBL @@ -18,7 +18,7 @@ TC434 UBL Invoice Invoice::urn:cen.eu:en16931:2017 ubl-invoice-2.1 - + @@ -26,7 +26,7 @@ TC434 UBL Credit Note CreditNote::urn:cen.eu:en16931:2017 ubl-creditnote-2.1 - + @@ -34,7 +34,7 @@ TC434 UBL Example Invoice::urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 ubl-invoice-2.1 - + @@ -42,7 +42,7 @@ TC434 UBL Example CreditNote::urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 ubl-creditnote-2.1 - + diff --git a/cii/schematron/CII/EN16931-CII-model.sch b/cii/schematron/CII/EN16931-CII-model.sch index b5acae10..3cc93862 100644 --- a/cii/schematron/CII/EN16931-CII-model.sch +++ b/cii/schematron/CII/EN16931-CII-model.sch @@ -5,7 +5,6 @@ --> - @@ -81,7 +80,22 @@ ((xs:decimal(ram:TaxBasisTotalAmount) = round((xs:decimal(ram:LineTotalAmount) + xs:decimal(ram:ChargeTotalAmount)) *10 * 10) div 100) and not (ram:AllowanceTotalAmount)) or ((xs:decimal(ram:TaxBasisTotalAmount) = round((xs:decimal(ram:LineTotalAmount)) *10 * 10) div 100) and not (ram:ChargeTotalAmount) and not (ram:AllowanceTotalAmount))"/> - + + diff --git a/cii/schematron/EN16931-CII-validation.sch b/cii/schematron/EN16931-CII-validation.sch index f6024293..ef94fb84 100644 --- a/cii/schematron/EN16931-CII-validation.sch +++ b/cii/schematron/EN16931-CII-validation.sch @@ -8,7 +8,6 @@ CII syntax binding to the TC434 Author: Andreas Pelekies - Timestamp: 2017-07-30 00:00:00 +0200 --> - [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). diff --git a/cii/schematron/abstract/EN16931-CII-syntax.sch b/cii/schematron/abstract/EN16931-CII-syntax.sch index 5d1eb1af..28bbc8ed 100644 --- a/cii/schematron/abstract/EN16931-CII-syntax.sch +++ b/cii/schematron/abstract/EN16931-CII-syntax.sch @@ -5,53 +5,52 @@ --> - - - [CII-SR-001] - SpecifiedTransactionID should not be present - [CII-SR-002] - TestIndicator should not be present - [CII-SR-003] - BusinessProcessSpecifiedDocumentContextParameter should exist maximum once - [CII-SR-006] - BIMSpecifiedDocumentContextParameter should not be present - [CII-SR-007] - ScenarioSpecifiedDocumentContextParameter should not be present - [CII-SR-008] - ApplicationSpecifiedDocumentContextParameter should not be present - [CII-SR-009] - GuidelineSpecifiedDocumentContextParameter must exist exactly once - [CII-SR-010] - ID must exist exactly once - [CII-SR-011] - SubsetSpecifiedDocumentContextParameter should not be present - [CII-SR-012] - MessageStandardSpecifiedDocumentContextParameter should not be present - - - [CII-SR-013] - Name should not be present - [CII-SR-014] - TypeCode must exist exactly once - [CII-SR-015] - DateTime should not be present - [CII-SR-016] - CopyIndicator should not be present - [CII-SR-017] - Purpose should not be present - [CII-SR-018] - ControlRequirementIndicator should not be present - [CII-SR-019] - LanguageID should not be present - [CII-SR-020] - PurposeCode should not be present - [CII-SR-021] - RevisionDateTime should not be present - [CII-SR-022] - VersionID should not be present - [CII-SR-023] - GlobalID should not be present - [CII-SR-024] - RevisionID should not be present - [CII-SR-025] - PreviousRevisionID should not be present - [CII-SR-026] - CategoryCode should not be present - [CII-SR-027] - Subject should not be present - [CII-SR-028] - ContentCode should not be present - - [CII-SR-032] - ID should not be present - [CII-SR-033] - EffectiveSpecifiedPeriod should not be present - [CII-SR-034] - IssuerTradeParty should not be present - - - [CII-SR-030] - Content should exist maximum once - - - [CII-SR-035] - DescriptionCode should not be present - [CII-SR-036] - ParentLineID should not be present - [CII-SR-037] - LineStatusCode should not be present - [CII-SR-038] - LineStatusReasonCode should not be present - - [CII-SR-221] - IncludedSubordinateTradeLineItem should not be present - + + [CII-SR-001] - SpecifiedTransactionID should not be present + [CII-SR-002] - TestIndicator should not be present + [CII-SR-003] - BusinessProcessSpecifiedDocumentContextParameter should exist maximum once + [CII-SR-006] - BIMSpecifiedDocumentContextParameter should not be present + [CII-SR-007] - ScenarioSpecifiedDocumentContextParameter should not be present + [CII-SR-008] - ApplicationSpecifiedDocumentContextParameter should not be present + [CII-SR-009] - GuidelineSpecifiedDocumentContextParameter must exist exactly once + [CII-SR-010] - ID must exist exactly once + [CII-SR-011] - SubsetSpecifiedDocumentContextParameter should not be present + [CII-SR-012] - MessageStandardSpecifiedDocumentContextParameter should not be present + + + [CII-SR-013] - Name should not be present + [CII-SR-014] - TypeCode must exist exactly once + [CII-SR-015] - DateTime should not be present + [CII-SR-016] - CopyIndicator should not be present + [CII-SR-017] - Purpose should not be present + [CII-SR-018] - ControlRequirementIndicator should not be present + [CII-SR-019] - LanguageID should not be present + [CII-SR-020] - PurposeCode should not be present + [CII-SR-021] - RevisionDateTime should not be present + [CII-SR-022] - VersionID should not be present + [CII-SR-023] - GlobalID should not be present + [CII-SR-024] - RevisionID should not be present + [CII-SR-025] - PreviousRevisionID should not be present + [CII-SR-026] - CategoryCode should not be present + [CII-SR-027] - Subject should not be present + [CII-SR-028] - ContentCode should not be present + + [CII-SR-032] - ID should not be present + [CII-SR-033] - EffectiveSpecifiedPeriod should not be present + [CII-SR-034] - IssuerTradeParty should not be present + + + [CII-SR-030] - Content should exist maximum once + + + [CII-SR-035] - DescriptionCode should not be present + [CII-SR-036] - ParentLineID should not be present + [CII-SR-037] - LineStatusCode should not be present + [CII-SR-038] - LineStatusReasonCode should not be present + + [CII-SR-221] - IncludedSubordinateTradeLineItem should not be present + [CII-SR-039] - IncludedNote should exist maximum once [CII-SR-040] - Content should exist maximum once @@ -61,75 +60,75 @@ [CII-SR-044] - Subject should not be present - [CII-SR-045] - ID should not be present - [CII-SR-046] - schemeID must be present if GlobalID is present - - [CII-SR-048] - ManufacturerAssignedID should not be present - [CII-SR-049] - TradeName should not be present - [CII-SR-050] - TypeCode should not be present - [CII-SR-051] - NetWeightMeasure should not be present - [CII-SR-052] - GrossWeightMeasure should not be present - [CII-SR-053] - ProductGroupID should not be present - [CII-SR-054] - EndItemTypeCode should not be present - [CII-SR-055] - EndItemName should not be present - [CII-SR-056] - AreaDensityMeasure should not be present - [CII-SR-057] - UseDescription should not be present - [CII-SR-058] - BrandName should not be present - [CII-SR-059] - SubBrandName should not be present - [CII-SR-060] - DrainedNetWeightMeasure should not be present - [CII-SR-061] - VariableMeasureIndicator should not be present - [CII-SR-062] - ColourCode should not be present - [CII-SR-063] - ColourDescription should not be present - [CII-SR-064] - Designation should not be present - [CII-SR-065] - FormattedCancellationAnnouncedLaunchDateTime should not be present - [CII-SR-066] - FormattedLatestProductDataChangeDateTime should not be present - [CII-SR-067] - ID should not be present - [CII-SR-068] - TypeCode should not be present - - [CII-SR-070] - ValueMeasure should not be present - [CII-SR-071] - MeasurementMethodCode should not be present - - [CII-SR-073] - ValueCode should not be present - [CII-SR-074] - ValueDateTime should not be present - [CII-SR-075] - ValueIndicator should not be present - [CII-SR-076] - ContentTypeCode should not be present - [CII-SR-077] - ValueSpecifiedBinaryFile should not be present - [CII-SR-078] - ApplicableProductCharacteristicCondition should not be present - [CII-SR-079] - ApplicableReferencedStandard should not be present - [CII-SR-080] - ApplicableMaterialGoodsCharacteristic should not be present - - [CII-SR-081] - SystemID should not be present - [CII-SR-082] - SystemName should not be present - [CII-SR-083] - ClassName should not be present - [CII-SR-084] - SubClassCode should not be present - [CII-SR-085] - ClassProductCharacteristic should not be present - [CII-SR-086] - ApplicableReferencedStandard should not be present - - [CII-SR-087] - IndividualTradeProductInstance should not be present - [CII-SR-088] - CertificationEvidenceReferenceReferencedDocument should not be present - [CII-SR-089] - InspectionReferenceReferencedDocument should not be present - - [CII-SR-090] - ID should exist maximum once. - [CII-SR-091] - Name should not be present - [CII-SR-092] - SubordinateTradeCountrySubDivision should not be present - - [CII-SR-093] - LinearSpatialDimension should not be present - [CII-SR-094] - MinimumLinearSpatialDimension should not be present - [CII-SR-095] - MaximumLinearSpatialDimension should not be present - [CII-SR-096] - ManufacturerTradeParty should not be present - [CII-SR-097] - PresentationSpecifiedBinaryFile should not be present - [CII-SR-098] - MSDSReferenceReferencedDocument should not be present - [CII-SR-099] - AdditionalReferenceReferencedDocument should not be present - [CII-SR-100] - LegalRightsOwnerTradeParty should not be present - [CII-SR-101] - BrandOwnerTradeParty should not be present - [CII-SR-102] - IncludedReferencedProduct should not be present - [CII-SR-103] - InformationNote should not be present - + [CII-SR-045] - ID should not be present + [CII-SR-046] - schemeID must be present if GlobalID is present + + [CII-SR-048] - ManufacturerAssignedID should not be present + [CII-SR-049] - TradeName should not be present + [CII-SR-050] - TypeCode should not be present + [CII-SR-051] - NetWeightMeasure should not be present + [CII-SR-052] - GrossWeightMeasure should not be present + [CII-SR-053] - ProductGroupID should not be present + [CII-SR-054] - EndItemTypeCode should not be present + [CII-SR-055] - EndItemName should not be present + [CII-SR-056] - AreaDensityMeasure should not be present + [CII-SR-057] - UseDescription should not be present + [CII-SR-058] - BrandName should not be present + [CII-SR-059] - SubBrandName should not be present + [CII-SR-060] - DrainedNetWeightMeasure should not be present + [CII-SR-061] - VariableMeasureIndicator should not be present + [CII-SR-062] - ColourCode should not be present + [CII-SR-063] - ColourDescription should not be present + [CII-SR-064] - Designation should not be present + [CII-SR-065] - FormattedCancellationAnnouncedLaunchDateTime should not be present + [CII-SR-066] - FormattedLatestProductDataChangeDateTime should not be present + [CII-SR-067] - ID should not be present + [CII-SR-068] - TypeCode should not be present + + [CII-SR-070] - ValueMeasure should not be present + [CII-SR-071] - MeasurementMethodCode should not be present + + [CII-SR-073] - ValueCode should not be present + [CII-SR-074] - ValueDateTime should not be present + [CII-SR-075] - ValueIndicator should not be present + [CII-SR-076] - ContentTypeCode should not be present + [CII-SR-077] - ValueSpecifiedBinaryFile should not be present + [CII-SR-078] - ApplicableProductCharacteristicCondition should not be present + [CII-SR-079] - ApplicableReferencedStandard should not be present + [CII-SR-080] - ApplicableMaterialGoodsCharacteristic should not be present + + [CII-SR-081] - SystemID should not be present + [CII-SR-082] - SystemName should not be present + [CII-SR-083] - ClassName should not be present + [CII-SR-084] - SubClassCode should not be present + [CII-SR-085] - ClassProductCharacteristic should not be present + [CII-SR-086] - ApplicableReferencedStandard should not be present + + [CII-SR-087] - IndividualTradeProductInstance should not be present + [CII-SR-088] - CertificationEvidenceReferenceReferencedDocument should not be present + [CII-SR-089] - InspectionReferenceReferencedDocument should not be present + + [CII-SR-090] - ID should exist maximum once. + [CII-SR-091] - Name should not be present + [CII-SR-092] - SubordinateTradeCountrySubDivision should not be present + + [CII-SR-093] - LinearSpatialDimension should not be present + [CII-SR-094] - MinimumLinearSpatialDimension should not be present + [CII-SR-095] - MaximumLinearSpatialDimension should not be present + [CII-SR-096] - ManufacturerTradeParty should not be present + [CII-SR-097] - PresentationSpecifiedBinaryFile should not be present + [CII-SR-098] - MSDSReferenceReferencedDocument should not be present + [CII-SR-099] - AdditionalReferenceReferencedDocument should not be present + [CII-SR-100] - LegalRightsOwnerTradeParty should not be present + [CII-SR-101] - BrandOwnerTradeParty should not be present + [CII-SR-102] - IncludedReferencedProduct should not be present + [CII-SR-103] - InformationNote should not be present + [CII-SR-069] - Description should exist maximum once. [CII-SR-072] - Value should exist maximum once. - + [CII-SR-104] - BuyerReference should not be present [CII-SR-105] - BuyerRequisitionerTradeParty should not be present [CII-SR-106] - ApplicableTradeDeliveryTerms should not be present @@ -163,8 +162,8 @@ [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-445] - IncludedTradeTax should not be present + [CII-SR-132] - ValiditySpecifiedPeriod should not be present [CII-SR-133] - DeliveryTradeLocation should not be present [CII-SR-134] - TradeComparisonReferencePrice should not be present [CII-SR-135] - AssociatedReferencedDocument should not be present @@ -176,7 +175,7 @@ [CII-SR-140] - ChangeReason should not be present [CII-SR-141] - OrderUnitConversionFactorNumeric should not be present [CII-SR-142] - AppliedTradeAllowanceCharge should not be present - [CII-SR-446] - IncludedTradeTax should not be present + [CII-SR-446] - IncludedTradeTax should not be present [CII-SR-143] - ValiditySpecifiedPeriod should not be present [CII-SR-144] - DeliveryTradeLocation should not be present [CII-SR-145] - TradeComparisonReferencePrice should not be present @@ -187,10 +186,10 @@ [CII-SR-148] - ItemSellerTradeParty should not be present [CII-SR-149] - ItemBuyerTradeParty should not be present [CII-SR-150] - IncludedSpecifiedMarketplace should not be present - [CII-SR-447] - UltimateCustomerOrderReferencedDocument should not be present + [CII-SR-447] - UltimateCustomerOrderReferencedDocument should not be present - - + + [CII-SR-151] - RequestedQuantity should not be present [CII-SR-152] - ReceivedQuantity should not be present [CII-SR-153] - ChargeFreeQuantity should not be present @@ -267,7 +266,7 @@ [CII-SR-219] - SalesSpecifiedTradeAccountingAccount should not be present [CII-SR-220] - SpecifiedTradeSettlementFinancialCard should not be present - + [CII-SR-442] - Reference should not be present [CII-SR-222] - RoleCode should not be present @@ -370,7 +369,6 @@ [CII-SR-307] - Description should not be present [CII-SR-448] - UltimateCustomerOrderReferencedDocument should not be present [CII-SR-450] - Only one buyer identifier should be present (either the ID or the Global ID) - [CII-SR-308] - RelatedSupplyChainConsignment should not be present @@ -523,132 +521,132 @@ [CII-SR-419] - NetLineTotalAmount should not be present [CII-SR-420] - NetIncludingTaxesLineTotalAmount should not be present - - [CII-DT-013] - languageID should not be present - [CII-DT-014] - languageLocaleID should not be present + + [CII-DT-013] - languageID should not be present + [CII-DT-014] - languageLocaleID should not be present - [CII-SR-438] - ValuationBreakdownStatement should not be present - - - [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-SR-438] - ValuationBreakdownStatement should not be present + + + [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-005] - schemeID should not be present + [CII-DT-006] - schemeAgencyID should not be present [CII-DT-007] - schemeVersionID should not be present - - - [CII-DT-008] - name should not be present - [CII-DT-009] - listURI should not be present - + + + [CII-DT-008] - name should not be present + [CII-DT-009] - listURI should not be present + - [CII-DT-010] - listID should not be present - [CII-DT-011] - listAgencyID should not be present - [CII-DT-012] - listVersionID should not be present - + [CII-DT-010] - listID should not be present + [CII-DT-011] - listAgencyID should not be present + [CII-DT-012] - listVersionID should not be present + [CII-DT-045] - @listID should not be present [CII-DT-046] - @listAgencyID should not be present [CII-DT-047] - @listVersionID should not be present [CII-DT-048] - @listURI should not be present - - [CII-DT-015] - URIID should not be present - [CII-DT-016] - StatusCode should not be present - [CII-DT-017] - CopyIndicator should not be present - [CII-DT-018] - TypeCode should not be present - [CII-DT-019] - GlobalID should not be present - [CII-DT-020] - RevisionID should not be present - [CII-DT-021] - Name should not be present - [CII-DT-022] - AttachmentBinaryObject should not be present - [CII-DT-023] - Information should not be present - [CII-DT-024] - ReferenceTypeCode should not be present - [CII-DT-025] - SectionName should not be present - [CII-DT-026] - PreviousRevisionID should not be present - [CII-DT-027] - FormattedIssueDateTime should not be present - [CII-DT-028] - EffectiveSpecifiedPeriod should not be present - [CII-DT-029] - IssuerTradeParty should not be present - [CII-DT-030] - AttachedSpecifiedBinaryFile should not be present - - - [CII-DT-031] - currencyID should not be present - [CII-DT-032] - currencyCodeListVersionID should not be present + + [CII-DT-015] - URIID should not be present + [CII-DT-016] - StatusCode should not be present + [CII-DT-017] - CopyIndicator should not be present + [CII-DT-018] - TypeCode should not be present + [CII-DT-019] - GlobalID should not be present + [CII-DT-020] - RevisionID should not be present + [CII-DT-021] - Name should not be present + [CII-DT-022] - AttachmentBinaryObject should not be present + [CII-DT-023] - Information should not be present + [CII-DT-024] - ReferenceTypeCode should not be present + [CII-DT-025] - SectionName should not be present + [CII-DT-026] - PreviousRevisionID should not be present + [CII-DT-027] - FormattedIssueDateTime should not be present + [CII-DT-028] - EffectiveSpecifiedPeriod should not be present + [CII-DT-029] - IssuerTradeParty should not be present + [CII-DT-030] - AttachedSpecifiedBinaryFile should not be present + + + [CII-DT-031] - currencyID should not be present + [CII-DT-032] - currencyCodeListVersionID should not be present - [CII-DT-033] - unitCode should not be present - [CII-DT-034] - unitCodeListID should not be present - [CII-DT-035] - unitCodeListAgencyID should not be present - [CII-DT-036] - unitCodeListAgencyName should not be present + [CII-DT-033] - unitCode should not be present + [CII-DT-034] - unitCodeListID should not be present + [CII-DT-035] - unitCodeListAgencyID should not be present + [CII-DT-036] - unitCodeListAgencyName should not be present - [CII-DT-037] - TypeCode shall be 'VAT' - [CII-DT-038] - CalculatedRate should not be present - [CII-DT-039] - CalculationSequenceNumeric should not be present - [CII-DT-040] - BasisQuantity should not be present - [CII-DT-041] - BasisAmount should not be present - [CII-DT-042] - UnitBasisAmount should not be present - [CII-DT-043] - LineTotalBasisAmount should not be present - [CII-DT-044] - AllowanceChargeBasisAmount should not be present - [CII-DT-049] - CurrencyCode should not be present - [CII-DT-050] - Jurisdiction should not be present - [CII-DT-051] - CustomsDutyIndicator should not be present - [CII-DT-052] - ExemptionReasonCode should not be present - [CII-DT-098] - ExemptionReason should not be present - [CII-DT-053] - TaxBasisAllowanceRate should not be present - [CII-DT-054] - TaxPointDate should not be present - [CII-DT-055] - Type should not be present - [CII-DT-056] - InformationAmount should not be present - [CII-DT-057] - CategoryName should not be present - [CII-DT-058] - DueDateTypeCode should not be present - [CII-DT-059] - @format should not be present - [CII-DT-060] - SpecifiedTradeAccountingAccount should not be present - [CII-DT-061] - ServiceSupplyTradeCountry should not be present - [CII-DT-062] - BuyerRepayableTaxSpecifiedTradeAccountingAccount should not be present - [CII-DT-063] - SellerPayableTaxSpecifiedTradeAccountingAccount should not be present - [CII-DT-064] - SellerRefundableTaxSpecifiedTradeAccountingAccount should not be present - [CII-DT-065] - BuyerDeductibleTaxSpecifiedTradeAccountingAccount should not be present - [CII-DT-066] - BuyerNonDeductibleTaxSpecifiedTradeAccountingAccount should not be present - [CII-DT-067] - PlaceApplicableTradeLocation should not be present + [CII-DT-037] - TypeCode shall be 'VAT' + [CII-DT-038] - CalculatedRate should not be present + [CII-DT-039] - CalculationSequenceNumeric should not be present + [CII-DT-040] - BasisQuantity should not be present + [CII-DT-041] - BasisAmount should not be present + [CII-DT-042] - UnitBasisAmount should not be present + [CII-DT-043] - LineTotalBasisAmount should not be present + [CII-DT-044] - AllowanceChargeBasisAmount should not be present + [CII-DT-049] - CurrencyCode should not be present + [CII-DT-050] - Jurisdiction should not be present + [CII-DT-051] - CustomsDutyIndicator should not be present + [CII-DT-052] - ExemptionReasonCode should not be present + [CII-DT-098] - ExemptionReason should not be present + [CII-DT-053] - TaxBasisAllowanceRate should not be present + [CII-DT-054] - TaxPointDate should not be present + [CII-DT-055] - Type should not be present + [CII-DT-056] - InformationAmount should not be present + [CII-DT-057] - CategoryName should not be present + [CII-DT-058] - DueDateTypeCode should not be present + [CII-DT-059] - @format should not be present + [CII-DT-060] - SpecifiedTradeAccountingAccount should not be present + [CII-DT-061] - ServiceSupplyTradeCountry should not be present + [CII-DT-062] - BuyerRepayableTaxSpecifiedTradeAccountingAccount should not be present + [CII-DT-063] - SellerPayableTaxSpecifiedTradeAccountingAccount should not be present + [CII-DT-064] - SellerRefundableTaxSpecifiedTradeAccountingAccount should not be present + [CII-DT-065] - BuyerDeductibleTaxSpecifiedTradeAccountingAccount should not be present + [CII-DT-066] - BuyerNonDeductibleTaxSpecifiedTradeAccountingAccount should not be present + [CII-DT-067] - PlaceApplicableTradeLocation should not be present - [CII-DT-068] - DateTime shall not be used. - [CII-DT-069] - DurationMeasure shall not be used. - [CII-DT-070] - InclusiveIndicator shall not be used. - [CII-DT-071] - Description shall not be used. - [CII-DT-072] - DateTime shall not be used. - [CII-DT-073] - CompleteDateTime shall not be used. - [CII-DT-074] - OpenIndicator shall not be used. - [CII-DT-075] - SeasonCode shall not be used. - [CII-DT-076] - ID shall not be used. - [CII-DT-077] - Name shall not be used. - [CII-DT-078] - SequenceNumeric shall not be used. - [CII-DT-079] - StartDateFlexibilityCode shall not be used. - [CII-DT-080] - ContinuousIndicator shall not be used. - [CII-DT-081] - PurposeCode shall not be used. - - - [CII-DT-082] - ID shall not be used. - [CII-DT-083] - PostOfficeBox shall not be used. - [CII-DT-084] - BuildingName shall not be used. - [CII-DT-086] - LineFour shall not be used. - [CII-DT-087] - LineFive shall not be used. - [CII-DT-088] - StreetName shall not be used. - [CII-DT-089] - CitySubDivisionName shall not be used. - [CII-DT-090] - CountryName shall not be used. - [CII-DT-091] - CountrySubDivisionID shall not be used. - [CII-DT-092] - AttentionOf shall not be used. - [CII-DT-093] - CareOf shall not be used. - [CII-DT-094] - BuildingNumber shall not be used. - [CII-DT-095] - DepartmentName shall not be used. - [CII-DT-096] - AdditionalStreetName shall not be used. - + [CII-DT-068] - DateTime shall not be used. + [CII-DT-069] - DurationMeasure shall not be used. + [CII-DT-070] - InclusiveIndicator shall not be used. + [CII-DT-071] - Description shall not be used. + [CII-DT-072] - DateTime shall not be used. + [CII-DT-073] - CompleteDateTime shall not be used. + [CII-DT-074] - OpenIndicator shall not be used. + [CII-DT-075] - SeasonCode shall not be used. + [CII-DT-076] - ID shall not be used. + [CII-DT-077] - Name shall not be used. + [CII-DT-078] - SequenceNumeric shall not be used. + [CII-DT-079] - StartDateFlexibilityCode shall not be used. + [CII-DT-080] - ContinuousIndicator shall not be used. + [CII-DT-081] - PurposeCode shall not be used. + + + [CII-DT-082] - ID shall not be used. + [CII-DT-083] - PostOfficeBox shall not be used. + [CII-DT-084] - BuildingName shall not be used. + [CII-DT-086] - LineFour shall not be used. + [CII-DT-087] - LineFive shall not be used. + [CII-DT-088] - StreetName shall not be used. + [CII-DT-089] - CitySubDivisionName shall not be used. + [CII-DT-090] - CountryName shall not be used. + [CII-DT-091] - CountrySubDivisionID shall not be used. + [CII-DT-092] - AttentionOf shall not be used. + [CII-DT-093] - CareOf shall not be used. + [CII-DT-094] - BuildingNumber shall not be used. + [CII-DT-095] - DepartmentName shall not be used. + [CII-DT-096] - AdditionalStreetName shall not be used. + [CII-DT-097] - Date time string with format attribute 102 shall be YYYYMMDD. diff --git a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch index 8822321d..56e9f1b1 100644 --- a/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch +++ b/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch @@ -89,7 +89,7 @@ [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-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110). + [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". [BR-Z-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 "Zero rated" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Zero rated". diff --git a/cii/xslt/EN16931-CII-validation.xslt b/cii/xslt/EN16931-CII-validation.xslt index 89a230aa..a4af6047 100644 --- a/cii/xslt/EN16931-CII-validation.xslt +++ b/cii/xslt/EN16931-CII-validation.xslt @@ -1050,9 +1050,9 @@ - + - + BR-CO-15 fatal diff --git a/en16931-cii-1.3.6a.zip b/en16931-cii-1.3.6a.zip new file mode 100644 index 00000000..95055d36 Binary files /dev/null and b/en16931-cii-1.3.6a.zip differ diff --git a/en16931-ubl-1.3.6a.zip b/en16931-ubl-1.3.6a.zip new file mode 100644 index 00000000..4cf3d2de Binary files /dev/null and b/en16931-ubl-1.3.6a.zip differ diff --git a/pom-preprocess.xml b/pom-preprocess.xml index 38a57b98..05179019 100644 --- a/pom-preprocess.xml +++ b/pom-preprocess.xml @@ -29,7 +29,7 @@ com.helger.maven ph-schematron-maven-plugin - 6.0.2 + 6.2.1 cii @@ -41,6 +41,7 @@ ${basedir}/cii/schematron/preprocessed/EN16931-CII-validation-preprocessed.sch + ubl diff --git a/pom-validate.xml b/pom-validate.xml index 086117e2..f7cab15e 100644 --- a/pom-validate.xml +++ b/pom-validate.xml @@ -29,7 +29,7 @@ com.helger.maven ph-schematron-maven-plugin - 6.0.2 + 6.2.1 cii diff --git a/pom-xslt.xml b/pom-xslt.xml index 74f8f397..0fb0ccea 100644 --- a/pom-xslt.xml +++ b/pom-xslt.xml @@ -29,7 +29,7 @@ com.helger.maven ph-schematron-maven-plugin - 6.0.2 + 6.2.1 @@ -44,7 +44,6 @@ edifact @@ -55,6 +54,7 @@ ${basedir}/edifact/xslt +--> diff --git a/run-tests-cii.cmd b/run-tests-cii.cmd new file mode 100644 index 00000000..1569bd1e --- /dev/null +++ b/run-tests-cii.cmd @@ -0,0 +1,13 @@ +@echo off + +echo running CII tests +docker run --rm -it -v %CD%:/src difi/vefa-validator build -x -t -p cii /src +if errorlevel 1 goto error + +goto end + +:error +echo An error occurred in validation +pause + +:end diff --git a/run-tests-ubl.cmd b/run-tests-ubl.cmd new file mode 100644 index 00000000..e27ce0e8 --- /dev/null +++ b/run-tests-ubl.cmd @@ -0,0 +1,13 @@ +@echo off + +echo running UBL tests +docker run --rm -it -v %CD%:/src difi/vefa-validator build -x -t -p ubl /src +if errorlevel 1 goto error + +goto end + +:error +echo An error occurred in validation +pause + +:end diff --git a/test/CreditNote-unit-UBL/BR-CO-15-2.xml b/test/CreditNote-unit-UBL/BR-CO-15-2.xml new file mode 100644 index 00000000..996c487b --- /dev/null +++ b/test/CreditNote-unit-UBL/BR-CO-15-2.xml @@ -0,0 +1,90 @@ + + + + + BR-CO-15 + + + + Verify that CreditNote total amount with VAT = CreditNote total amount without VAT + CreditNote total VAT amount, when there exists TaxCurrency != Document Currency + BR-CO-15 + + + DKK + EUR + + + 675.00 + + + 628.62 + + + 4000.00 + 4675.00 + 4675.00 + + + + + + + + Verify that CreditNote total amount with VAT = CreditNote total amount without VAT + CreditNote total VAT amount, when there exists TaxCurrency != Document Currency + BR-CO-15 + + + DKK + NOK + + + 700.00 + + + 715 + + + 5000.00 + 5700.00 + 5700.00 + + + + + + + Trigger error if an CreditNote total amount with VAT != CreditNote total amount without VAT + CreditNote total VAT amount, when there exists TaxCurrency != Document Currency + BR-CO-15 + + + NOK + DKK + + + 700.00 + + + 715 + + + 5000.00 + 5700.00 + 5700.00 + + + + + diff --git a/test/CreditNote-unit-UBL/BR-CO-15.xml b/test/CreditNote-unit-UBL/BR-CO-15.xml new file mode 100644 index 00000000..fe9c525b --- /dev/null +++ b/test/CreditNote-unit-UBL/BR-CO-15.xml @@ -0,0 +1,186 @@ + + + + + BR-CO-15 + + + + Verify that CreditNote total amount with VAT = CreditNote total amount without VAT + CreditNote total VAT amount. + BR-CO-15 + + + NOK + + 300 + + + + 1000 + 1300 + + + + + + + + Verify that CreditNote total amount with VAT = CreditNote total amount without VAT + CreditNote total VAT amount. + BR-CO-15 + + + NOK + + 300 + + + + -100 + 200 + + + + + + + Verify that CreditNote total amount with VAT = CreditNote total amount without VAT + CreditNote total VAT amount. + BR-CO-15 + + + NOK + + 100 + + + + -100 + 0.0 + + + + + + + Verify that CreditNote total amount with VAT = CreditNote total amount without VAT + CreditNote total VAT amount. + BR-CO-15 + + + NOK + NOK + + 0 + + + + 0.00 + 0.0 + + + + + + + + Trigger error if CreditNote total amount with VAT != CreditNote total amount without VAT + CreditNote total VAT amount + BR-CO-15 + + + NOK + + 250 + + + + 1000.00 + 1250.01 + + + + + + + + Trigger error if CreditNote total amount with VAT != CreditNote total amount without VAT + CreditNote total VAT amount + BR-CO-15 + + + NOK + + 0 + + + + 1000.00 + 1250.00 + + + + + + + Trigger error if CreditNote total amount with VAT != CreditNote total amount without VAT + CreditNote total VAT amount + BR-CO-15 + + + NOK + + 100 + + + + -100.00 + 0.01 + + + + + + + Trigger error if different tax amounts of the same currency are available + BR-CO-15 + + + EUR + + 700.00 + + + 715 + + + 5000.00 + 5700.00 + 5700.00 + + + + + diff --git a/test/Invoice-unit-UBL/BR-CO-15.xml b/test/Invoice-unit-UBL/BR-CO-15.xml index e6688e7a..3fc62a62 100644 --- a/test/Invoice-unit-UBL/BR-CO-15.xml +++ b/test/Invoice-unit-UBL/BR-CO-15.xml @@ -159,4 +159,29 @@ + + + + Trigger error if different tax amounts of the same currency are available + BR-CO-15 + + + EUR + + 700.00 + + + 715 + + + 5000.00 + 5700.00 + 5700.00 + + + + diff --git a/test/cii/BR-CO-15-2.xml b/test/cii/BR-CO-15-2.xml new file mode 100644 index 00000000..b20f81cf --- /dev/null +++ b/test/cii/BR-CO-15-2.xml @@ -0,0 +1,111 @@ + + + + + BR-CO-15 + + + + Verify that Invoice total amount with VAT = Invoice total amount without VAT + Invoice total VAT amount, when there exists TaxCurrency != Document Currency + BR-CO-15 + + + + + DKK + EUR + + 4000.00 + 675.00 + 628.62 + 4675.00 + 4675.00 + + + + + + + + + Trigger error if an Invoice total amount with VAT != Invoice total amount without VAT + Invoice total VAT amount, when there exists TaxCurrency != Document Currency + BR-CO-15 + + + + + DKK + EUR + + 4000.00 + 1675.00 + 628.62 + 4675.00 + 4675.00 + + + + + + + + + Trigger error if Tax Total currency != Document Currency + BR-CO-15 + + + + + DKK + + 4000.00 + 675.00 + 4675.00 + 4675.00 + + + + + + + + + Trigger error if Tax Total currency of Document Currency occurs more than once + BR-CO-15 + + + + + DKK + + 4000.00 + 675.00 + 679.00 + 4675.00 + 4675.00 + + + + + + diff --git a/ubl/schematron/EN16931-UBL-validation.sch b/ubl/schematron/EN16931-UBL-validation.sch index 0a83d47b..4bd7dd6f 100644 --- a/ubl/schematron/EN16931-UBL-validation.sch +++ b/ubl/schematron/EN16931-UBL-validation.sch @@ -4,12 +4,6 @@ Licensed under European Union Public Licence (EUPL) version 1.2. --> - EN16931 model bound to UBL diff --git a/ubl/schematron/UBL/EN16931-UBL-model.sch b/ubl/schematron/UBL/EN16931-UBL-model.sch index ecae4a35..990f4cbc 100644 --- a/ubl/schematron/UBL/EN16931-UBL-model.sch +++ b/ubl/schematron/UBL/EN16931-UBL-model.sch @@ -3,9 +3,7 @@ Licensed under European Union Public Licence (EUPL) version 1.2. --> - - @@ -75,7 +73,7 @@ - + diff --git a/ubl/schematron/UBL/EN16931-UBL-syntax.sch b/ubl/schematron/UBL/EN16931-UBL-syntax.sch index 903dcdf7..b4fa3058 100644 --- a/ubl/schematron/UBL/EN16931-UBL-syntax.sch +++ b/ubl/schematron/UBL/EN16931-UBL-syntax.sch @@ -3,9 +3,7 @@ Licensed under European Union Public Licence (EUPL) version 1.2. --> - - diff --git a/ubl/schematron/abstract/EN16931-model.sch b/ubl/schematron/abstract/EN16931-model.sch index 9599916f..a57eb292 100644 --- a/ubl/schematron/abstract/EN16931-model.sch +++ b/ubl/schematron/abstract/EN16931-model.sch @@ -3,9 +3,7 @@ Licensed under European Union Public Licence (EUPL) version 1.2. --> - - [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). diff --git a/ubl/schematron/abstract/EN16931-syntax.sch b/ubl/schematron/abstract/EN16931-syntax.sch index bebe6c0f..d00ccec6 100644 --- a/ubl/schematron/abstract/EN16931-syntax.sch +++ b/ubl/schematron/abstract/EN16931-syntax.sch @@ -3,9 +3,7 @@ Licensed under European Union Public Licence (EUPL) version 1.2. --> - - [UBL-SR-42]-Party tax scheme shall occur maximum twice in accounting supplier party diff --git a/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch b/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch index f7fbcb28..2ed4fc82 100644 --- a/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch +++ b/ubl/schematron/preprocessed/EN16931-UBL-validation-preprocessed.sch @@ -94,7 +94,7 @@ [BR-AE-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Reverse charge" 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) and the Buyer VAT identifier (BT-48) and/or the Buyer legal registration identifier (BT-47). [BR-AE-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Reverse charge" 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) and the Buyer VAT identifier (BT-48) and/or the Buyer legal registration identifier (BT-47). [BR-CO-03]-Value added tax point date (BT-7) and Value added tax point date code (BT-8) are mutually exclusive. - [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-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110). [BR-CO-18]-An Invoice shall at least have one VAT breakdown group (BG-23). [BR-DEC-13]-The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2. [BR-DEC-15]-The allowed maximum number of decimals for the Invoice total VAT amount in accounting currency (BT-111) is 2. diff --git a/ubl/xslt/EN16931-UBL-validation.xslt b/ubl/xslt/EN16931-UBL-validation.xslt index 6a1aaa1b..3e05af87 100644 --- a/ubl/xslt/EN16931-UBL-validation.xslt +++ b/ubl/xslt/EN16931-UBL-validation.xslt @@ -1094,9 +1094,9 @@ - + - + BR-CO-15 fatal diff --git a/update-xslt-and-validate.cmd b/update-xslt-and-validate.cmd index 2703d1d7..bb03495b 100644 --- a/update-xslt-and-validate.cmd +++ b/update-xslt-and-validate.cmd @@ -1,6 +1,6 @@ @echo off -rem preprocess first - catches errors quickers +rem preprocess first - catches errors quicker call mvn -f pom-preprocess.xml generate-resources if errorlevel 1 goto error @@ -16,7 +16,7 @@ rem validate afterwards call mvn -f pom-validate.xml validate if errorlevel 1 goto error -echo Sucessfully done +echo Successfully done goto end :error diff --git a/update-xslt-and-validate.sh b/update-xslt-and-validate.sh index 1898a872..0d3923f2 100644 --- a/update-xslt-and-validate.sh +++ b/update-xslt-and-validate.sh @@ -1,6 +1,6 @@ #!/bin/sh -# preprocess first - catches errors quickers +# preprocess first - catches errors quicker mvn -f pom-preprocess.xml generate-resources || exit 1 # convert to XSLT - takes forever @@ -12,4 +12,4 @@ mvn -f pom-license.xml license:format || exit 1 # validate afterwards mvn -f pom-validate.xml validate || exit 1 -echo "Sucessfully done" +echo "Successfully done"