feat(validation): Implement EN16931 compliance validation types and VAT categories
- Added validation types for EN16931 compliance in `validation.types.ts`, including interfaces for `ValidationResult`, `ValidationOptions`, and `ValidationReport`. - Introduced `VATCategoriesValidator` in `vat-categories.validator.ts` to validate VAT categories according to EN16931 rules, including detailed checks for standard, zero-rated, exempt, reverse charge, intra-community, export, and out-of-scope services. - Enhanced `IEInvoiceMetadata` interface in `en16931-metadata.ts` to include additional fields required for full standards compliance, such as delivery information, payment information, allowances, and charges. - Implemented helper methods for VAT calculations and validation logic to ensure accurate compliance with EN16931 standards.
This commit is contained in:
7
assets/schematron/EN16931-CII-v1.3.14.meta.json
Normal file
7
assets/schematron/EN16931-CII-v1.3.14.meta.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"source": "EN16931-CII",
|
||||
"version": "1.3.14",
|
||||
"url": "https://github.com/ConnectingEurope/eInvoicing-EN16931/raw/master/cii/schematron/EN16931-CII-validation.sch",
|
||||
"format": "CII",
|
||||
"downloadDate": "2025-08-11T11:05:40.209Z"
|
||||
}
|
45
assets/schematron/EN16931-CII-v1.3.14.sch
Normal file
45
assets/schematron/EN16931-CII-v1.3.14.sch
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Licensed under European Union Public Licence (EUPL) version 1.2.
|
||||
|
||||
-->
|
||||
<!--
|
||||
|
||||
CII syntax binding to the TC434
|
||||
-->
|
||||
<schema xmlns="http://purl.oclc.org/dsdl/schematron"
|
||||
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
|
||||
xmlns:ccts="urn:un:unece:uncefact:documentation:standard:CoreComponentsTechnicalSpecification:2"
|
||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
|
||||
xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"
|
||||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||
queryBinding="xslt2">
|
||||
<title>EN16931 model bound to CII</title>
|
||||
<ns prefix="rsm" uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"/>
|
||||
<ns prefix="ccts" uri="urn:un:unece:uncefact:documentation:standard:CoreComponentsTechnicalSpecification:2"/>
|
||||
<ns prefix="udt" uri="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"/>
|
||||
<ns prefix="qdt" uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"/>
|
||||
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
|
||||
<ns prefix="xs" uri="http://www.w3.org/2001/XMLSchema"/>
|
||||
<phase id="EN16931-model-phase">
|
||||
<active pattern="EN16931-CII-Model"/>
|
||||
</phase>
|
||||
<phase id="codelist_phase">
|
||||
<active pattern="EN16931-Codes"/>
|
||||
</phase>
|
||||
<phase id="syntax_phase">
|
||||
<active pattern="EN16931-CII-Syntax"/>
|
||||
</phase>
|
||||
<!-- Abstract CEN BII patterns -->
|
||||
<!-- ========================= -->
|
||||
<include href="abstract/EN16931-CII-model.sch"/>
|
||||
<include href="abstract/EN16931-CII-syntax.sch"/>
|
||||
<!-- Data Binding parameters -->
|
||||
<!-- ======================= -->
|
||||
<include href="CII/EN16931-CII-model.sch"/>
|
||||
<include href="CII/EN16931-CII-syntax.sch"/>
|
||||
<!-- Code Lists Binding rules -->
|
||||
<!-- ======================== -->
|
||||
<include href="codelist/EN16931-CII-codes.sch"/>
|
||||
</schema>
|
7
assets/schematron/EN16931-EDIFACT-v1.3.14.meta.json
Normal file
7
assets/schematron/EN16931-EDIFACT-v1.3.14.meta.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"source": "EN16931-EDIFACT",
|
||||
"version": "1.3.14",
|
||||
"url": "https://github.com/ConnectingEurope/eInvoicing-EN16931/raw/master/edifact/schematron/EN16931-EDIFACT-validation.sch",
|
||||
"format": "CII",
|
||||
"downloadDate": "2025-08-11T11:05:40.547Z"
|
||||
}
|
35
assets/schematron/EN16931-EDIFACT-v1.3.14.sch
Normal file
35
assets/schematron/EN16931-EDIFACT-v1.3.14.sch
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Licensed under European Union Public Licence (EUPL) version 1.2.
|
||||
|
||||
-->
|
||||
<!--
|
||||
|
||||
EDIFACT syntax binding to the EN16931
|
||||
Author: Andreas Pelekies
|
||||
Timestamp: 2016-10-31 00:00:00 +0200
|
||||
-->
|
||||
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
|
||||
<title>EN16931 model bound to EDIFACT</title>
|
||||
<phase id="EN16931-model-phase">
|
||||
<active pattern="EN16931-EDIFACT-Model"/>
|
||||
</phase>
|
||||
<phase id="codelist_phase">
|
||||
<active pattern="EN16931-Codes"/>
|
||||
</phase>
|
||||
<phase id="syntax_phase">
|
||||
<active pattern="EN16931-EDIFACT-Syntax"/>
|
||||
</phase>
|
||||
<!-- Abstract CEN BII patterns -->
|
||||
<!-- ========================= -->
|
||||
<include href="abstract/EN16931-EDIFACT-model.sch"/>
|
||||
<include href="abstract/EN16931-EDIFACT-syntax.sch"/>
|
||||
<!-- Data Binding parameters -->
|
||||
<!-- ======================= -->
|
||||
<include href="EDIFACT/EN16931-EDIFACT-model.sch"/>
|
||||
<include href="EDIFACT/EN16931-EDIFACT-syntax.sch"/>
|
||||
<!-- Code Lists Binding rules -->
|
||||
<!-- ======================== -->
|
||||
<include href="codelist/EN16931-EDIFACT-codes.sch"/>
|
||||
</schema>
|
7
assets/schematron/EN16931-UBL-v1.3.14.meta.json
Normal file
7
assets/schematron/EN16931-UBL-v1.3.14.meta.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"source": "EN16931-UBL",
|
||||
"version": "1.3.14",
|
||||
"url": "https://github.com/ConnectingEurope/eInvoicing-EN16931/raw/master/ubl/schematron/EN16931-UBL-validation.sch",
|
||||
"format": "UBL",
|
||||
"downloadDate": "2025-08-11T11:05:39.868Z"
|
||||
}
|
34
assets/schematron/EN16931-UBL-v1.3.14.sch
Normal file
34
assets/schematron/EN16931-UBL-v1.3.14.sch
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Licensed under European Union Public Licence (EUPL) version 1.2.
|
||||
|
||||
-->
|
||||
<schema xmlns="http://purl.oclc.org/dsdl/schematron" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cn="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" xmlns:UBL="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" queryBinding="xslt2">
|
||||
<title>EN16931 model bound to UBL</title>
|
||||
<ns prefix="ext" uri="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"/>
|
||||
<ns prefix="cbc" uri="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"/>
|
||||
<ns prefix="cac" uri="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"/>
|
||||
<ns prefix="qdt" uri="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2"/>
|
||||
<ns prefix="udt" uri="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2"/>
|
||||
<ns prefix="cn" uri="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2"/>
|
||||
<ns prefix="ubl" uri="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"/>
|
||||
<ns prefix="xs" uri="http://www.w3.org/2001/XMLSchema"/>
|
||||
<phase id="EN16931model_phase">
|
||||
<active pattern="UBL-model"/>
|
||||
</phase>
|
||||
<phase id="codelist_phase">
|
||||
<active pattern="Codesmodel"/>
|
||||
</phase>
|
||||
<!-- Abstract CEN BII patterns -->
|
||||
<!-- ========================= -->
|
||||
<include href="abstract/EN16931-model.sch"/>
|
||||
<include href="abstract/EN16931-syntax.sch"/>
|
||||
<!-- Data Binding parameters -->
|
||||
<!-- ======================= -->
|
||||
<include href="UBL/EN16931-UBL-model.sch"/>
|
||||
<include href="UBL/EN16931-UBL-syntax.sch"/>
|
||||
<!-- Code Lists Binding rules -->
|
||||
<!-- ======================== -->
|
||||
<include href="codelist/EN16931-UBL-codes.sch"/>
|
||||
</schema>
|
7
assets/schematron/PEPPOL-EN16931-UBL-v3.0.17.meta.json
Normal file
7
assets/schematron/PEPPOL-EN16931-UBL-v3.0.17.meta.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"source": "PEPPOL-EN16931-UBL",
|
||||
"version": "3.0.17",
|
||||
"url": "https://github.com/OpenPEPPOL/peppol-bis-invoice-3/raw/master/rules/sch/PEPPOL-EN16931-UBL.sch",
|
||||
"format": "UBL",
|
||||
"downloadDate": "2025-08-11T11:05:40.954Z"
|
||||
}
|
1150
assets/schematron/PEPPOL-EN16931-UBL-v3.0.17.sch
Normal file
1150
assets/schematron/PEPPOL-EN16931-UBL-v3.0.17.sch
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user