diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fbc8ca4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# Preserve official FeRD artifact bytes, including original line endings. +src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/** -text +src/pax.XRechnung.NET.tests/Resources/zugferd/** -text diff --git a/README.md b/README.md index 71851b7..2814cc1 100644 --- a/README.md +++ b/README.md @@ -101,26 +101,112 @@ public static InvoiceBaseDto GetInvoiceBaseDto() var xmlText = XmlInvoiceWriter.Serialize(xmlInvoice); ``` -**Validate schematron - requires [Kosit validator](#java-schematron-validator)** +**Validate schema and Schematron locally (.NET and Blazor WASM)** ```csharp var invoiceBaseDto = GetInvoiceBaseDto(); var mapper = new InvoiceMapper(); XmlInvoice xmlInvoice = mapper.ToXml(invoiceBaseDto); var result = await XmlInvoiceValidator.ValidateSchematron(xmlInvoice); - var resultText = string.Join(Environment.NewLine, result.Validations.Select(s => $"{s.Severity}:\t{s.Message}")); - Assert.IsTrue(result.Validations.Count == 0, resultText); + var resultText = string.Join(Environment.NewLine, result.Validations.Select(s => $"{s.RuleSeverity}:\t{s.Code}: {s.Message}")); Assert.IsTrue(result.IsValid, resultText); ``` **The InvoiceBaseDto is designed to be easily extended see [BaseDtoExtensionTests](src/pax.XRechnung.NET.tests/BaseDtoExtensionTests.cs)** +`ValidateSchematron` now runs locally when no server URI is supplied. It supports +standard XRechnung 3.0 UBL Invoice documents with customization ID +`urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0`. +The embedded rules are pinned to KoSIT configuration **2026-08-31**, using +EN 16931 **1.3.16** and XRechnung Schematron **2.6.0**. Extension, CVD, UBL +CreditNote, CII, and other profiles require an external validator. + +The validator uses **[The Saxon XSLT and XQuery Processor from Saxonica Limited](https://www.saxonica.com/)** +(SaxonCS-HE 13.0.0). It works offline after application assets load and caches +compiled stylesheets. `Code`, `Path`, and `RuleSeverity` preserve business-rule +details. Warnings and information do not invalidate an invoice. Because +`XmlSeverityType` has only Error and Warning, informational messages have +`Severity == Warning` and `RuleSeverity == "information"`. Processing failures +set `Error`; ordinary rule failures appear in `Validations`. Local results have +an empty `HttpStatusCode`. + +Release-published, trimmed .NET 10 Blazor WASM was tested in Chromium, including +validation with networking disabled. This is not a guarantee for all browsers +or AOT builds. The measured cold validation took about **10.7 seconds**, and +cached validations about **100 ms**, for the small test fixture on this machine. +The validation executes on the calling thread, so cold compilation can block +the browser UI. The probe's framework assets total **13.4 MB Brotli-compressed**, +compared with **2.5 MB** for a minimal matching Blazor app. These are artifact +sizes, not measured BeInX download sizes. See [the reproducible browser probe](tools/Validator.WasmProbe/README.md). + +For a consumer such as BeInX, invoke `ValidateSchematron(invoice)` even when the +configured server URL is empty. If an external validator is configured, pass +its URI explicitly: + +```csharp +var result = await XmlInvoiceValidator.ValidateSchematron( + xmlInvoice, + string.IsNullOrWhiteSpace(config.SchematronValidationUri) + ? null + : new Uri(config.SchematronValidationUri)); +``` + +This library change does not modify BeInX's export flow. That flow currently +skips Schematron validation when no server URL is configured. + +## ZUGFeRD XML validation (EN16931 / Comfort) + +```csharp +var xml = GetGeneratedCiiXml(); +var result = ZugferdXmlValidator.Validate(xml); +if (!result.IsValid) +{ + var details = result.Error ?? string.Join(Environment.NewLine, + result.Validations.Select(m => $"{m.Code}: {m.Message} ({m.Path})")); + // Report the errors before passing this exact XML to PDF generation. +} +``` + +This API validates CII with guideline ID `urn:cen.eu:en16931:2017` against +**ZUGFeRD 2.3.3 / Factur-X 1.07.3 EN16931**. Other profiles and syntaxes are +rejected. Validation checks the profile XSD first, then its compiled Schematron +XSLT and code lists; it runs locally on .NET and Blazor WASM. Compiled resources +are cached and each call uses its own validation state. Warnings do not reject +invoices; processing failures set `Error`. No invoice data leaves the process. + +All normative artifacts and the test fixture come directly from the official +FeRD `ZF233_EN_01.zip`. Official filenames, relative paths, import paths, and +bytes are preserved. The complete schema dependency closure and six embedded +resource hashes are verified. See [provenance and licenses](src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/PROVENANCE.md) +and [offline browser measurements](tools/Validator.WasmProbe/README.md). + +This API validates the XML only. It does not certify the PDF carrier, upgrade +an invoice writer, or apply XRechnung/Peppol CIUS rules to the Comfort profile. + ## Java Schematron Validator -Requires a running [Kosit](https://github.com/itplr-kosit/validator) validation server. Setup: [xrechnung usage](https://github.com/itplr-kosit/validator-configuration-xrechnung/blob/master/docs/usage.md) +External validation remains available through an explicit URI, or directly +through `InvoiceKositValidator.Validate(xmlText)`, whose default is still +`http://localhost:8080`. It requires a running [KoSIT](https://github.com/itplr-kosit/validator) +validation server. Setup: [XRechnung usage](https://github.com/itplr-kosit/validator-configuration-xrechnung/blob/master/docs/usage.md). + +```csharp +var result = await XmlInvoiceValidator.ValidateSchematron( + xmlInvoice, new Uri("http://localhost:9090")); +``` + +The supplied URI must expose KoSIT's raw XML/HTML response; a JSON API wrapper +requires its own client. Browser HTTP validation also requires the server to +permit the application's origin through CORS. Server start: `java -jar .\validationtool-1.5.0-standalone.jar -s .\scenarios.xml -r ${PWD} -D` # ChangeLog +
v0.3.3 + +>- Add local ZUGFeRD 2.3.3 / Factur-X 1.07.3 EN16931 (Comfort) XML validation using untouched official FeRD schemas, compiled XSLT, and code lists. Includes offline browser verification and pinned artifact hashes. + +
+
v0.3.2 >- Update to dotnet 10 diff --git a/src/pax.XRechnung.NET.tests/HttpValidationTests.cs b/src/pax.XRechnung.NET.tests/HttpValidationTests.cs new file mode 100644 index 0000000..6f13bce --- /dev/null +++ b/src/pax.XRechnung.NET.tests/HttpValidationTests.cs @@ -0,0 +1,42 @@ +using System.Net; +using System.Net.Sockets; +using System.Text; + +namespace pax.XRechnung.NET.tests; + +[TestClass] +public sealed class HttpValidationTests +{ + [TestMethod] + public async Task ExplicitUriUsesHttpAndPreservesDetailedFailure() + { + using var listener = new TcpListener(IPAddress.Loopback, 0); + listener.Start(); + var endpoint = (IPEndPoint)listener.LocalEndpoint; + var responseTask = Respond(listener); + var result = await XmlInvoiceValidator.ValidateSchematron("", new Uri($"http://127.0.0.1:{endpoint.Port}/")); + await responseTask; + Assert.IsFalse(result.IsValid); + Assert.AreEqual("OK", result.HttpStatusCode); + Assert.HasCount(1, result.Validations); + Assert.AreEqual("TEST-ERROR", result.Validations.Single().Code); + Assert.AreEqual("/Invoice", result.Validations.Single().Path); + Assert.IsNull(result.Error); + } + + private static async Task Respond(TcpListener listener) + { + using var client = await listener.AcceptTcpClientAsync(); + await using var stream = client.GetStream(); + using var reader = new StreamReader(stream, Encoding.UTF8, leaveOpen: true); + Assert.AreEqual("POST / HTTP/1.1", await reader.ReadLineAsync()); + while (!string.IsNullOrEmpty(await reader.ReadLineAsync())) { } + const string html = "
Step
Rules100
" + + "" + + "
Messages
1TEST-ERRORERRORRejected by reference
Pfad: /Invoice
"; + var body = Encoding.UTF8.GetBytes(html); + var headers = Encoding.ASCII.GetBytes($"HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nContent-Length: {body.Length}\r\nConnection: close\r\n\r\n"); + await stream.WriteAsync(headers); + await stream.WriteAsync(body); + } +} diff --git a/src/pax.XRechnung.NET.tests/LocalValidationTests.cs b/src/pax.XRechnung.NET.tests/LocalValidationTests.cs new file mode 100644 index 0000000..70dfa18 --- /dev/null +++ b/src/pax.XRechnung.NET.tests/LocalValidationTests.cs @@ -0,0 +1,160 @@ +using System.Reflection; +using System.Xml.Linq; +using System.Xml.Schema; + +namespace pax.XRechnung.NET.tests; + +[TestClass] +public sealed class LocalValidationTests +{ + private static readonly XNamespace Cbc = XmlInvoiceWriter.CommonBasicComponents; + private static readonly XNamespace Cac = XmlInvoiceWriter.CommonAggregateComponents; + + private static XDocument Invoice() + { + using var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream( + "pax.XRechnung.NET.tests.Resources.standard.01.01a-INVOICE_ubl.xml")!; + return XDocument.Load(stream); + } + + public static IEnumerable InvoiceResources => Assembly.GetExecutingAssembly() + .GetManifestResourceNames().Where(n => n.Contains(".Resources.standard.", StringComparison.Ordinal) && n.EndsWith(".xml", StringComparison.Ordinal)) + .Select(n => new object[] { n }); + + [TestMethod] + [DynamicData(nameof(InvoiceResources))] + public async Task ValidatesStandardFixtures(string name) + { + using var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name)!; + using var reader = new StreamReader(stream); + var result = await XmlInvoiceValidator.ValidateSchematron(await reader.ReadToEndAsync()); + Assert.IsTrue(result.IsValid, result.Error ?? string.Join("\n", result.Validations.Select(m => m.Message))); + } + + [TestMethod] + public async Task ValidInvoiceDoesNotRequireHttp() + { + var result = await XmlInvoiceValidator.ValidateSchematron(Invoice().ToString()); + Assert.IsTrue(result.IsValid, result.Error); + Assert.AreEqual(string.Empty, result.HttpStatusCode); + Assert.Contains("2026-08-31", result.Conformity!); + Assert.IsTrue(result.Validations.All(m => m.RuleSeverity == "information")); + } + + [TestMethod] + public async Task ReportsBusinessRuleCodesAndPaths() + { + var xml = Invoice(); + xml.Descendants(Cbc + "BuyerReference").Remove(); + var result = await XmlInvoiceValidator.ValidateSchematron(xml.ToString()); + Assert.IsFalse(result.IsValid); + var message = result.Validations.Single(m => m.Code == "BR-DE-15"); + Assert.AreEqual(XmlSeverityType.Error, message.Severity); + Assert.IsFalse(string.IsNullOrWhiteSpace(message.Path)); + Assert.IsNull(result.Error); + } + + [TestMethod] + public async Task ReportsIncorrectTotals() + { + var xml = Invoice(); + xml.Descendants(Cac + "TaxTotal").First().Element(Cbc + "TaxAmount")!.Value = "18.00"; + var result = await XmlInvoiceValidator.ValidateSchematron(xml.ToString()); + Assert.IsFalse(result.IsValid); + Assert.IsTrue(result.Validations.Any(m => m.Code == "BR-CO-15")); + } + + [TestMethod] + public async Task InvalidCurrencyIsRejected() + { + var xml = Invoice(); + xml.Descendants(Cbc + "DocumentCurrencyCode").Single().Value = "ZZZ"; + var result = await XmlInvoiceValidator.ValidateSchematron(xml.ToString()); + Assert.IsFalse(result.IsValid); + Assert.IsTrue(result.Validations.Any(m => m.Code == "BR-CL-04")); + } + + [TestMethod] + public async Task UnitCodeOverrideRemainsAWarning() + { + var xml = Invoice(); + xml.Descendants(Cbc + "InvoicedQuantity").First().SetAttributeValue("unitCode", "ZZZ"); + var result = await XmlInvoiceValidator.ValidateSchematron(xml.ToString()); + var finding = result.Validations.Single(m => m.Code == "BR-CL-23"); + Assert.AreEqual("warning", finding.RuleSeverity); + Assert.AreEqual(XmlSeverityType.Warning, finding.Severity); + Assert.IsTrue(result.IsValid, string.Join("\n", result.Validations.Select(m => m.Message))); + } + + [TestMethod] + public async Task ItemIdentifierOverrideRemainsAWarning() + { + var xml = Invoice(); + xml.Descendants(Cac + "SellersItemIdentification").First().AddAfterSelf(new XElement(Cac + "StandardItemIdentification", + new XElement(Cbc + "ID", new XAttribute("schemeID", "ZZZ"), "example"))); + var result = await XmlInvoiceValidator.ValidateSchematron(xml.ToString()); + Assert.AreEqual("warning", result.Validations.Single(m => m.Code == "BR-CL-21").RuleSeverity); + Assert.IsTrue(result.IsValid, result.Error); + } + + [TestMethod] + public async Task SubInvoiceLineOverrideIsAnError() + { + var xml = Invoice(); + var line = xml.Descendants(Cac + "InvoiceLine").First(); + var subline = new XElement(line) { Name = Cac + "SubInvoiceLine" }; + line.Add(subline); + var result = await XmlInvoiceValidator.ValidateSchematron(xml.ToString()); + Assert.AreEqual("error", result.Validations.Single(m => m.Code == "UBL-CR-646").RuleSeverity); + Assert.IsFalse(result.IsValid); + } + + [TestMethod] + public async Task SchemaErrorsDoNotRunSchematron() + { + var xml = Invoice(); + xml.Descendants(Cbc + "IssueDate").Single().Value = "not-a-date"; + var result = await XmlInvoiceValidator.ValidateSchematron(xml.ToString()); + Assert.IsFalse(result.IsValid); + Assert.IsTrue(result.Validations.Any(m => m.Severity == XmlSeverityType.Error)); + Assert.IsTrue(result.Validations.All(m => m.Code is null)); + } + + [TestMethod] + [DataRow("")] + [DataRow("")] + [DataRow("]>&test;")] + [DataRow("")] + public async Task InvalidInputsCannotPass(string xml) + { + var result = await XmlInvoiceValidator.ValidateSchematron(xml); + Assert.IsFalse(result.IsValid); + Assert.IsFalse(string.IsNullOrWhiteSpace(result.Error)); + } + + [TestMethod] + public async Task UnsupportedCustomizationCannotPass() + { + var xml = Invoice(); + xml.Descendants(Cbc + "CustomizationID").Single().Value = "urn:cen.eu:en16931:2017"; + var result = await XmlInvoiceValidator.ValidateSchematron(xml.ToString()); + Assert.IsFalse(result.IsValid); + Assert.Contains("standard XRechnung", result.Error!); + } + + [TestMethod] + public async Task ConcurrentValidationHasIndependentState() + { + var valid = Invoice().ToString(); + var invalid = Invoice(); + invalid.Descendants(Cbc + "BuyerReference").Remove(); + var invalidText = invalid.ToString(); + var results = await Task.WhenAll(Enumerable.Range(0, 8).Select(i => + Task.Run(() => XmlInvoiceValidator.ValidateSchematron(i % 2 == 0 ? valid : invalidText)))); + for (var i = 0; i < results.Length; i++) + { + Assert.AreEqual(i % 2 == 0, results[i].IsValid, results[i].Error); + Assert.AreEqual(i % 2 != 0, results[i].Validations.Any(m => m.Code == "BR-DE-15")); + } + } +} diff --git a/src/pax.XRechnung.NET.tests/Resources/zugferd/Examples/3. EN16931/EN16931_Einfach/EN16931_Einfach.xml b/src/pax.XRechnung.NET.tests/Resources/zugferd/Examples/3. EN16931/EN16931_Einfach/EN16931_Einfach.xml new file mode 100644 index 0000000..00d0dea --- /dev/null +++ b/src/pax.XRechnung.NET.tests/Resources/zugferd/Examples/3. EN16931/EN16931_Einfach/EN16931_Einfach.xml @@ -0,0 +1,251 @@ + + + + + + + + + + + urn:cen.eu:en16931:2017 + + + + 471102 + 380 + + 20180305 + + + Rechnung gemäß Bestellung vom 01.03.2018. + + + Lieferant GmbH +Lieferantenstraße 20 +80333 München +Deutschland +Geschäftsführer: Hans Muster +Handelsregisternummer: H A 123 + + REG + + + + + + 1 + + + 4012345001235 + TB100A4 + Trennblätter A4 + + + + 9.9000 + + + 9.9000 + + + + 20.0000 + + + + VAT + S + 19.00 + + + 198.00 + + + + + + 2 + + + 4000050986428 + ARNR2 + Joghurt Banane + + + + 5.5000 + + + 5.5000 + + + + 50.0000 + + + + VAT + S + 7.00 + + + 275.00 + + + + + + 549910 + 4000001123452 + Lieferant GmbH + + 80333 + Lieferantenstraße 20 + München + DE + + + 201/113/40209 + + + DE123456789 + + + + GE2020211 + Kunden AG Mitte + + 69876 + Kundenstraße 15 + Frankfurt + DE + + + + + + + 20180305 + + + + + EUR + + 19.25 + VAT + 275.00 + S + 7.00 + + + 37.62 + VAT + 198.00 + S + 19.00 + + + Zahlbar innerhalb 30 Tagen netto bis 04.04.2018, 3% Skonto innerhalb 10 Tagen bis 15.03.2018 + + + 473.00 + 0.00 + 0.00 + 473.00 + 56.87 + 529.87 + 0.00 + 529.87 + + + + \ No newline at end of file diff --git a/src/pax.XRechnung.NET.tests/SchematronValidationTests.cs b/src/pax.XRechnung.NET.tests/SchematronValidationTests.cs index 3450c9e..437b6f7 100644 --- a/src/pax.XRechnung.NET.tests/SchematronValidationTests.cs +++ b/src/pax.XRechnung.NET.tests/SchematronValidationTests.cs @@ -7,39 +7,6 @@ namespace pax.XRechnung.NET.tests; [TestClass] public class SchematronValidationTests { - private static readonly string validatorUri = "http://localhost:8080"; - private static bool kositServerIsRunning = false; - - [ClassInitialize()] - public static async Task CheckKositAvailability(TestContext context) - { - kositServerIsRunning = await IsKositServerAvailable(); - } - - public static async Task IsKositServerAvailable(Uri? kostiUri = null) - { - if (kositServerIsRunning) - { - return true; - } - try - { - using var client = new HttpClient - { - BaseAddress = kostiUri ?? new Uri(validatorUri), - Timeout = TimeSpan.FromSeconds(5) - }; - - // Try HEAD request for fast check - var response = await client.GetAsync("/"); - return response.IsSuccessStatusCode; - } - catch - { - return false; - } - } - public static XmlInvoice GetStandardXmlInvoice() { return new() @@ -189,10 +156,7 @@ public static XmlInvoice GetStandardXmlInvoice() [TestMethod] public async Task CanProduceValidXmlInvoice() { - if (!kositServerIsRunning) - { - Assert.Inconclusive("Kosit Validator is not running on localhost:8080."); - } + XmlInvoice xmlInvoice = GetStandardXmlInvoice(); var schemaResult = XmlInvoiceValidator.Validate(xmlInvoice); @@ -200,17 +164,14 @@ public async Task CanProduceValidXmlInvoice() var result = await XmlInvoiceValidator.ValidateSchematron(xmlInvoice); var resultText = string.Join(Environment.NewLine, result.Validations.Select(s => $"{s.Severity}:\t{s.Message}")); - Assert.IsEmpty(result.Validations, resultText); + Assert.IsFalse(result.Validations.Any(m => m.RuleSeverity != "information"), resultText); Assert.IsTrue(result.IsValid, resultText); } [TestMethod] public async Task CanIdentifyXmlInvoiceValidationErrors() { - if (!kositServerIsRunning) - { - Assert.Inconclusive("Kosit Validator is not running on localhost:8080."); - } + XmlInvoice xmlInvoice = GetStandardXmlInvoice(); xmlInvoice.TaxTotal.TaxAmount.Value = 18.0m; @@ -224,26 +185,20 @@ public async Task CanIdentifyXmlInvoiceValidationErrors() [TestMethod] public async Task CanValidateBaseDtoSchematronTest() { - if (!kositServerIsRunning) - { - Assert.Inconclusive("Kosit Validator is not running on localhost:8080."); - } + var invoiceBaseDto = BaseDtoTests.GetInvoiceBaseDto(); InvoiceMapper invoiceMapper = new(); XmlInvoice xmlInvoice = invoiceMapper.ToXml(invoiceBaseDto); var result = await XmlInvoiceValidator.ValidateSchematron(xmlInvoice); var resultText = string.Join(Environment.NewLine, result.Validations.Select(s => $"{s.Severity}:\t{s.Message}")); - Assert.IsEmpty(result.Validations, resultText); + Assert.IsFalse(result.Validations.Any(m => m.RuleSeverity != "information"), resultText); Assert.IsTrue(result.IsValid, resultText); } [TestMethod] public async Task CanValidateBaseDtoSchematronWithRoundingTest() { - if (!kositServerIsRunning) - { - Assert.Inconclusive("Kosit Validator is not running on localhost:8080."); - } + var invoiceBaseDto = BaseDtoTests.GetInvoiceBaseDto(); var quantity = 1.17777; @@ -256,17 +211,14 @@ public async Task CanValidateBaseDtoSchematronWithRoundingTest() XmlInvoice xmlInvoice = invoiceMapper.ToXml(invoiceBaseDto); var result = await XmlInvoiceValidator.ValidateSchematron(xmlInvoice); var resultText = string.Join(Environment.NewLine, result.Validations.Select(s => $"{s.Severity}:\t{s.Message}")); - Assert.IsEmpty(result.Validations, resultText); + Assert.IsFalse(result.Validations.Any(m => m.RuleSeverity != "information"), resultText); Assert.IsTrue(result.IsValid, resultText); } [TestMethod] public async Task CanProduceValidInvoiceDto() { - if (!kositServerIsRunning) - { - Assert.Inconclusive("Kosit Validator is not running on localhost:8080."); - } + XmlInvoice xmlInvoice = GetStandardXmlInvoice(); InvoiceMapper invoiceMapper = new(); InvoiceBaseDto invoiceDto = invoiceMapper.FromXml(xmlInvoice); @@ -277,34 +229,28 @@ public async Task CanProduceValidInvoiceDto() var result = await XmlInvoiceValidator.ValidateSchematron(mappedXmlInvoice); var resultText = string.Join(Environment.NewLine, result.Validations.Select(s => $"{s.Severity}:\t{s.Message}")); - Assert.IsEmpty(result.Validations, resultText); + Assert.IsFalse(result.Validations.Any(m => m.RuleSeverity != "information"), resultText); Assert.IsTrue(result.IsValid, resultText); } [TestMethod] public async Task CanValidateExtendedDto() { - if (!kositServerIsRunning) - { - Assert.Inconclusive("Kosit Validator is not running on localhost:8080."); - } + var invoiceExtendedDto = BaseDtoExtensionTests.GetInvoiceBaseDto(); var mapper = new InvoiceExtendedMapper(); var xmlInvoice = mapper.ToXml(invoiceExtendedDto); var result = await XmlInvoiceValidator.ValidateSchematron(xmlInvoice); var resultText = string.Join(Environment.NewLine, result.Validations.Select(s => $"{s.Severity}:\t{s.Message}")); - Assert.IsEmpty(result.Validations, resultText); + Assert.IsFalse(result.Validations.Any(m => m.RuleSeverity != "information"), resultText); Assert.IsTrue(result.IsValid, resultText); } [TestMethod] public async Task CanProduceValidSmallBusinessXmlInvoice() { - if (!kositServerIsRunning) - { - Assert.Inconclusive("Kosit Validator is not running on localhost:8080."); - } + var dto = BaseDtoTests.GetInvoiceBaseDto(); dto.GlobalTax = 0; var mapper = new InvoiceMapper(); @@ -315,7 +261,7 @@ public async Task CanProduceValidSmallBusinessXmlInvoice() var result = await XmlInvoiceValidator.ValidateSchematron(xmlInvoice); var resultText = string.Join(Environment.NewLine, result.Validations.Select(s => $"{s.Severity}:\t{s.Message}")); - Assert.IsEmpty(result.Validations, resultText); + Assert.IsFalse(result.Validations.Any(m => m.RuleSeverity != "information"), resultText); Assert.IsTrue(result.IsValid, resultText); } -} \ No newline at end of file +} diff --git a/src/pax.XRechnung.NET.tests/ZugferdValidationTests.cs b/src/pax.XRechnung.NET.tests/ZugferdValidationTests.cs new file mode 100644 index 0000000..29bd739 --- /dev/null +++ b/src/pax.XRechnung.NET.tests/ZugferdValidationTests.cs @@ -0,0 +1,193 @@ +using System.Diagnostics.Tracing; +using System.Reflection; +using System.Security.Cryptography; +using System.Xml.Linq; +using System.Xml.Schema; + +namespace pax.XRechnung.NET.tests; + +[TestClass] +public sealed class ZugferdValidationTests +{ + private static readonly XNamespace Ram = "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"; + + [TestMethod] + public void EmbeddedArtifactsMatchOfficialHashesAndIncludeEverySchemaDependency() + { + const string prefix = "pax.XRechnung.NET.Resources.Zugferd.2.3.3.Schema/3. Factur-X_1.07.3_EN16931/"; + var expected = new Dictionary + { + ["Factur-X_1.07.3_EN16931.xsd"] = "d71afa234624a8ee03ec876caa757702806c68e2da5f77f67ae1df91964fc485", + ["Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd"] = "5a3ce756cfa8d4f2ff3165d68123cfb7fbf3c7b64664edb0de38cca64d5c413b", + ["Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd"] = "0c024357d6e5f96a0699cbb425d21bb8db4c65450ad9c265c30a8aad50c46e46", + ["Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd"] = "9590182879865144dfc6ae069ef7499defaa7d31cb62e30ccacf9146ace5306d", + ["_XSLT_EN16931/FACTUR-X_EN16931.xslt"] = "af0473fbae13ca9d46c7c70a5dc2ef95985544e779d9be8a7fc84c2555864cea", + ["_XSLT_EN16931/FACTUR-X_EN16931_codedb.xml"] = "33d04741e2970478d2e1129854b8960aef972e16e0352dd16108d35f94ad147a" + }; + var assembly = typeof(ZugferdXmlValidator).Assembly; + CollectionAssert.AreEquivalent(expected.Keys.Select(n => prefix + n).ToArray(), + assembly.GetManifestResourceNames().Where(n => n.StartsWith(prefix, StringComparison.Ordinal)).ToArray()); + foreach (var (name, hash) in expected) + { + using var stream = assembly.GetManifestResourceStream(prefix + name)!; + Assert.AreEqual(hash, Convert.ToHexString(SHA256.HashData(stream)).ToLowerInvariant(), name); + if (!name.EndsWith(".xsd", StringComparison.Ordinal)) continue; + stream.Position = 0; + XNamespace xs = "http://www.w3.org/2001/XMLSchema"; + var schema = XDocument.Load(stream); + foreach (var dependency in schema.Root!.Elements().Where(e => + e.Name == xs + "import" || e.Name == xs + "include" || e.Name == xs + "redefine")) + { + var location = (string?)dependency.Attribute("schemaLocation"); + if (location is not null) Assert.IsTrue(expected.ContainsKey(location), $"Missing dependency: {location}"); + } + } + } + + private static XDocument Invoice() + { + using var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("zugferd-invoice.xml")!; + return XDocument.Load(stream); + } + + private static void AssertValid(InvoiceValidationResult result) => Assert.IsTrue(result.IsValid, + result.Error ?? string.Join("\n", result.Validations.Select(m => $"{m.Code}: {m.Message}"))); + + [TestMethod] + public void ValidFixtureAndRepeatedCallsRequireNoHttp() + { + var xml = Invoice().ToString(); + for (var i = 0; i < 2; i++) + { + var result = ZugferdXmlValidator.Validate(xml); + AssertValid(result); + Assert.AreEqual(string.Empty, result.HttpStatusCode); + Assert.Contains("2.3.3", result.Conformity!); + } + } + + [TestMethod] + public void IncorrectTotalHasRuleCodeAndLocation() + { + var invoice = Invoice(); + invoice.Descendants(Ram + "DuePayableAmount").Single().Value = "1.00"; + var result = ZugferdXmlValidator.Validate(invoice.ToString()); + Assert.IsFalse(result.IsValid); + Assert.IsNull(result.Error); + Assert.IsTrue(result.Validations.Any(m => m.Code == "FX-SCH-A-000122" && m.Message.Contains("BR-CO-16", StringComparison.Ordinal) && + m.Path != null && m.RuleSeverity == "error")); + } + + [TestMethod] + public void CodeListsAreResolvedFromEmbeddedResources() + { + var invoice = Invoice(); + invoice.Descendants(Ram + "InvoiceCurrencyCode").Single().Value = "ZZZ"; + var result = ZugferdXmlValidator.Validate(invoice.ToString()); + Assert.IsFalse(result.IsValid); + Assert.IsNull(result.Error); + Assert.IsTrue(result.Validations.Any(m => m.Message.Contains("not allowed", StringComparison.Ordinal))); + } + + [TestMethod] + [DoNotParallelize] + public void InvoiceCannotRequestRemoteSchemasOrStylesheets() + { + using var network = new NetworkActivityListener(); + var invoice = Invoice(); + XNamespace xsi = "http://www.w3.org/2001/XMLSchema-instance"; + invoice.Root!.SetAttributeValue(xsi + "schemaLocation", invoice.Root.Name.NamespaceName + " http://127.0.0.1:1/evil.xsd"); + invoice.AddFirst(new XProcessingInstruction("xml-stylesheet", "type='text/xsl' href='http://127.0.0.1:1/evil.xsl'")); + AssertValid(ZugferdXmlValidator.Validate(invoice.ToString())); + Assert.AreEqual(0, network.Attempts, "Validation attempted an HTTP request, DNS lookup, or socket connection."); + } + + private sealed class NetworkActivityListener : EventListener + { + private int attempts; + internal int Attempts => Volatile.Read(ref attempts); + + protected override void OnEventSourceCreated(EventSource eventSource) + { + if (eventSource.Name is "System.Net.Http" or "System.Net.NameResolution" or "System.Net.Sockets") + EnableEvents(eventSource, EventLevel.Verbose); + } + + protected override void OnEventWritten(EventWrittenEventArgs eventData) + { + if (eventData.EventName is "RequestStart" or "ResolutionStart" or "ConnectStart") + Interlocked.Increment(ref attempts); + } + } + + [TestMethod] + public void MissingSellerNameFailsBusinessRules() + { + var invoice = Invoice(); + invoice.Descendants(Ram + "SellerTradeParty").Single().Element(Ram + "Name")!.Remove(); + var result = ZugferdXmlValidator.Validate(invoice.ToString()); + Assert.IsFalse(result.IsValid); + Assert.IsTrue(result.Validations.Any(m => m.Code == "FX-SCH-A-000015" && m.Message.Contains("BR-06", StringComparison.Ordinal))); + } + + [TestMethod] + public void SchemaFailureStopsBeforeSchematron() + { + var invoice = Invoice(); + invoice.Descendants(Ram + "InvoiceCurrencyCode").Single().AddBeforeSelf(new XElement(Ram + "Unexpected")); + var result = ZugferdXmlValidator.Validate(invoice.ToString()); + Assert.IsFalse(result.IsValid); + Assert.IsNull(result.Error); + Assert.IsTrue(result.Validations.All(m => m.Code == null)); + Assert.IsTrue(result.Validations.Any(m => m.Severity == XmlSeverityType.Error)); + } + + [TestMethod] + public void SuccessfulReportsRemainNonblocking() + { + var invoice = Invoice(); + invoice.Root!.Elements().Single(e => e.Name.LocalName == "ExchangedDocument").Element(Ram + "ID")!.SetAttributeValue("schemeID", "unused"); + var result = ZugferdXmlValidator.Validate(invoice.ToString()); + AssertValid(result); + Assert.IsTrue(result.Validations.Any(m => m.RuleSeverity == "warning" && m.Path != null)); + } + + [TestMethod] + [DataRow("")] + [DataRow("")] + [DataRow("")] + [DataRow("")] + [DataRow("]>&x;")] + [DataRow("")] + public void InvalidAndUnsupportedInputsFailClosed(string xml) + { + var result = ZugferdXmlValidator.Validate(xml); + Assert.IsFalse(result.IsValid); + Assert.IsFalse(string.IsNullOrWhiteSpace(result.Error)); + } + + [TestMethod] + public void UnsupportedGuidelineFailsClosed() + { + var invoice = Invoice(); + invoice.Descendants(Ram + "GuidelineSpecifiedDocumentContextParameter").Single().Element(Ram + "ID")!.Value = "urn:factur-x.eu:1p0:basic"; + var result = ZugferdXmlValidator.Validate(invoice.ToString()); + Assert.IsFalse(result.IsValid); + Assert.Contains("supports only", result.Error!); + } + + [TestMethod] + public async Task ConcurrentCallsHaveIndependentState() + { + var valid = Invoice().ToString(); + var invalidInvoice = Invoice(); + invalidInvoice.Descendants(Ram + "DuePayableAmount").Single().Value = "1.00"; + var invalid = invalidInvoice.ToString(); + var results = await Task.WhenAll(Enumerable.Range(0, 8).Select(i => Task.Run(() => + ZugferdXmlValidator.Validate(i % 2 == 0 ? valid : invalid)))); + for (var i = 0; i < results.Length; i++) + { + Assert.AreEqual(i % 2 == 0, results[i].IsValid, results[i].Error); + } + } +} diff --git a/src/pax.XRechnung.NET.tests/pax.XRechnung.NET.tests.csproj b/src/pax.XRechnung.NET.tests/pax.XRechnung.NET.tests.csproj index 1f0447f..0e859b7 100644 --- a/src/pax.XRechnung.NET.tests/pax.XRechnung.NET.tests.csproj +++ b/src/pax.XRechnung.NET.tests/pax.XRechnung.NET.tests.csproj @@ -14,6 +14,7 @@ + diff --git a/src/pax.XRechnung.NET/InvoiceLocalValidator.cs b/src/pax.XRechnung.NET/InvoiceLocalValidator.cs new file mode 100644 index 0000000..f555d19 --- /dev/null +++ b/src/pax.XRechnung.NET/InvoiceLocalValidator.cs @@ -0,0 +1,116 @@ +using System.Globalization; +using System.Diagnostics.CodeAnalysis; +using System.Xml; +using System.Xml.Linq; +using System.Xml.Schema; +using Saxon.Api; + +namespace pax.XRechnung.NET; + +internal static class InvoiceLocalValidator +{ + private const string CustomizationId = "urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0"; + private const string ResourcePrefix = "pax.XRechnung.NET.Resources.Schematrons.XRechnung-2026-08-31."; + private static readonly XNamespace Svrl = "http://purl.oclc.org/dsdl/svrl"; + private static readonly Lazy Rules = new(CompileRules); + + [SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "The validation API reports parser, schema, and third-party engine failures through Error.")] + internal static InvoiceValidationResult Validate(string xml) + { + try + { + ArgumentException.ThrowIfNullOrWhiteSpace(xml); + using var reader = CreateReader(XmlInvoiceValidator.GetRawXmlText(xml)); + var document = new XmlDocument { XmlResolver = null }; + document.Load(reader); + var root = document.DocumentElement; + if (root?.LocalName != "Invoice" || root.NamespaceURI != XmlInvoiceWriter.InvoiceSchema || + root["CustomizationID", XmlInvoiceWriter.CommonBasicComponents]?.InnerText != CustomizationId) + { + return new InvoiceValidationResult + { + Error = "Local validation supports only standard XRechnung 3.0 UBL Invoice documents." + }; + } + + var messages = new List(); + document.Schemas = XmlInvoiceWriter.GetSchemaSet(); + document.Validate((_, e) => messages.Add(new ValidationMessage(e))); + if (messages.Any(m => m.Severity == XmlSeverityType.Error)) + { + return new InvoiceValidationResult(messages); + } + + var rules = Rules.Value; + var source = rules.Processor.NewDocumentBuilder().Build(document); + foreach (var executable in rules.Executables) + { + var transformer = executable.Load(); + transformer.InitialContextNode = source; + using var output = new StringWriter(CultureInfo.InvariantCulture); + transformer.Run(rules.Processor.NewSerializer(output)); + using var reportReader = CreateReader(output.ToString()); + var report = XDocument.Load(reportReader); + foreach (var finding in report.Descendants().Where(e => + e.Name == Svrl + "failed-assert" || e.Name == Svrl + "successful-report")) + { + var code = (string?)finding.Attribute("id"); + var level = GetSeverity(code, (string?)finding.Attribute("flag") ?? (string?)finding.Attribute("role")); + var text = finding.Element(Svrl + "text")?.Value.Trim() ?? string.Empty; + messages.Add(new ValidationMessage(new XmlSchemaException(text), text, + level == "error" ? XmlSeverityType.Error : XmlSeverityType.Warning) + { + Code = code, + Path = (string?)finding.Attribute("location"), + RuleSeverity = level + }); + } + } + + var result = new InvoiceValidationResult(messages); + result.Conformity = "XRechnung 3.0.2; KoSIT configuration 2026-08-31; EN16931 1.3.16; XRechnung Schematron 2.6.0"; + result.Evaluation = result.IsValid ? "The document conforms to the supported XRechnung profile." : "The document contains validation errors."; + return result; + } + catch (Exception ex) + { + return new InvoiceValidationResult { Error = ex.Message, IsValid = false }; + } + } + + private static string GetSeverity(string? code, string? flag) => code switch + { + "BR-CL-21" or "BR-CL-23" => "warning", + "UBL-CR-646" => "error", + _ => flag?.ToUpperInvariant() switch + { + "WARNING" => "warning", + "INFORMATION" or "INFO" => "information", + _ => "error" + } + }; + + private static XmlReader CreateReader(string text) => XmlReader.Create(new StringReader(text), + new XmlReaderSettings { DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null }, "urn:pax:xrechnung:invoice"); + + private static CompiledRules CompileRules() + { + var processor = new Processor(); + processor.SetProperty("http://saxon.sf.net/feature/allow-external-functions", "false"); + processor.SetProperty("http://saxon.sf.net/feature/allowedProtocols", ""); + processor.SetResourceResolver(request => throw new XmlException($"External resource access is disabled: {request.Uri}"), false); + var compiler = processor.NewXsltCompiler(); + var executables = new List(); + foreach (var name in new[] { "EN16931-UBL-validation.xsl", "XRechnung-UBL-validation.xsl" }) + { + using var stream = typeof(InvoiceLocalValidator).Assembly.GetManifestResourceStream(ResourcePrefix + name) + ?? throw new InvalidOperationException($"Missing validation resource: {name}"); + using var reader = XmlReader.Create(stream, + new XmlReaderSettings { DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null }, "urn:pax:xrechnung:" + name); + executables.Add(compiler.Compile(reader)); + } + return new CompiledRules(processor, executables.ToArray()); + } + + private sealed record CompiledRules(Processor Processor, XsltExecutable[] Executables); +} diff --git a/src/pax.XRechnung.NET/InvoiceValidationResult.cs b/src/pax.XRechnung.NET/InvoiceValidationResult.cs index bd09659..589f3e6 100644 --- a/src/pax.XRechnung.NET/InvoiceValidationResult.cs +++ b/src/pax.XRechnung.NET/InvoiceValidationResult.cs @@ -106,4 +106,16 @@ public ValidationMessage(ValidationEventArgs e) /// Severity /// public XmlSeverityType Severity { get; } + + /// Business rule identifier, when supplied by the validator. + public string? Code { get; init; } + + /// Location of the finding in the XML document. + public string? Path { get; init; } + + /// + /// Rule severity: error, warning, or information. Information is represented + /// by Warning in because XmlSeverityType has no information value. + /// + public string? RuleSeverity { get; init; } } diff --git a/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/EN16931-LICENSE.txt b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/EN16931-LICENSE.txt new file mode 100644 index 0000000..6881212 --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/EN16931-LICENSE.txt @@ -0,0 +1,194 @@ +==== + Licensed under European Union Public Licence (EUPL) version 1.2. +==== + +EUROPEAN UNION PUBLIC LICENCE v. 1.2 +EUPL © the European Union 2007, 2016 + +This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined below) which is provided under the +terms of this Licence. Any use of the Work, other than as authorised under this Licence is prohibited (to the extent such +use is covered by a right of the copyright holder of the Work). +The Work is provided under the terms of this Licence when the Licensor (as defined below) has placed the following +notice immediately following the copyright notice for the Work: + Licensed under the EUPL +or has expressed by any other means his willingness to license under the EUPL. + +1.Definitions +In this Licence, the following terms have the following meaning: +— ‘The Licence’:this Licence. +— ‘The Original Work’:the work or software distributed or communicated by the Licensor under this Licence, available +as Source Code and also as Executable Code as the case may be. +— ‘Derivative Works’:the works or software that could be created by the Licensee, based upon the Original Work or +modifications thereof. This Licence does not define the extent of modification or dependence on the Original Work +required in order to classify a work as a Derivative Work; this extent is determined by copyright law applicable in +the country mentioned in Article 15. +— ‘The Work’:the Original Work or its Derivative Works. +— ‘The Source Code’:the human-readable form of the Work which is the most convenient for people to study and +modify. +— ‘The Executable Code’:any code which has generally been compiled and which is meant to be interpreted by +a computer as a program. +— ‘The Licensor’:the natural or legal person that distributes or communicates the Work under the Licence. +— ‘Contributor(s)’:any natural or legal person who modifies the Work under the Licence, or otherwise contributes to +the creation of a Derivative Work. +— ‘The Licensee’ or ‘You’:any natural or legal person who makes any usage of the Work under the terms of the +Licence. +— ‘Distribution’ or ‘Communication’:any act of selling, giving, lending, renting, distributing, communicating, +transmitting, or otherwise making available, online or offline, copies of the Work or providing access to its essential +functionalities at the disposal of any other natural or legal person. + +2.Scope of the rights granted by the Licence +The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, sublicensable licence to do the following, for +the duration of copyright vested in the Original Work: +— use the Work in any circumstance and for all usage, +— reproduce the Work, +— modify the Work, and make Derivative Works based upon the Work, +— communicate to the public, including the right to make available or display the Work or copies thereof to the public +and perform publicly, as the case may be, the Work, +— distribute the Work or copies thereof, +— lend and rent the Work or copies thereof, +— sublicense rights in the Work or copies thereof. +Those rights can be exercised on any media, supports and formats, whether now known or later invented, as far as the +applicable law permits so. +In the countries where moral rights apply, the Licensor waives his right to exercise his moral right to the extent allowed +by law in order to make effective the licence of the economic rights here above listed. +The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to any patents held by the Licensor, to the +extent necessary to make use of the rights granted on the Work under this Licence. + +3.Communication of the Source Code +The Licensor may provide the Work either in its Source Code form, or as Executable Code. If the Work is provided as +Executable Code, the Licensor provides in addition a machine-readable copy of the Source Code of the Work along with +each copy of the Work that the Licensor distributes or indicates, in a notice following the copyright notice attached to +the Work, a repository where the Source Code is easily and freely accessible for as long as the Licensor continues to +distribute or communicate the Work. + +4.Limitations on copyright +Nothing in this Licence is intended to deprive the Licensee of the benefits from any exception or limitation to the +exclusive rights of the rights owners in the Work, of the exhaustion of those rights or of other applicable limitations +thereto. + +5.Obligations of the Licensee +The grant of the rights mentioned above is subject to some restrictions and obligations imposed on the Licensee. Those +obligations are the following: + +Attribution right: The Licensee shall keep intact all copyright, patent or trademarks notices and all notices that refer to +the Licence and to the disclaimer of warranties. The Licensee must include a copy of such notices and a copy of the +Licence with every copy of the Work he/she distributes or communicates. The Licensee must cause any Derivative Work +to carry prominent notices stating that the Work has been modified and the date of modification. + +Copyleft clause: If the Licensee distributes or communicates copies of the Original Works or Derivative Works, this +Distribution or Communication will be done under the terms of this Licence or of a later version of this Licence unless +the Original Work is expressly distributed only under this version of the Licence — for example by communicating +‘EUPL v. 1.2 only’. The Licensee (becoming Licensor) cannot offer or impose any additional terms or conditions on the +Work or Derivative Work that alter or restrict the terms of the Licence. + +Compatibility clause: If the Licensee Distributes or Communicates Derivative Works or copies thereof based upon both +the Work and another work licensed under a Compatible Licence, this Distribution or Communication can be done +under the terms of this Compatible Licence. For the sake of this clause, ‘Compatible Licence’ refers to the licences listed +in the appendix attached to this Licence. Should the Licensee's obligations under the Compatible Licence conflict with +his/her obligations under this Licence, the obligations of the Compatible Licence shall prevail. + +Provision of Source Code: When distributing or communicating copies of the Work, the Licensee will provide +a machine-readable copy of the Source Code or indicate a repository where this Source will be easily and freely available +for as long as the Licensee continues to distribute or communicate the Work. +Legal Protection: This Licence does not grant permission to use the trade names, trademarks, service marks, or names +of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and +reproducing the content of the copyright notice. + +6.Chain of Authorship +The original Licensor warrants that the copyright in the Original Work granted hereunder is owned by him/her or +licensed to him/her and that he/she has the power and authority to grant the Licence. +Each Contributor warrants that the copyright in the modifications he/she brings to the Work are owned by him/her or +licensed to him/her and that he/she has the power and authority to grant the Licence. +Each time You accept the Licence, the original Licensor and subsequent Contributors grant You a licence to their contributions +to the Work, under the terms of this Licence. + +7.Disclaimer of Warranty +The Work is a work in progress, which is continuously improved by numerous Contributors. It is not a finished work +and may therefore contain defects or ‘bugs’ inherent to this type of development. +For the above reason, the Work is provided under the Licence on an ‘as is’ basis and without warranties of any kind +concerning the Work, including without limitation merchantability, fitness for a particular purpose, absence of defects or +errors, accuracy, non-infringement of intellectual property rights other than copyright as stated in Article 6 of this +Licence. +This disclaimer of warranty is an essential part of the Licence and a condition for the grant of any rights to the Work. + +8.Disclaimer of Liability +Except in the cases of wilful misconduct or damages directly caused to natural persons, the Licensor will in no event be +liable for any direct or indirect, material or moral, damages of any kind, arising out of the Licence or of the use of the +Work, including without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss +of data or any commercial damage, even if the Licensor has been advised of the possibility of such damage. However, +the Licensor will be liable under statutory product liability laws as far such laws apply to the Work. + +9.Additional agreements +While distributing the Work, You may choose to conclude an additional agreement, defining obligations or services +consistent with this Licence. However, if accepting obligations, You may act only on your own behalf and on your sole +responsibility, not on behalf of the original Licensor or any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against such Contributor by +the fact You have accepted any warranty or additional liability. + +10.Acceptance of the Licence +The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ placed under the bottom of a window +displaying the text of this Licence or by affirming consent in any other similar way, in accordance with the rules of +applicable law. Clicking on that icon indicates your clear and irrevocable acceptance of this Licence and all of its terms +and conditions. +Similarly, you irrevocably accept this Licence and all of its terms and conditions by exercising any rights granted to You +by Article 2 of this Licence, such as the use of the Work, the creation by You of a Derivative Work or the Distribution +or Communication by You of the Work or copies thereof. + +11.Information to the public +In case of any Distribution or Communication of the Work by means of electronic communication by You (for example, +by offering to download the Work from a remote location) the distribution channel or media (for example, a website) +must at least provide to the public the information requested by the applicable law regarding the Licensor, the Licence +and the way it may be accessible, concluded, stored and reproduced by the Licensee. + +12.Termination of the Licence +The Licence and the rights granted hereunder will terminate automatically upon any breach by the Licensee of the terms +of the Licence. +Such a termination will not terminate the licences of any person who has received the Work from the Licensee under +the Licence, provided such persons remain in full compliance with the Licence. + +13.Miscellaneous +Without prejudice of Article 9 above, the Licence represents the complete agreement between the Parties as to the +Work. +If any provision of the Licence is invalid or unenforceable under applicable law, this will not affect the validity or +enforceability of the Licence as a whole. Such provision will be construed or reformed so as necessary to make it valid +and enforceable. +The European Commission may publish other linguistic versions or new versions of this Licence or updated versions of +the Appendix, so far this is required and reasonable, without reducing the scope of the rights granted by the Licence. +New versions of the Licence will be published with a unique version number. +All linguistic versions of this Licence, approved by the European Commission, have identical value. Parties can take +advantage of the linguistic version of their choice. + +14.Jurisdiction +Without prejudice to specific agreement between parties, +— any litigation resulting from the interpretation of this License, arising between the European Union institutions, +bodies, offices or agencies, as a Licensor, and any Licensee, will be subject to the jurisdiction of the Court of Justice +of the European Union, as laid down in article 272 of the Treaty on the Functioning of the European Union, +— any litigation arising between other parties and resulting from the interpretation of this License, will be subject to +the exclusive jurisdiction of the competent court where the Licensor resides or conducts its primary business. + +15.Applicable Law +Without prejudice to specific agreement between parties, +— this Licence shall be governed by the law of the European Union Member State where the Licensor has his seat, +resides or has his registered office, +— this licence shall be governed by Belgian law if the Licensor has no seat, residence or registered office inside +a European Union Member State. + + + Appendix + +‘Compatible Licences’ according to Article 5 EUPL are: +— GNU General Public License (GPL) v. 2, v. 3 +— GNU Affero General Public License (AGPL) v. 3 +— Open Software License (OSL) v. 2.1, v. 3.0 +— Eclipse Public License (EPL) v. 1.0 +— CeCILL v. 2.0, v. 2.1 +— Mozilla Public Licence (MPL) v. 2 +— GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 +— Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for works other than software +— European Union Public Licence (EUPL) v. 1.1, v. 1.2 +— Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong Reciprocity (LiLiQ-R+) + +The European Commission may update this Appendix to later versions of the above licences without producing +a new version of the EUPL, as long as they provide the rights granted in Article 2 of this Licence and protect the +covered Source Code from exclusive appropriation. +All other changes or additions to this Appendix require the production of a new EUPL version. diff --git a/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/EN16931-UBL-validation.xsl b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/EN16931-UBL-validation.xsl new file mode 100644 index 0000000..f6df7d8 --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/EN16931-UBL-validation.xsl @@ -0,0 +1,13111 @@ + + + + + + SchXslt/1.10.1 SAXON/HE 12.8 + true + + + 2026-09-02T11:54:24.106910003Z + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SchXslt/1.10.1 SAXON/HE 12.8 + true + + + 2026-09-02T11:54:24.106910003Z + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AdditionalDocumentReference" shadowed by preceding rule + + cac:AdditionalDocumentReference + + + + + + + + + + + + + + cac:AdditionalDocumentReference + + + + + + + + normalize-space(cbc:ID) != '' + [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AccountingCustomerParty/cac:Party/cbc:EndpointID" shadowed by preceding rule + + cac:AccountingCustomerParty/cac:Party/cbc:EndpointID + + + + + + + + + + + + + + cac:AccountingCustomerParty/cac:Party/cbc:EndpointID + + + + + + + + exists(@schemeID) + [BR-63]-The Buyer electronic address (BT-49) shall have a Scheme identifier. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AccountingCustomerParty/cac:Party/cac:PostalAddress" shadowed by preceding rule + + cac:AccountingCustomerParty/cac:Party/cac:PostalAddress + + + + + + + + + + + + + + cac:AccountingCustomerParty/cac:Party/cac:PostalAddress + + + + + + + + normalize-space(cac:Country/cbc:IdentificationCode) != '' + [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PaymentMeans/cac:CardAccount/cbc:PrimaryAccountNumberID" shadowed by preceding rule + + cac:PaymentMeans/cac:CardAccount/cbc:PrimaryAccountNumberID + + + + + + + + + + + + + + cac:PaymentMeans/cac:CardAccount/cbc:PrimaryAccountNumberID + + + + + + + + string-length(normalize-space(.))<=10 + [BR-51]-In accordance with card payments security standards an invoice should never include a full card primary account number (BT-87). At the moment PCI Security Standards Council has defined that the first 6 digits and last 4 digits are the maximum number of digits to be shown. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Delivery/cac:DeliveryLocation/cac:Address" shadowed by preceding rule + + cac:Delivery/cac:DeliveryLocation/cac:Address + + + + + + + + + + + + + + cac:Delivery/cac:DeliveryLocation/cac:Address + + + + + + + + exists(cac:Country/cbc:IdentificationCode) + [BR-57]-Each Deliver to address (BG-15) shall contain a Deliver to country code (BT-80). + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = false()]" shadowed by preceding rule + + /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = false()] + + + + + + + + + + + + + + /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = false()] + + + + + + + + exists(cbc:Amount) + [BR-31]-Each Document level allowance (BG-20) shall have a Document level allowance amount (BT-92). + + + + + exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID) + [BR-32]-Each Document level allowance (BG-20) shall have a Document level allowance VAT category code (BT-95). + + + + + exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode) + [BR-33]-Each Document level allowance (BG-20) shall have a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98). + + + + + true() + [BR-CO-05]-Document level allowance reason code (BT-98) and Document level allowance reason (BT-97) shall indicate the same type of allowance. + + + + + exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode) + [BR-CO-21]-Each Document level allowance (BG-20) shall contain a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98), or both. + + + + + string-length(substring-after(cbc:Amount,'.'))<=2 + [BR-DEC-01]-The allowed maximum number of decimals for the Document level allowance amount (BT-92) is 2. + + + + + string-length(substring-after(cbc:BaseAmount,'.'))<=2 + [BR-DEC-02]-The allowed maximum number of decimals for the Document level allowance base amount (BT-93) is 2. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = true()]" shadowed by preceding rule + + /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = true()] + + + + + + + + + + + + + + /ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = true()] + + + + + + + + exists(cbc:Amount) + [BR-36]-Each Document level charge (BG-21) shall have a Document level charge amount (BT-99). + + + + + exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID) + [BR-37]-Each Document level charge (BG-21) shall have a Document level charge VAT category code (BT-102). + + + + + exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode) + [BR-38]-Each Document level charge (BG-21) shall have a Document level charge reason (BT-104) or a Document level charge reason code (BT-105). + + + + + true() + [BR-CO-06]-Document level charge reason code (BT-105) and Document level charge reason (BT-104) shall indicate the same type of charge. + + + + + exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode) + [BR-CO-22]-Each Document level charge (BG-21) shall contain a Document level charge reason (BT-104) or a Document level charge reason code (BT-105), or both. + + + + + string-length(substring-after(cbc:Amount,'.'))<=2 + [BR-DEC-05]-The allowed maximum number of decimals for the Document level charge amount (BT-99) is 2. + + + + + string-length(substring-after(cbc:BaseAmount,'.'))<=2 + [BR-DEC-06]-The allowed maximum number of decimals for the Document level charge base amount (BT-100) is 2. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:LegalMonetaryTotal" shadowed by preceding rule + + cac:LegalMonetaryTotal + + + + + + + + + + + + + + cac:LegalMonetaryTotal + + + + + + + + exists(cbc:LineExtensionAmount) + [BR-12]-An Invoice shall have the Sum of Invoice line net amount (BT-106). + + + + + exists(cbc:TaxExclusiveAmount) + [BR-13]-An Invoice shall have the Invoice total amount without VAT (BT-109). + + + + + exists(cbc:TaxInclusiveAmount) + [BR-14]-An Invoice shall have the Invoice total amount with VAT (BT-112). + + + + + exists(cbc:PayableAmount) + [BR-15]-An Invoice shall have the Amount due for payment (BT-115). + + + + + (xs:decimal(cbc:LineExtensionAmount) = xs:decimal(round(sum(//(cac:InvoiceLine|cac:CreditNoteLine)/xs:decimal(cbc:LineExtensionAmount)) * 10 * 10) div 100)) + [BR-CO-10]-Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131). + + + + + xs:decimal(cbc:AllowanceTotalAmount) = (round(sum(../cac:AllowanceCharge[cbc:ChargeIndicator=false()]/xs:decimal(cbc:Amount)) * 10 * 10) div 100) or (not(cbc:AllowanceTotalAmount) and not(../cac:AllowanceCharge[cbc:ChargeIndicator=false()])) + [BR-CO-11]-Sum of allowances on document level (BT-107) = Σ Document level allowance amount (BT-92). + + + + + xs:decimal(cbc:ChargeTotalAmount) = (round(sum(../cac:AllowanceCharge[cbc:ChargeIndicator=true()]/xs:decimal(cbc:Amount)) * 10 * 10) div 100) or (not(cbc:ChargeTotalAmount) and not(../cac:AllowanceCharge[cbc:ChargeIndicator=true()])) + [BR-CO-12]-Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99). + + + + + ((cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10) div 100 )) or (not(cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10 ) div 100)) or ((cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount)) * 10 * 10 ) div 100)) or (not(cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = xs:decimal(cbc:LineExtensionAmount))) + [BR-CO-13]-Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108). + + + + + (exists(cbc:PrepaidAmount) and not(exists(cbc:PayableRoundingAmount)) and (xs:decimal(cbc:PayableAmount) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(cbc:PrepaidAmount)) and not(exists(cbc:PayableRoundingAmount)) and xs:decimal(cbc:PayableAmount) = xs:decimal(cbc:TaxInclusiveAmount)) or (exists(cbc:PrepaidAmount) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(cbc:PrepaidAmount)) and exists(cbc:PayableRoundingAmount) and ((round((xs:decimal(cbc:PayableAmount) - xs:decimal(cbc:PayableRoundingAmount)) * 10 * 10) div 100) = xs:decimal(cbc:TaxInclusiveAmount))) + [BR-CO-16]-Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) +Rounding amount (BT-114). + + + + + string-length(substring-after(cbc:LineExtensionAmount,'.'))<=2 + [BR-DEC-09]-The allowed maximum number of decimals for the Sum of Invoice line net amount (BT-106) is 2. + + + + + string-length(substring-after(cbc:AllowanceTotalAmount,'.'))<=2 + [BR-DEC-10]-The allowed maximum number of decimals for the Sum of allowanced on document level (BT-107) is 2. + + + + + string-length(substring-after(cbc:ChargeTotalAmount,'.'))<=2 + [BR-DEC-11]-The allowed maximum number of decimals for the Sum of charges on document level (BT-108) is 2. + + + + + string-length(substring-after(cbc:TaxExclusiveAmount,'.'))<=2 + [BR-DEC-12]-The allowed maximum number of decimals for the Invoice total amount without VAT (BT-109) is 2. + + + + + string-length(substring-after(cbc:TaxInclusiveAmount,'.'))<=2 + [BR-DEC-14]-The allowed maximum number of decimals for the Invoice total amount with VAT (BT-112) is 2. + + + + + string-length(substring-after(cbc:PrepaidAmount,'.'))<=2 + [BR-DEC-16]-The allowed maximum number of decimals for the Paid amount (BT-113) is 2. + + + + + string-length(substring-after(cbc:PayableRoundingAmount,'.'))<=2 + [BR-DEC-17]-The allowed maximum number of decimals for the Rounding amount (BT-114) is 2. + + + + + string-length(substring-after(cbc:PayableAmount,'.'))<=2 + [BR-DEC-18]-The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2.  + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice | /cn:CreditNote" shadowed by preceding rule + + /ubl:Invoice | /cn:CreditNote + + + + + + + + + + + + + + /ubl:Invoice | /cn:CreditNote + + + + + + + + normalize-space(cbc:CustomizationID) != '' + [BR-01]-An Invoice shall have a Specification identifier (BT-24).    + + + + + normalize-space(cbc:ID) != '' + [BR-02]-An Invoice shall have an Invoice number (BT-1). + + + + + normalize-space(cbc:IssueDate) != '' + [BR-03]-An Invoice shall have an Invoice issue date (BT-2). + + + + + normalize-space(cbc:InvoiceTypeCode) != '' or normalize-space(cbc:CreditNoteTypeCode) !='' + [BR-04]-An Invoice shall have an Invoice type code (BT-3). + + + + + normalize-space(cbc:DocumentCurrencyCode) != '' + [BR-05]-An Invoice shall have an Invoice currency code (BT-5). + + + + + normalize-space(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) != '' + [BR-06]-An Invoice shall contain the Seller name (BT-27). + + + + + normalize-space(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) != '' + [BR-07]-An Invoice shall contain the Buyer name (BT-44). + + + + + exists(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress) + [BR-08]-An Invoice shall contain the Seller postal address. + + + + + exists(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress) + [BR-10]-An Invoice shall contain the Buyer postal address (BG-8). + + + + + exists(cac:InvoiceLine) or exists(cac:CreditNoteLine) + [BR-16]-An Invoice shall have at least one Invoice line (BG-25) + + + + + every $taxcurrency in cbc:TaxCurrencyCode satisfies exists(//cac:TaxTotal/cbc:TaxAmount[@currencyID=$taxcurrency]) + [BR-53]-If the VAT accounting currency code (BT-6) is present, then the Invoice total VAT amount in accounting currency (BT-111) shall be provided. + + + + + ((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE'])) + [BR-AE-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 "Reverse charge" shall contain in the VAT Breakdown (BG-23) exactly one VAT category code (BT-118) equal with "VAT reverse charge". + + + + + (exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID)) and (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) or exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-AE-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) 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). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID)) and (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) or exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [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). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID)) and (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) or exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [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). + + + + + (exists(cbc:TaxPointDate) and not(cac:InvoicePeriod/cbc:DescriptionCode)) or (not(cbc:TaxPointDate) and exists(cac:InvoicePeriod/cbc:DescriptionCode)) or (not(cbc:TaxPointDate) and not(cac:InvoicePeriod/cbc:DescriptionCode)) + [BR-CO-03]-Value added tax point date (BT-7) and Value added tax point date code (BT-8) are mutually exclusive. + + + + + every $Currency in cbc:DocumentCurrencyCode satisfies (count(cac:TaxTotal/xs:decimal(cbc:TaxAmount[@currencyID=$Currency])) eq 1) and (cac:LegalMonetaryTotal/xs:decimal(cbc:TaxInclusiveAmount) = round( (cac:LegalMonetaryTotal/xs:decimal(cbc:TaxExclusiveAmount) + cac:TaxTotal/xs:decimal(cbc:TaxAmount[@currencyID=$Currency])) * 10 * 10) div 100) + [BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110). + + + + + exists(cac:TaxTotal/cac:TaxSubtotal) + [BR-CO-18]-An Invoice shall at least have one VAT breakdown group (BG-23). + + + + + (//cac:TaxTotal/cbc:TaxAmount[@currencyID = cbc:DocumentCurrencyCode] and (string-length(substring-after(//cac:TaxTotal/cbc:TaxAmount[@currencyID = cbc:DocumentCurrencyCode],'.'))<=2)) or (not(//cac:TaxTotal/cbc:TaxAmount[@currencyID = cbc:DocumentCurrencyCode])) + [BR-DEC-13]-The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2. + + + + + (//cac:TaxTotal/cbc:TaxAmount[@currencyID = cbc:TaxCurrencyCode] and (string-length(substring-after(//cac:TaxTotal/cbc:TaxAmount[@currencyID = cbc:TaxCurrencyCode],'.'))<=2)) or (not(//cac:TaxTotal/cbc:TaxAmount[@currencyID = cbc:TaxCurrencyCode])) + [BR-DEC-15]-The allowed maximum number of decimals for the Invoice total VAT amount in accounting currency (BT-111) is 2. + + + + + ((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E'])) + [BR-E-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 "Exempt from VAT" shall contain exactly one VAT breakdown (BG-23) with the VAT category code (BT-118) equal to "Exempt from VAT". + + + + + (exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-E-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Exempt from VAT" 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). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-E-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Exempt from VAT" 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). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-E-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Exempt from VAT" 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). + + + + + ((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'G']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'G'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'G']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'G']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'G'])) + [BR-G-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 "Export outside the EU" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Export outside the EU". + + + + + (exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-G-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='G']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-G-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='G']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-G-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63). + + + + + ((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'K']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'K'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'K']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'K']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'K'])) + [BR-IC-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 "Intra-community supply" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Intra-community supply". + + + + + (exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID)) and (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + [BR-IC-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID)) and (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-IC-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID)) and (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-IC-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48). + + + + + (exists(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'K']) and (string-length(cac:Delivery/cbc:ActualDeliveryDate) > 1 or (cac:InvoicePeriod/*))) or (not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'K'])) + [BR-IC-11]-In an Invoice with a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the Actual delivery date (BT-72) or the Invoicing period (BG-14) shall not be blank. + + + + + (exists(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'K']) and (string-length(cac:Delivery/cac:DeliveryLocation/cac:Address/cac:Country/cbc:IdentificationCode) >1)) or (not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'K'])) + [BR-IC-12]-In an Invoice with a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the Deliver to country code (BT-80) shall not be blank. + + + + + ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cbc:ID = 'L']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0) + [BR-AF-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 "IGIC" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IGIC". + + + + + (exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-AF-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" 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). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-AF-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" 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). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[cbc:ID='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-AF-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" 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). + + + + + ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cbc:ID = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0) + [BR-AG-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 "IPSI" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IPSI". + + + + + (exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [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). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [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). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [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). + + + + + ((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O'])) + [BR-O-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 "Not subject to VAT" shall contain exactly one VAT breakdown group (BG-23) with the VAT category code (BT-118) equal to "Not subject to VAT". + + + + + (exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (not(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) and not(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) and not(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + [BR-O-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Not subject to VAT" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-48). + + + + + (exists((/ubl:Invoice|/cn:CreditNote)/cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (not(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) and not(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) and not(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists((/ubl:Invoice|/cn:CreditNote)/cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-O-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Not subject to VAT" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-48). + + + + + (exists((/ubl:Invoice|/cn:CreditNote)/cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (not(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) and not(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) and not(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists((/ubl:Invoice|/cn:CreditNote)/cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-O-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Not subject to VAT" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-48). + + + + + (exists(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) != 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0) or not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) + [BR-O-11]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain other VAT breakdown groups (BG-23). + + + + + (exists(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) and count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) != 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0) or not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) + [BR-O-12]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is not "Not subject to VAT". + + + + + (exists(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) and count(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID) != 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0) or not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) + [BR-O-13]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain Document level allowances (BG-20) where Document level allowance VAT category code (BT-95) is not "Not subject to VAT". + + + + + (exists(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) and count(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID) != 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0) or not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'O']) + [BR-O-14]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain Document level charges (BG-21) where Document level charge VAT category code (BT-102) is not "Not subject to VAT". + + + + + ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'S']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'S']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S']) = 0) + [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". + + + + + (exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'])) + [BR-S-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Standard rated" 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). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-S-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Standard rated" 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). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-S-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Standard rated" 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). + + + + + ((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'Z']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'Z'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'Z']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'Z']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'Z'])) + [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". + + + + + (exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-Z-02]-An Invoice that contains an Invoice line where the Invoiced item VAT category code (BT-151) is "Zero rated" 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). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-Z-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Zero rated" 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). + + + + + (exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID)or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) + [BR-Z-04]-An Invoice that contains a Document level charge where the Document level charge VAT category code (BT-102) is "Zero rated" 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). + + + + + (not(//cbc:IdentificationCode != 'IT') and (//cac:TaxCategory/cbc:ID ='B' or //cac:ClassifiedTaxCategory/cbc:ID = 'B')) or (not(//cac:TaxCategory/cbc:ID ='B' or //cac:ClassifiedTaxCategory/cbc:ID = 'B')) + [BR-B-01]-An Invoice where the VAT category code (BT-151, BT-95 or BT-102) is “Split payment” shall be a domestic Italian invoice. + + + + + ((cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID ='B' or cac:AllowanceCharge/cac:TaxCategory/cbc:ID ='B' or //cac:ClassifiedTaxCategory/cbc:ID = 'B') and (not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID ='S' or cac:AllowanceCharge/cac:TaxCategory/cbc:ID ='S' or //cac:ClassifiedTaxCategory/cbc:ID = 'S'))) or (not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID ='B' or cac:AllowanceCharge/cac:TaxCategory/cbc:ID ='B' or //cac:ClassifiedTaxCategory/cbc:ID = 'B')) + [BR-B-02]-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, BT-118 or BT-102) is “Split payment" shall not contain 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, BT-118 or BT-102) is “Standard rated”. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine | cac:CreditNoteLine" shadowed by preceding rule + + cac:InvoiceLine | cac:CreditNoteLine + + + + + + + + + + + + + + cac:InvoiceLine | cac:CreditNoteLine + + + + + + + + normalize-space(cbc:ID) != '' + [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). + + + + + exists(cbc:InvoicedQuantity) or exists(cbc:CreditedQuantity) + [BR-22]-Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129). + + + + + exists(cbc:InvoicedQuantity/@unitCode) or exists(cbc:CreditedQuantity/@unitCode) + [BR-23]-An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130). + + + + + exists(cbc:LineExtensionAmount) + [BR-24]-Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131). + + + + + normalize-space(cac:Item/cbc:Name) != '' + [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). + + + + + exists(cac:Price/cbc:PriceAmount) + [BR-26]-Each Invoice line (BG-25) shall contain the Item net price (BT-146). + + + + + (cac:Price/cbc:PriceAmount) >= 0 + [BR-27]-The Item net price (BT-146) shall NOT be negative. + + + + + (cac:Price/cac:AllowanceCharge/cbc:BaseAmount) >= 0 or not(exists(cac:Price/cac:AllowanceCharge/cbc:BaseAmount)) + [BR-28]-The Item gross price (BT-148) shall NOT be negative. + + + + + (cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:ID) + [BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151). + + + + + string-length(substring-after(cbc:LineExtensionAmount,'.'))<=2 + [BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2. + + + + + + + + + + + + + + + WARNING: Rule for context "//cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | //cac:CreditNoteLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()]" shadowed by preceding rule + + //cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | //cac:CreditNoteLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()] + + + + + + + + + + + + + + //cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()] | //cac:CreditNoteLine/cac:AllowanceCharge[cbc:ChargeIndicator = false()] + + + + + + + + exists(cbc:Amount) + [BR-41]-Each Invoice line allowance (BG-27) shall have an Invoice line allowance amount (BT-136). + + + + + exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode) + [BR-42]-Each Invoice line allowance (BG-27) shall have an Invoice line allowance reason (BT-139) or an Invoice line allowance reason code (BT-140). + + + + + true() + [BR-CO-07]-Invoice line allowance reason code (BT-140) and Invoice line allowance reason (BT-139) shall indicate the same type of allowance reason. + + + + + exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode) + [BR-CO-23]-Each Invoice line allowance (BG-27) shall contain an Invoice line allowance reason (BT-139) or an Invoice line allowance reason code (BT-140), or both. + + + + + string-length(substring-after(cbc:Amount,'.'))<=2 + [BR-DEC-24]-The allowed maximum number of decimals for the Invoice line allowance amount (BT-136) is 2. + + + + + string-length(substring-after(cbc:BaseAmount,'.'))<=2 + [BR-DEC-25]-The allowed maximum number of decimals for the Invoice line allowance base amount (BT-137) is 2. + + + + + + + + + + + + + + + WARNING: Rule for context "//cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | //cac:CreditNoteLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()]" shadowed by preceding rule + + //cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | //cac:CreditNoteLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()] + + + + + + + + + + + + + + //cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | //cac:CreditNoteLine/cac:AllowanceCharge[cbc:ChargeIndicator = true()] + + + + + + + + exists(cbc:Amount) + [BR-43]-Each Invoice line charge (BG-28) shall have an Invoice line charge amount (BT-141). + + + + + exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode) + [BR-44]-Each Invoice line charge shall have an Invoice line charge reason or an invoice line allowance reason code. + + + + + true() + [BR-CO-08]-Invoice line charge reason code (BT-145) and Invoice line charge reason (BT-144) shall indicate the same type of charge reason. + + + + + exists(cbc:AllowanceChargeReason) or exists(cbc:AllowanceChargeReasonCode) + [BR-CO-24]-Each Invoice line charge (BG-28) shall contain an Invoice line charge reason (BT-144) or an Invoice line charge reason code (BT-145), or both. + + + + + string-length(substring-after(cbc:Amount,'.'))<=2 + [BR-DEC-27]-The allowed maximum number of decimals for the Invoice line charge amount (BT-141) is 2. + + + + + string-length(substring-after(cbc:BaseAmount,'.'))<=2 + [BR-DEC-28]-The allowed maximum number of decimals for the Invoice line charge base amount (BT-142) is 2. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine/cac:InvoicePeriod | cac:CreditNoteLine/cac:InvoicePeriod" shadowed by preceding rule + + cac:InvoiceLine/cac:InvoicePeriod | cac:CreditNoteLine/cac:InvoicePeriod + + + + + + + + + + + + + + cac:InvoiceLine/cac:InvoicePeriod | cac:CreditNoteLine/cac:InvoicePeriod + + + + + + + + (exists(cbc:EndDate) and exists(cbc:StartDate) and xs:date(cbc:EndDate) >= xs:date(cbc:StartDate)) or not(exists(cbc:StartDate)) or not(exists(cbc:EndDate)) + [BR-30]-If both Invoice line period start date (BT-134) and Invoice line period end date (BT-135) are given then the Invoice line period end date (BT-135) shall be later or equal to the Invoice line period start date (BT-134). + + + + + exists(cbc:StartDate) or exists(cbc:EndDate) + [BR-CO-20]-If Invoice line period (BG-26) is used, the Invoice line period start date (BT-134) or the Invoice line period end date (BT-135) shall be filled, or both. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoicePeriod" shadowed by preceding rule + + cac:InvoicePeriod + + + + + + + + + + + + + + cac:InvoicePeriod + + + + + + + + (exists(cbc:EndDate) and exists(cbc:StartDate) and xs:date(cbc:EndDate) >= xs:date(cbc:StartDate)) or not(exists(cbc:StartDate)) or not(exists(cbc:EndDate)) + [BR-29]-If both Invoicing period start date (BT-73) and Invoicing period end date (BT-74) are given then the Invoicing period end date (BT-74) shall be later or equal to the Invoicing period start date (BT-73). + + + + + exists(cbc:StartDate) or exists(cbc:EndDate) or (exists(cbc:DescriptionCode) and not(exists(cbc:StartDate)) and not(exists(cbc:EndDate))) + [BR-CO-19]-If Invoicing period (BG-14) is used, the Invoicing period start date (BT-73) or the Invoicing period end date (BT-74) shall be filled, or both. + + + + + + + + + + + + + + + WARNING: Rule for context "//cac:AdditionalItemProperty" shadowed by preceding rule + + //cac:AdditionalItemProperty + + + + + + + + + + + + + + //cac:AdditionalItemProperty + + + + + + + + exists(cbc:Name) and exists(cbc:Value) + [BR-54]-Each Item attribute (BG-32) shall contain an Item attribute name (BT-160) and an Item attribute value (BT-161). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode " shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode + + + + + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode + + + + + + + + exists(@listID) + [BR-65]-The Item classification identifier (BT-158) shall have a Scheme identifier. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID | cac:CreditNoteLine/cac:Item/cac:StandardItemIdentification/cbc:ID" shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID | cac:CreditNoteLine/cac:Item/cac:StandardItemIdentification/cbc:ID + + + + + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID | cac:CreditNoteLine/cac:Item/cac:StandardItemIdentification/cbc:ID + + + + + + + + exists(@schemeID) + [BR-64]-The Item standard identifier (BT-157) shall have a Scheme identifier. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cbc:Note | /cn:CreditNote/cbc:Note" shadowed by preceding rule + + /ubl:Invoice/cbc:Note | /cn:CreditNote/cbc:Note + + + + + + + + + + + + + + /ubl:Invoice/cbc:Note | /cn:CreditNote/cbc:Note + + + + + + + + (contains(.,'#') and string-length(substring-before(substring-after(.,'#'),'#'))=3 and ( ( contains(' AAA AAB AAC AAD AAE AAF AAG AAI AAJ AAK AAL AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABQ ABR ABS ABT ABU ABV ABW ABX ABZ ACA ACB ACC ACD ACE ACF ACG ACH ACI ACJ ACK ACL ACM ACN ACO ACP ACQ ACR ACS ACT ACU ACV ACW ACX ACY ACZ ADA ADB ADC ADD ADE ADF ADG ADH ADI ADJ ADK ADL ADM ADN ADO ADP ADQ ADR ADS ADT ADU ADV ADW ADX ADY ADZ AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX AFY AFZ AGA AGB AGC AGD AGE AGF AGG AGH AGI AGJ AGK AGL AGM AGN AGO AGP AGQ AGR AGS AGT AGU AGV AGW AGX AGY AGZ AHA AHB AHC AHD AHE AHF AHG AHH AHI AHJ AHK AHL AHM AHN AHO AHP AHQ AHR AHS AHT AHU AHV AHW AHX AHY AHZ AIA AIB AIC AID AIE AIF AIG AIH AII AIJ AIK AIL AIM AIN AIO AIP AIQ AIR AIS AIT AIU AIV AIW AIX AIY AIZ AJA AJB ALC ALD ALE ALF ALG ALH ALI ALJ ALK ALL ALM ALN ALO ALP ALQ ARR ARS AUT AUU AUV AUW AUX AUY AUZ AVA AVB AVC AVD AVE AVF BAG BAH BAI BAJ BAK BAL BAM BAN BAO BAP BAQ BAR BAS BLC BLD BLE BLF BLG BLH BLI BLJ BLK BLL BLM BLN BLO BLP BLQ BLR BLS BLT BLU BLV BLW BLX BLY BLZ BMA BMB BMC BMD BME CCI CEX CHG CIP CLP CLR COI CUR CUS DAR DCL DEL DIN DOC DUT EUR FBC GBL GEN GS7 HAN HAZ ICN IIN IMI IND INS INV IRP ITR ITS LAN LIN LOI MCO MDH MKS ORI OSI PAC PAI PAY PKG PKT PMD PMT PRD PRF PRI PUR QIN QQD QUT RAH REG RET REV RQR SAF SIC SIN SLR SPA SPG SPH SPP SPT SRN SSR SUR TCA TDT TRA TRR TXD WHI ZZZ ',substring-before(substring-after(.,'#'),'#') ) ) )) or not(contains(.,'#')) or not(string-length(substring-before(substring-after(.,'#'),'#'))=3) + [BR-CL-08]-Invoiced note subject code shall be coded using UNCL4451 + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PayeeParty" shadowed by preceding rule + + cac:PayeeParty + + + + + + + + + + + + + + cac:PayeeParty + + + + + + + + exists(cac:PartyName/cbc:Name) and (not(cac:PartyName/cbc:Name = ../cac:AccountingSupplierParty/cac:Party/cac:PartyName/cbc:Name) and not(cac:PartyIdentification/cbc:ID = ../cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID) ) + [BR-17]-The Payee name (BT-59) shall be provided in the Invoice, if the Payee (BG-10) is different from the Seller (BG-4) + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PaymentMeans[cbc:PaymentMeansCode='30' or cbc:PaymentMeansCode='58']/cac:PayeeFinancialAccount" shadowed by preceding rule + + cac:PaymentMeans[cbc:PaymentMeansCode='30' or cbc:PaymentMeansCode='58']/cac:PayeeFinancialAccount + + + + + + + + + + + + + + cac:PaymentMeans[cbc:PaymentMeansCode='30' or cbc:PaymentMeansCode='58']/cac:PayeeFinancialAccount + + + + + + + + normalize-space(cbc:ID) != '' + [BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-17) information is provided in the Invoice. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PaymentMeans" shadowed by preceding rule + + cac:PaymentMeans + + + + + + + + + + + + + + cac:PaymentMeans + + + + + + + + exists(cbc:PaymentMeansCode) + [BR-49]-A Payment instruction (BG-16) shall specify the Payment means type code (BT-81). + + + + + (exists(cac:PayeeFinancialAccount/cbc:ID) and ((normalize-space(cbc:PaymentMeansCode) = '30') or (normalize-space(cbc:PaymentMeansCode) = '58') )) or ((normalize-space(cbc:PaymentMeansCode) != '30') and (normalize-space(cbc:PaymentMeansCode) != '58')) + [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. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:BillingReference" shadowed by preceding rule + + cac:BillingReference + + + + + + + + + + + + + + cac:BillingReference + + + + + + + + exists(cac:InvoiceDocumentReference/cbc:ID) + [BR-55]-Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AccountingSupplierParty" shadowed by preceding rule + + cac:AccountingSupplierParty + + + + + + + + + + + + + + cac:AccountingSupplierParty + + + + + + + + exists(cac:Party/cac:PartyTaxScheme[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:CompanyID) or exists(cac:Party/cac:PartyIdentification/cbc:ID[not(@schemeID = 'SEPA')]) or exists(cac:Party/cac:PartyLegalEntity/cbc:CompanyID) + [BR-CO-26]-In order for the buyer to automatically identify a supplier, the Seller identifier (BT-29), the Seller legal registration identifier (BT-30) and/or the Seller VAT identifier (BT-31) shall be present.  + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AccountingSupplierParty/cac:Party/cbc:EndpointID" shadowed by preceding rule + + cac:AccountingSupplierParty/cac:Party/cbc:EndpointID + + + + + + + + + + + + + + cac:AccountingSupplierParty/cac:Party/cbc:EndpointID + + + + + + + + exists(@schemeID) + [BR-62]-The Seller electronic address (BT-34) shall have a Scheme identifier. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AccountingSupplierParty/cac:Party/cac:PostalAddress" shadowed by preceding rule + + cac:AccountingSupplierParty/cac:Party/cac:PostalAddress + + + + + + + + + + + + + + cac:AccountingSupplierParty/cac:Party/cac:PostalAddress + + + + + + + + normalize-space(cac:Country/cbc:IdentificationCode) != '' + [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:TaxRepresentativeParty" shadowed by preceding rule + + cac:TaxRepresentativeParty + + + + + + + + + + + + + + cac:TaxRepresentativeParty + + + + + + + + normalize-space(cac:PartyName/cbc:Name) != '' + [BR-18]-The Seller tax representative name (BT-62) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11) + + + + + exists(cac:PostalAddress) + [BR-19]-The Seller tax representative postal address (BG-12) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). + + + + + exists(cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID) + [BR-56]-Each Seller tax representative party (BG-11) shall have a Seller tax representative VAT identifier (BT-63). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:TaxRepresentativeParty/cac:PostalAddress" shadowed by preceding rule + + cac:TaxRepresentativeParty/cac:PostalAddress + + + + + + + + + + + + + + cac:TaxRepresentativeParty/cac:PostalAddress + + + + + + + + normalize-space(cac:Country/cbc:IdentificationCode) != '' + [BR-20]-The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11). + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:TaxTotal | /cn:CreditNote/cac:TaxTotal" shadowed by preceding rule + + /ubl:Invoice/cac:TaxTotal | /cn:CreditNote/cac:TaxTotal + + + + + + + + + + + + + + /ubl:Invoice/cac:TaxTotal | /cn:CreditNote/cac:TaxTotal + + + + + + + + (xs:decimal(child::cbc:TaxAmount)= round((sum(cac:TaxSubtotal/xs:decimal(cbc:TaxAmount)) * 10 * 10)) div 100) or not(cac:TaxSubtotal) + [BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:TaxTotal/cac:TaxSubtotal" shadowed by preceding rule + + cac:TaxTotal/cac:TaxSubtotal + + + + + + + + + + + + + + cac:TaxTotal/cac:TaxSubtotal + + + + + + + + exists(cbc:TaxableAmount) + [BR-45]-Each VAT breakdown (BG-23) shall have a VAT category taxable amount (BT-116). + + + + + exists(cbc:TaxAmount) + [BR-46]-Each VAT breakdown (BG-23) shall have a VAT category tax amount (BT-117). + + + + + exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID) + [BR-47]-Each VAT breakdown (BG-23) shall be defined through a VAT category code (BT-118). + + + + + exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:Percent) or (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/normalize-space(cbc:ID)='O') + [BR-48]-Each VAT breakdown (BG-23) shall have a VAT category rate (BT-119), except if the Invoice is not subject to VAT. + + + + + (round(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent)) = 0 and (round(xs:decimal(cbc:TaxAmount)) = 0)) or (round(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent)) != 0 and ((abs(xs:decimal(cbc:TaxAmount)) - 1 < round(abs(xs:decimal(cbc:TaxableAmount)) * (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent) div 100) * 10 * 10) div 100 ) and (abs(xs:decimal(cbc:TaxAmount)) + 1 > round(abs(xs:decimal(cbc:TaxableAmount)) * (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent) div 100) * 10 * 10) div 100 ))) or (not(exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/xs:decimal(cbc:Percent))) and (round(xs:decimal(cbc:TaxAmount)) = 0)) + [BR-CO-17]-VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals. + + + + + string-length(substring-after(cbc:TaxableAmount,'.'))<=2 + [BR-DEC-19]-The allowed maximum number of decimals for the VAT category taxable amount (BT-116) is 2. + + + + + string-length(substring-after(cbc:TaxAmount,'.'))<=2 + [BR-DEC-20]-The allowed maximum number of decimals for the VAT category tax amount (BT-117) is 2.     + + + + + + + + + + + + + + + WARNING: Rule for context "//cac:PartyTaxScheme[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + //cac:PartyTaxScheme[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + //cac:PartyTaxScheme[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + ( contains( ' 1A AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH EL ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS XI YE YT ZA ZM ZW ',substring(cbc:CompanyID,1,2) ) ) + [BR-CO-09]-The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix ‘EL’. + + + + + + + + + + + + + + + WARNING: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (exists(//cac:InvoiceLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='AE']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='AE']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='AE']/xs:decimal(cbc:Amount))))) or (exists(//cac:CreditNoteLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='AE']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='AE']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='AE']/xs:decimal(cbc:Amount))))) + [BR-AE-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Reverse charge" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Reverse charge". + + + + + xs:decimal(../cbc:TaxAmount) = 0 + [BR-AE-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Reverse charge" shall be 0 (zero). + + + + + exists(cbc:TaxExemptionReason) or (exists(cbc:TaxExemptionReasonCode) ) + [BR-AE-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "Reverse charge" shall have a VAT exemption reason code (BT-121), meaning "Reverse charge" or the VAT exemption reason text (BT-120) "Reverse charge" (or the equivalent standard text in another language). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-AE-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Reverse charge" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-AE-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Reverse charge" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'AE'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-AE-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Reverse charge" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (exists(//cac:InvoiceLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='E']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='E']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='E']/xs:decimal(cbc:Amount))))) or (exists(//cac:CreditNoteLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='E']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='E']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='E']/xs:decimal(cbc:Amount))))) + [BR-E-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Exempt from VAT" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Exempt from VAT". + + + + + xs:decimal(../cbc:TaxAmount) = 0 + [BR-E-09]-The VAT category tax amount (BT-117) In a VAT breakdown (BG-23) where the VAT category code (BT-118) equals "Exempt from VAT" shall equal 0 (zero). + + + + + exists(cbc:TaxExemptionReason) or exists(cbc:TaxExemptionReasonCode) + [BR-E-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "Exempt from VAT" shall have a VAT exemption reason code (BT-121) or a VAT exemption reason text (BT-120). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-E-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Exempt from VAT", the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-E-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Exempt from VAT", the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-E-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Exempt from VAT", the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (exists(//cac:InvoiceLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='G']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='G']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='G']/xs:decimal(cbc:Amount))))) or (exists(//cac:CreditNoteLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='G']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='G']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='G']/xs:decimal(cbc:Amount))))) + [BR-G-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Export outside the EU" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Export outside the EU". + + + + + xs:decimal(../cbc:TaxAmount) = 0 + [BR-G-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Export outside the EU" shall be 0 (zero). + + + + + exists(cbc:TaxExemptionReason) or (exists(cbc:TaxExemptionReasonCode) ) + [BR-G-10]-A VAT breakdown (BG-23) with the VAT Category code (BT-118) "Export outside the EU" shall have a VAT exemption reason code (BT-121), meaning "Export outside the EU" or the VAT exemption reason text (BT-120) "Export outside the EU" (or the equivalent standard text in another language). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-G-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Export outside the EU" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-G-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Export outside the EU" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'G'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-G-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Export outside the EU" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (exists(//cac:InvoiceLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='K']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='K']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='K']/xs:decimal(cbc:Amount))))) or (exists(//cac:CreditNoteLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='K']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='K']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='K']/xs:decimal(cbc:Amount))))) + [BR-IC-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Intra-community supply". + + + + + xs:decimal(../cbc:TaxAmount) = 0 + [BR-IC-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" shall be 0 (zero). + + + + + exists(cbc:TaxExemptionReason) or (exists(cbc:TaxExemptionReasonCode) ) + [BR-IC-10]-A VAT breakdown (BG-23) with the VAT Category code (BT-118) "Intra-community supply" shall have a VAT exemption reason code (BT-121), meaning "Intra-community supply" or the VAT exemption reason text (BT-120) "Intra-community supply" (or the equivalent standard text in another language). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-IC-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Intra-community supply" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-IC-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Intra-community supply" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'K'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-IC-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Intracommunity supply" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + every $rate in xs:decimal(cbc:Percent) satisfies ((exists(//cac:InvoiceLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))) or (exists(//cac:CreditNoteLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount))))))) + [BR-AF-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IGIC", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IGIC" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). + + + + + (abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) + [BR-AF-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IGIC" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). + + + + + not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode) + [BR-AF-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "IGIC" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (cbc:Percent) >= 0 + [BR-AF-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (cbc:Percent) >= 0 + [BR-AF-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']| cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']| cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']| cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (cbc:Percent) >= 0 + [BR-AF-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" the invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero. + + + + + + + + + + + + + + + WARNING: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + every $rate in xs:decimal(cbc:Percent) satisfies ((exists(//cac:InvoiceLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))) or (exists(//cac:CreditNoteLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount))))))) + [BR-AG-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IPSI", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IPSI" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). + + + + + (abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) + [BR-AG-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IPSI" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). + + + + + not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode) + [BR-AG-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "IPSI" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (cbc:Percent) >= 0 + [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. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (cbc:Percent) >= 0 + [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. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']| cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']| cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']| cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (cbc:Percent) >= 0 + [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. + + + + + + + + + + + + + + + WARNING: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (exists(//cac:InvoiceLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:Amount))))) or (exists(//cac:CreditNoteLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:Amount))))) + [BR-O-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Not subject to VAT" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Not subject to VAT". + + + + + xs:decimal(../cbc:TaxAmount) = 0 + [BR-O-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Not subject to VAT" shall be 0 (zero). + + + + + exists(cbc:TaxExemptionReason) or (exists(cbc:TaxExemptionReasonCode) ) + [BR-O-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) " Not subject to VAT" shall have a VAT exemption reason code (BT-121), meaning " Not subject to VAT" or a VAT exemption reason text (BT-120) " Not subject to VAT" (or the equivalent standard text in another language). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + not(cbc:Percent) + [BR-O-06]-A Document level allowance (BG-20) where VAT category code (BT-95) is "Not subject to VAT" shall not contain a Document level allowance VAT rate (BT-96). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + not(cbc:Percent) + [BR-O-07]-A Document level charge (BG-21) where the VAT category code (BT-102) is "Not subject to VAT" shall not contain a Document level charge VAT rate (BT-103). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + not(cbc:Percent) + [BR-O-05]-An Invoice line (BG-25) where the VAT category code (BT-151) is "Not subject to VAT" shall not contain an Invoiced item VAT rate (BT-152). + + + + + + + + + + + + + + + WARNING: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + every $rate in xs:decimal(cbc:Percent) satisfies (((exists(//cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID) = 'S'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]) or exists(//cac:AllowanceCharge[cac:TaxCategory/normalize-space(cbc:ID)='S'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate])) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='S'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='S'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='S'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='S'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='S'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='S'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))) or (exists(//cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID) = 'S'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]) or exists(//cac:AllowanceCharge[cac:TaxCategory/normalize-space(cbc:ID)='S'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate])) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='S'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='S'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='S'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='S'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='S'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='S'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))) + [BR-S-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "Standard rated", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "Standard rated" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). + + + + + (abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) + [BR-S-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Standard rated" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). + + + + + not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode) + [BR-S-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "Standard rate" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (cbc:Percent) > 0 + [BR-S-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Standard rated" the Document level allowance VAT rate (BT-96) shall be greater than zero. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (cbc:Percent) > 0 + [BR-S-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Standard rated" the Document level charge VAT rate (BT-103) shall be greater than zero.  + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (cbc:Percent) > 0 + [BR-S-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Standard rated" the Invoiced item VAT rate (BT-152) shall be greater than zero. + + + + + + + + + + + + + + + WARNING: Rule for context "/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (exists(//cac:InvoiceLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='Z']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='Z']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='Z']/xs:decimal(cbc:Amount))))) or (exists(//cac:CreditNoteLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='Z']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='Z']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='Z']/xs:decimal(cbc:Amount))))) + [BR-Z-08]-In a VAT breakdown (BG-23) where VAT category code (BT-118) is "Zero rated" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amount (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Zero rated". + + + + + xs:decimal(../cbc:TaxAmount) = 0 + [BR-Z-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Zero rated" shall equal 0 (zero). + + + + + not((cbc:TaxExemptionReason) or (cbc:TaxExemptionReasonCode)) + [BR-Z-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "Zero rated" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-Z-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Zero rated" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-Z-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Zero rated" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']" shadowed by preceding rule + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + + + + + + + cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] | cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'Z'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] + + + + + + + + (xs:decimal(cbc:Percent) = 0) + [BR-Z-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Zero rated" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + + WARNING: Rule for context "//cac:PostalAddress | //cac:Address " shadowed by preceding rule + + //cac:PostalAddress | //cac:Address + + + + + + + + + + + + + + //cac:PostalAddress | //cac:Address + + + + + + + + not(cac:AddressLine) or count(cac:AddressLine) = 1 + [UBL-SR-51]-An address can only have one third line. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AccountingSupplierParty/cac:Party" shadowed by preceding rule + + cac:AccountingSupplierParty/cac:Party + + + + + + + + + + + + + + cac:AccountingSupplierParty/cac:Party + + + + + + + + (count(cac:PartyTaxScheme) <= 2) + [UBL-SR-42]-Party tax scheme shall occur maximum twice in accounting supplier party + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AdditionalDocumentReference" shadowed by preceding rule + + cac:AdditionalDocumentReference + + + + + + + + + + + + + + cac:AdditionalDocumentReference + + + + + + + + (count(cbc:DocumentDescription) <= 1) + [UBL-SR-33]-Supporting document description shall occur maximum once + + + + + ((cbc:DocumentTypeCode='130') or ((local-name(/*) = 'CreditNote') and (cbc:DocumentTypeCode='50')) or (not(cbc:ID/@schemeID) and not(cbc:DocumentTypeCode))) + [UBL-SR-43]-Scheme identifier shall only be used for invoiced object (document type code with value 130 or 50) + + + + + + + + + + + + + + + WARNING: Rule for context "//*[ends-with(name(), 'Amount') and not(ends-with(name(),'PriceAmount')) and not(ancestor::cac:Price/cac:AllowanceCharge)]" shadowed by preceding rule + + //*[ends-with(name(), 'Amount') and not(ends-with(name(),'PriceAmount')) and not(ancestor::cac:Price/cac:AllowanceCharge)] + + + + + + + + + + + + + + //*[ends-with(name(), 'Amount') and not(ends-with(name(),'PriceAmount')) and not(ancestor::cac:Price/cac:AllowanceCharge)] + + + + + + + + string-length(substring-after(.,'.'))<=2 + [UBL-DT-01]-Amounts shall be decimal up to two fraction digits + + + + + + + + + + + + + + + WARNING: Rule for context "//*[ends-with(name(), 'BinaryObject')]" shadowed by preceding rule + + //*[ends-with(name(), 'BinaryObject')] + + + + + + + + + + + + + + //*[ends-with(name(), 'BinaryObject')] + + + + + + + + (@mimeCode) + [UBL-DT-06]-Binary object elements shall contain the mime code attribute + + + + + (@filename) + [UBL-DT-07]-Binary object elements shall contain the file name attribute + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Delivery" shadowed by preceding rule + + cac:Delivery + + + + + + + + + + + + + + cac:Delivery + + + + + + + + (count(cac:DeliveryParty/cac:PartyName/cbc:Name) <= 1) + [UBL-SR-25]-Deliver to party name shall occur maximum once + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator = false()]" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator = false()] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator = false()] + + + + + + + + (count(cbc:AllowanceChargeReason) <= 1) + [UBL-SR-30]-Document level allowance reason shall occur maximum once + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator = true()]" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator = true()] + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator = true()] + + + + + + + + (count(cbc:AllowanceChargeReason) <= 1) + [UBL-SR-31]-Document level charge reason shall occur maximum once + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PartyTaxScheme" shadowed by preceding rule + + cac:PartyTaxScheme + + + + + + + + + + + + + + cac:PartyTaxScheme + + + + + + + + exists(cac:TaxScheme/cbc:ID) and exists(cbc:CompanyID) + [UBL-SR-53]- CompanyID (VAT Identifier) must be stated when providing the PartyTaxScheme/TaxScheme/ID. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice | /cn:CreditNote" shadowed by preceding rule + + /ubl:Invoice | /cn:CreditNote + + + + + + + + + + + + + + /ubl:Invoice | /cn:CreditNote + + + + + + + + not(ext:UBLExtensions) + [UBL-CR-001]-A UBL invoice should not include extensions + + + + + not(cbc:UBLVersionID) or cbc:UBLVersionID = '2.1' + [UBL-CR-002]-A UBL invoice should not include the UBLVersionID or it should be 2.1 + + + + + not(cbc:ProfileExecutionID) + [UBL-CR-003]-A UBL invoice should not include the ProfileExecutionID + + + + + not(cbc:CopyIndicator) + [UBL-CR-004]-A UBL invoice should not include the CopyIndicator + + + + + not(cbc:UUID) + [UBL-CR-005]-A UBL invoice should not include the UUID + + + + + not(cbc:IssueTime) + [UBL-CR-006]-A UBL invoice should not include the IssueTime + + + + + not(cbc:PricingCurrencyCode) + [UBL-CR-007]-A UBL invoice should not include the PricingCurrencyCode + + + + + not(cbc:PaymentCurrencyCode) + [UBL-CR-008]-A UBL invoice should not include the PaymentCurrencyCode + + + + + not(cbc:PaymentAlternativeCurrencyCode) + [UBL-CR-009]-A UBL invoice should not include the PaymentAlternativeCurrencyCode + + + + + not(cbc:AccountingCostCode) + [UBL-CR-010]-A UBL invoice should not include the AccountingCostCode + + + + + not(cbc:LineCountNumeric) + [UBL-CR-011]-A UBL invoice should not include the LineCountNumeric + + + + + not(cac:InvoicePeriod/cbc:StartTime) + [UBL-CR-012]-A UBL invoice should not include the InvoicePeriod StartTime + + + + + not(cac:InvoicePeriod/cbc:EndTime) + [UBL-CR-013]-A UBL invoice should not include the InvoicePeriod EndTime + + + + + not(cac:InvoicePeriod/cbc:DurationMeasure) + [UBL-CR-014]-A UBL invoice should not include the InvoicePeriod DurationMeasure + + + + + not(cac:InvoicePeriod/cbc:Description) + [UBL-CR-015]-A UBL invoice should not include the InvoicePeriod Description + + + + + not(cac:OrderReference/cbc:CopyIndicator) + [UBL-CR-016]-A UBL invoice should not include the OrderReference CopyIndicator + + + + + not(cac:OrderReference/cbc:UUID) + [UBL-CR-017]-A UBL invoice should not include the OrderReference UUID + + + + + not(cac:OrderReference/cbc:IssueDate) + [UBL-CR-018]-A UBL invoice should not include the OrderReference IssueDate + + + + + not(cac:OrderReference/cbc:IssueTime) + [UBL-CR-019]-A UBL invoice should not include the OrderReference IssueTime + + + + + not(cac:OrderReference/cbc:CustomerReference) + [UBL-CR-020]-A UBL invoice should not include the OrderReference CustomerReference + + + + + not(cac:OrderReference/cbc:OrderTypeCode) + [UBL-CR-021]-A UBL invoice should not include the OrderReference OrderTypeCode + + + + + not(cac:OrderReference/cac:DocumentReference) + [UBL-CR-022]-A UBL invoice should not include the OrderReference DocumentReference + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cbc:CopyIndicator) + [UBL-CR-023]-A UBL invoice should not include the BillingReference CopyIndicator + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cbc:UUID) + [UBL-CR-024]-A UBL invoice should not include the BillingReference UUID + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cbc:IssueTime) + [UBL-CR-025]-A UBL invoice should not include the BillingReference IssueTime + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cbc:DocumentTypeCode) + [UBL-CR-026]-A UBL invoice should not include the BillingReference DocumentTypeCode + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cbc:DocumentType) + [UBL-CR-027]-A UBL invoice should not include the BillingReference DocumentType + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cbc:XPath) + [UBL-CR-028]-A UBL invoice should not include the BillingReference Xpath + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cbc:LanguageID) + [UBL-CR-029]-A UBL invoice should not include the BillingReference LanguageID + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cbc:LocaleCode) + [UBL-CR-030]-A UBL invoice should not include the BillingReference LocaleCode + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cbc:VersionID) + [UBL-CR-031]-A UBL invoice should not include the BillingReference VersionID + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cbc:DocumentStatusCode) + [UBL-CR-032]-A UBL invoice should not include the BillingReference DocumentStatusCode + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cbc:DocumentDescription) + [UBL-CR-033]-A UBL invoice should not include the BillingReference DocumenDescription + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cac:Attachment) + [UBL-CR-034]-A UBL invoice should not include the BillingReference Attachment + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cac:ValidityPeriod) + [UBL-CR-035]-A UBL invoice should not include the BillingReference ValidityPeriod + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cac:IssuerParty) + [UBL-CR-036]-A UBL invoice should not include the BillingReference IssuerParty + + + + + not(cac:BillingReference/cac:InvoiceDocumentReference/cac:ResultOfVerification) + [UBL-CR-037]-A UBL invoice should not include the BillingReference ResultOfVerification + + + + + not(cac:BillingReference/cac:SelfBilledInvoiceDocumentReference) + [UBL-CR-038]-A UBL invoice should not include the BillingReference SelfBilledInvoiceDocumentReference + + + + + not(cac:BillingReference/cac:CreditNoteDocumentReference) + [UBL-CR-039]-A UBL invoice should not include the BillingReference CreditNoteDocumentReference + + + + + not(cac:BillingReference/cac:SelfBilledCreditNoteDocumentReference) + [UBL-CR-040]-A UBL invoice should not include the BillingReference SelfBilledCreditNoteDocumentReference + + + + + not(cac:BillingReference/cac:DebitNoteDocumentReference) + [UBL-CR-041]-A UBL invoice should not include the BillingReference DebitNoteDocumentReference + + + + + not(cac:BillingReference/cac:ReminderDocumentReference) + [UBL-CR-042]-A UBL invoice should not include the BillingReference ReminderDocumentReference + + + + + not(cac:BillingReference/cac:AdditionalDocumentReference) + [UBL-CR-043]-A UBL invoice should not include the BillingReference AdditionalDocumentReference + + + + + not(cac:BillingReference/cac:BillingReferenceLine) + [UBL-CR-044]-A UBL invoice should not include the BillingReference BillingReferenceLine + + + + + not(cac:DespatchDocumentReference/cbc:CopyIndicator) + [UBL-CR-045]-A UBL invoice should not include the DespatchDocumentReference CopyIndicator + + + + + not(cac:DespatchDocumentReference/cbc:UUID) + [UBL-CR-046]-A UBL invoice should not include the DespatchDocumentReference UUID + + + + + not(cac:DespatchDocumentReference/cbc:IssueDate) + [UBL-CR-047]-A UBL invoice should not include the DespatchDocumentReference IssueDate + + + + + not(cac:DespatchDocumentReference/cbc:IssueTime) + [UBL-CR-048]-A UBL invoice should not include the DespatchDocumentReference IssueTime + + + + + not(cac:DespatchDocumentReference/cbc:DocumentTypeCode) + [UBL-CR-049]-A UBL invoice should not include the DespatchDocumentReference DocumentTypeCode + + + + + not(cac:DespatchDocumentReference/cbc:DocumentType) + [UBL-CR-050]-A UBL invoice should not include the DespatchDocumentReference DocumentType + + + + + not(cac:DespatchDocumentReference/cbc:XPath) + [UBL-CR-051]-A UBL invoice should not include the DespatchDocumentReference Xpath + + + + + not(cac:DespatchDocumentReference/cbc:LanguageID) + [UBL-CR-052]-A UBL invoice should not include the DespatchDocumentReference LanguageID + + + + + not(cac:DespatchDocumentReference/cbc:LocaleCode) + [UBL-CR-053]-A UBL invoice should not include the DespatchDocumentReference LocaleCode + + + + + not(cac:DespatchDocumentReference/cbc:VersionID) + [UBL-CR-054]-A UBL invoice should not include the DespatchDocumentReference VersionID + + + + + not(cac:DespatchDocumentReference/cbc:DocumentStatusCode) + [UBL-CR-055]-A UBL invoice should not include the DespatchDocumentReference DocumentStatusCode + + + + + not(cac:DespatchDocumentReference/cbc:DocumentDescription) + [UBL-CR-056]-A UBL invoice should not include the DespatchDocumentReference DocumentDescription + + + + + not(cac:DespatchDocumentReference/cac:Attachment) + [UBL-CR-057]-A UBL invoice should not include the DespatchDocumentReference Attachment + + + + + not(cac:DespatchDocumentReference/cac:ValidityPeriod) + [UBL-CR-058]-A UBL invoice should not include the DespatchDocumentReference ValidityPeriod + + + + + not(cac:DespatchDocumentReference/cac:IssuerParty) + [UBL-CR-059]-A UBL invoice should not include the DespatchDocumentReference IssuerParty + + + + + not(cac:DespatchDocumentReference/cac:ResultOfVerification) + [UBL-CR-060]-A UBL invoice should not include the DespatchDocumentReference ResultOfVerification + + + + + not(cac:ReceiptDocumentReference/cbc:CopyIndicator) + [UBL-CR-061]-A UBL invoice should not include the ReceiptDocumentReference CopyIndicator + + + + + not(cac:ReceiptDocumentReference/cbc:UUID) + [UBL-CR-062]-A UBL invoice should not include the ReceiptDocumentReference UUID + + + + + not(cac:ReceiptDocumentReference/cbc:IssueDate) + [UBL-CR-063]-A UBL invoice should not include the ReceiptDocumentReference IssueDate + + + + + not(cac:ReceiptDocumentReference/cbc:IssueTime) + [UBL-CR-064]-A UBL invoice should not include the ReceiptDocumentReference IssueTime + + + + + not(cac:ReceiptDocumentReference/cbc:DocumentTypeCode) + [UBL-CR-065]-A UBL invoice should not include the ReceiptDocumentReference DocumentTypeCode + + + + + not(cac:ReceiptDocumentReference/cbc:DocumentType) + [UBL-CR-066]-A UBL invoice should not include the ReceiptDocumentReference DocumentType + + + + + not(cac:ReceiptDocumentReference/cbc:XPath) + [UBL-CR-067]-A UBL invoice should not include the ReceiptDocumentReference Xpath + + + + + not(cac:ReceiptDocumentReference/cbc:LanguageID) + [UBL-CR-068]-A UBL invoice should not include the ReceiptDocumentReference LanguageID + + + + + not(cac:ReceiptDocumentReference/cbc:LocaleCode) + [UBL-CR-069]-A UBL invoice should not include the ReceiptDocumentReference LocaleCode + + + + + not(cac:ReceiptDocumentReference/cbc:VersionID) + [UBL-CR-070]-A UBL invoice should not include the ReceiptDocumentReference VersionID + + + + + not(cac:ReceiptDocumentReference/cbc:DocumentStatusCode) + [UBL-CR-071]-A UBL invoice should not include the ReceiptDocumentReference DocumentStatusCode + + + + + not(cac:ReceiptDocumentReference/cbc:DocumentDescription) + [UBL-CR-072]-A UBL invoice should not include the ReceiptDocumentReference DocumentDescription + + + + + not(cac:ReceiptDocumentReference/cac:Attachment) + [UBL-CR-073]-A UBL invoice should not include the ReceiptDocumentReference Attachment + + + + + not(cac:ReceiptDocumentReference/cac:ValidityPeriod) + [UBL-CR-074]-A UBL invoice should not include the ReceiptDocumentReference ValidityPeriod + + + + + not(cac:ReceiptDocumentReference/cac:IssuerParty) + [UBL-CR-075]-A UBL invoice should not include the ReceiptDocumentReference IssuerParty + + + + + not(cac:ReceiptDocumentReference/cac:ResultOfVerification) + [UBL-CR-076]-A UBL invoice should not include the ReceiptDocumentReference ResultOfVerification + + + + + not(cac:StatementDocumentReference) + [UBL-CR-077]-A UBL invoice should not include the StatementDocumentReference + + + + + not(cac:OriginatorDocumentReference/cbc:CopyIndicator) + [UBL-CR-078]-A UBL invoice should not include the OriginatorDocumentReference CopyIndicator + + + + + not(cac:OriginatorDocumentReference/cbc:UUID) + [UBL-CR-079]-A UBL invoice should not include the OriginatorDocumentReference UUID + + + + + not(cac:OriginatorDocumentReference/cbc:IssueDate) + [UBL-CR-080]-A UBL invoice should not include the OriginatorDocumentReference IssueDate + + + + + not(cac:OriginatorDocumentReference/cbc:IssueTime) + [UBL-CR-081]-A UBL invoice should not include the OriginatorDocumentReference IssueTime + + + + + not(cac:OriginatorDocumentReference/cbc:DocumentTypeCode) + [UBL-CR-082]-A UBL invoice should not include the OriginatorDocumentReference DocumentTypeCode + + + + + not(cac:OriginatorDocumentReference/cbc:DocumentType) + [UBL-CR-083]-A UBL invoice should not include the OriginatorDocumentReference DocumentType + + + + + not(cac:OriginatorDocumentReference/cbc:XPath) + [UBL-CR-084]-A UBL invoice should not include the OriginatorDocumentReference Xpath + + + + + not(cac:OriginatorDocumentReference/cbc:LanguageID) + [UBL-CR-085]-A UBL invoice should not include the OriginatorDocumentReference LanguageID + + + + + not(cac:OriginatorDocumentReference/cbc:LocaleCode) + [UBL-CR-086]-A UBL invoice should not include the OriginatorDocumentReference LocaleCode + + + + + not(cac:OriginatorDocumentReference/cbc:VersionID) + [UBL-CR-087]-A UBL invoice should not include the OriginatorDocumentReference VersionID + + + + + not(cac:OriginatorDocumentReference/cbc:DocumentStatusCode) + [UBL-CR-088]-A UBL invoice should not include the OriginatorDocumentReference DocumentStatusCode + + + + + not(cac:OriginatorDocumentReference/cbc:DocumentDescription) + [UBL-CR-089]-A UBL invoice should not include the OriginatorDocumentReference DocumentDescription + + + + + not(cac:OriginatorDocumentReference/cac:Attachment) + [UBL-CR-090]-A UBL invoice should not include the OriginatorDocumentReference Attachment + + + + + not(cac:OriginatorDocumentReference/cac:ValidityPeriod) + [UBL-CR-091]-A UBL invoice should not include the OriginatorDocumentReference ValidityPeriod + + + + + not(cac:OriginatorDocumentReference/cac:IssuerParty) + [UBL-CR-092]-A UBL invoice should not include the OriginatorDocumentReference IssuerParty + + + + + not(cac:OriginatorDocumentReference/cac:ResultOfVerification) + [UBL-CR-093]-A UBL invoice should not include the OriginatorDocumentReference ResultOfVerification + + + + + not(cac:ContractDocumentReference/cbc:CopyIndicator) + [UBL-CR-094]-A UBL invoice should not include the ContractDocumentReference CopyIndicator + + + + + not(cac:ContractDocumentReference/cbc:UUID) + [UBL-CR-095]-A UBL invoice should not include the ContractDocumentReference UUID + + + + + not(cac:ContractDocumentReference/cbc:IssueDate) + [UBL-CR-096]-A UBL invoice should not include the ContractDocumentReference IssueDate + + + + + not(cac:ContractDocumentReference/cbc:IssueTime) + [UBL-CR-097]-A UBL invoice should not include the ContractDocumentReference IssueTime + + + + + not(cac:ContractDocumentReference/cbc:DocumentTypeCode) + [UBL-CR-098]-A UBL invoice should not include the ContractDocumentReference DocumentTypeCode + + + + + not(cac:ContractDocumentReference/cbc:DocumentType) + [UBL-CR-099]-A UBL invoice should not include the ContractDocumentReference DocumentType + + + + + not(cac:ContractDocumentReference/cbc:XPath) + [UBL-CR-100]-A UBL invoice should not include the ContractDocumentReference Xpath + + + + + not(cac:ContractDocumentReference/cbc:LanguageID) + [UBL-CR-101]-A UBL invoice should not include the ContractDocumentReference LanguageID + + + + + not(cac:ContractDocumentReference/cbc:LocaleCode) + [UBL-CR-102]-A UBL invoice should not include the ContractDocumentReference LocaleCode + + + + + not(cac:ContractDocumentReference/cbc:VersionID) + [UBL-CR-103]-A UBL invoice should not include the ContractDocumentReference VersionID + + + + + not(cac:ContractDocumentReference/cbc:DocumentStatusCode) + [UBL-CR-104]-A UBL invoice should not include the ContractDocumentReference DocumentStatusCode + + + + + not(cac:ContractDocumentReference/cbc:DocumentDescription) + [UBL-CR-105]-A UBL invoice should not include the ContractDocumentReference DocumentDescription + + + + + not(cac:ContractDocumentReference/cac:Attachment) + [UBL-CR-106]-A UBL invoice should not include the ContractDocumentReference Attachment + + + + + not(cac:ContractDocumentReference/cac:ValidityPeriod) + [UBL-CR-107]-A UBL invoice should not include the ContractDocumentReference ValidityPeriod + + + + + not(cac:ContractDocumentReference/cac:IssuerParty) + [UBL-CR-108]-A UBL invoice should not include the ContractDocumentReference IssuerParty + + + + + not(cac:ContractDocumentReference/cac:ResultOfVerification) + [UBL-CR-109]-A UBL invoice should not include the ContractDocumentReference ResultOfVerification + + + + + not(cac:AdditionalDocumentReference/cbc:CopyIndicator) + [UBL-CR-110]-A UBL invoice should not include the AdditionalDocumentReference CopyIndicator + + + + + not(cac:AdditionalDocumentReference/cbc:UUID) + [UBL-CR-111]-A UBL invoice should not include the AdditionalDocumentReference UUID + + + + + not(cac:AdditionalDocumentReference/cbc:IssueDate) + [UBL-CR-112]-A UBL invoice should not include the AdditionalDocumentReference IssueDate + + + + + not(cac:AdditionalDocumentReference/cbc:IssueTime) + [UBL-CR-113]-A UBL invoice should not include the AdditionalDocumentReference IssueTime + + + + + not(cac:AdditionalDocumentReference/cbc:DocumentType) + [UBL-CR-114]-A UBL invoice should not include the AdditionalDocumentReference DocumentType + + + + + not(cac:AdditionalDocumentReference/cbc:XPath) + [UBL-CR-115]-A UBL invoice should not include the AdditionalDocumentReference Xpath + + + + + not(cac:AdditionalDocumentReference/cbc:LanguageID) + [UBL-CR-116]-A UBL invoice should not include the AdditionalDocumentReference LanguageID + + + + + not(cac:AdditionalDocumentReference/cbc:LocaleCode) + [UBL-CR-117]-A UBL invoice should not include the AdditionalDocumentReference LocaleCode + + + + + not(cac:AdditionalDocumentReference/cbc:VersionID) + [UBL-CR-118]-A UBL invoice should not include the AdditionalDocumentReference VersionID + + + + + not(cac:AdditionalDocumentReference/cbc:DocumentStatusCode) + [UBL-CR-119]-A UBL invoice should not include the AdditionalDocumentReference DocumentStatusCode + + + + + not(cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:DocumentHash) + [UBL-CR-121]-A UBL invoice should not include the AdditionalDocumentReference Attachment External DocumentHash + + + + + not(cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:HashAlgorithmMethod) + [UBL-CR-122]-A UBL invoice should not include the AdditionalDocumentReference Attachment External HashAlgorithmMethod + + + + + not(cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:ExpiryDate) + [UBL-CR-123]-A UBL invoice should not include the AdditionalDocumentReference Attachment External ExpiryDate + + + + + not(cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:ExpiryTime) + [UBL-CR-124]-A UBL invoice should not include the AdditionalDocumentReference Attachment External ExpiryTime + + + + + not(cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:MimeCode) + [UBL-CR-125]-A UBL invoice should not include the AdditionalDocumentReference Attachment External MimeCode + + + + + not(cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:FormatCode) + [UBL-CR-126]-A UBL invoice should not include the AdditionalDocumentReference Attachment External FormatCode + + + + + not(cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:EncodingCode) + [UBL-CR-127]-A UBL invoice should not include the AdditionalDocumentReference Attachment External EncodingCode + + + + + not(cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:CharacterSetCode) + [UBL-CR-128]-A UBL invoice should not include the AdditionalDocumentReference Attachment External CharacterSetCode + + + + + not(cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:FileName) + [UBL-CR-129]-A UBL invoice should not include the AdditionalDocumentReference Attachment External FileName + + + + + not(cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:Description) + [UBL-CR-130]-A UBL invoice should not include the AdditionalDocumentReference Attachment External Descriprion + + + + + not(cac:AdditionalDocumentReference/cac:ValidityPeriod) + [UBL-CR-131]-A UBL invoice should not include the AdditionalDocumentReference ValidityPeriod + + + + + not(cac:AdditionalDocumentReference/cac:IssuerParty) + [UBL-CR-132]-A UBL invoice should not include the AdditionalDocumentReference IssuerParty + + + + + not(cac:AdditionalDocumentReference/cac:ResultOfVerification) + [UBL-CR-133]-A UBL invoice should not include the AdditionalDocumentReference ResultOfVerification + + + + + not(cac:ProjectReference/cbc:UUID) + [UBL-CR-134]-A UBL invoice should not include the ProjectReference UUID + + + + + not(cac:ProjectReference/cbc:IssueDate) + [UBL-CR-135]-A UBL invoice should not include the ProjectReference IssueDate + + + + + not(cac:ProjectReference/cac:WorkPhaseReference) + [UBL-CR-136]-A UBL invoice should not include the ProjectReference WorkPhaseReference + + + + + not(cac:Signature) + [UBL-CR-137]-A UBL invoice should not include the Signature + + + + + not(cac:AccountingSupplierParty/cbc:CustomerAssignedAccountID) + [UBL-CR-138]-A UBL invoice should not include the AccountingSupplierParty CustomerAssignedAccountID + + + + + not(cac:AccountingSupplierParty/cbc:AdditionalAccountID) + [UBL-CR-139]-A UBL invoice should not include the AccountingSupplierParty AdditionalAccountID + + + + + not(cac:AccountingSupplierParty/cbc:DataSendingCapability) + [UBL-CR-140]-A UBL invoice should not include the AccountingSupplierParty DataSendingCapability + + + + + not(cac:AccountingSupplierParty/cac:Party/cbc:MarkCareIndicator) + [UBL-CR-141]-A UBL invoice should not include the AccountingSupplierParty Party MarkCareIndicator + + + + + not(cac:AccountingSupplierParty/cac:Party/cbc:MarkAttentionIndicator) + [UBL-CR-142]-A UBL invoice should not include the AccountingSupplierParty Party MarkAttentionIndicator + + + + + not(cac:AccountingSupplierParty/cac:Party/cbc:WebsiteURI) + [UBL-CR-143]-A UBL invoice should not include the AccountingSupplierParty Party WebsiteURI + + + + + not(cac:AccountingSupplierParty/cac:Party/cbc:LogoReferenceID) + [UBL-CR-144]-A UBL invoice should not include the AccountingSupplierParty Party LogoReferenceID + + + + + not(cac:AccountingSupplierParty/cac:Party/cbc:IndustryClassificationCode) + [UBL-CR-145]-A UBL invoice should not include the AccountingSupplierParty Party IndustryClassificationCode + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:Language) + [UBL-CR-146]-A UBL invoice should not include the AccountingSupplierParty Party Language + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:ID) + [UBL-CR-147]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress ID + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:AddressTypeCode) + [UBL-CR-148]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress AddressTypeCode + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:AddressFormatCode) + [UBL-CR-149]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress AddressFormatCode + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:Postbox) + [UBL-CR-150]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress Postbox + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:Floor) + [UBL-CR-151]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress Floor + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:Room) + [UBL-CR-152]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress Room + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:BlockName) + [UBL-CR-153]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress BlockName + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:BuildingName) + [UBL-CR-154]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress BuildingName + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:BuildingNumber) + [UBL-CR-155]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress BuildingNumber + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:InhouseMail) + [UBL-CR-156]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress InhouseMail + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:Department) + [UBL-CR-157]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress Department + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:MarkAttention) + [UBL-CR-158]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress MarkAttention + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:MarkCare) + [UBL-CR-159]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress MarkCare + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:PlotIdentification) + [UBL-CR-160]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress PlotIdentification + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CitySubdivisionName) + [UBL-CR-161]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress CitySubdivisionName + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CountrySubentityCode) + [UBL-CR-162]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress CountrySubentityCode + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:Region) + [UBL-CR-163]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress Region + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:District) + [UBL-CR-164]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress District + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:TimezoneOffset) + [UBL-CR-165]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress TimezoneOffset + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country/cbc:Name) + [UBL-CR-166]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress Country Name + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:LocationCoordinate) + [UBL-CR-167]-A UBL invoice should not include the AccountingSupplierParty Party PostalAddress LocationCoordinate + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PhysicalLocation) + [UBL-CR-168]-A UBL invoice should not include the AccountingSupplierParty Party PhysicalLocation + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:RegistrationName) + [UBL-CR-169]-A UBL invoice should not include the AccountingSupplierParty Party PartyTaxScheme RegistrationName + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:TaxLevelCode) + [UBL-CR-170]-A UBL invoice should not include the AccountingSupplierParty Party PartyTaxScheme TaxLevelCode + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:ExemptionReasonCode) + [UBL-CR-171]-A UBL invoice should not include the AccountingSupplierParty Party PartyTaxScheme ExemptionReasonCode + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:ExemptionReason) + [UBL-CR-172]-A UBL invoice should not include the AccountingSupplierParty Party PartyTaxScheme ExemptionReason + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cac:RegistrationAddress) + [UBL-CR-173]-A UBL invoice should not include the AccountingSupplierParty Party PartyTaxScheme RegistrationAddress + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme/cbc:Name) + [UBL-CR-174]-A UBL invoice should not include the AccountingSupplierParty Party PartyTaxScheme TaxScheme Name + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme/cbc:TaxTypeCode) + [UBL-CR-175]-A UBL invoice should not include the AccountingSupplierParty Party PartyTaxScheme TaxScheme TaxTypeCode + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme/cbc:CurrencyCode) + [UBL-CR-176]-A UBL invoice should not include the AccountingSupplierParty Party PartyTaxScheme TaxScheme CurrencyCode + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme/cac:JurisdictionRegionAddress) + [UBL-CR-177]-A UBL invoice should not include the AccountingSupplierParty Party PartyTaxScheme TaxScheme JurisdictionRegionAddress + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationDate) + [UBL-CR-178]-A UBL invoice should not include the AccountingSupplierParty Party PartyLegalEntity RegistrationDate + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationExpirationDate) + [UBL-CR-179]-A UBL invoice should not include the AccountingSupplierParty Party PartyLegalEntity RegistrationExpirationDate + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyLegalFormCode) + [UBL-CR-180]-A UBL invoice should not include the AccountingSupplierParty Party PartyLegalEntity CompanyLegalFormCode + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:SoleProprietorshipIndicator) + [UBL-CR-181]-A UBL invoice should not include the AccountingSupplierParty Party PartyLegalEntity SoleProprietorshipIndicator + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyLiquidationStatusCode) + [UBL-CR-182]-A UBL invoice should not include the AccountingSupplierParty Party PartyLegalEntity CompanyLiquidationStatusCode + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CorporateStockAmount) + [UBL-CR-183]-A UBL invoice should not include the AccountingSupplierParty Party PartyLegalEntity CorporateStockAmount + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:FullyPaidSharesIndicator) + [UBL-CR-184]-A UBL invoice should not include the AccountingSupplierParty Party PartyLegalEntity FullyPaidSharesIndicator + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cac:RegistrationAddress) + [UBL-CR-185]-A UBL invoice should not include the AccountingSupplierParty Party PartyLegalEntity RegistrationAddress + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cac:CorporateRegistrationScheme) + [UBL-CR-186]-A UBL invoice should not include the AccountingSupplierParty Party PartyLegalEntity CorporateRegistrationScheme + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cac:HeadOfficeParty) + [UBL-CR-187]-A UBL invoice should not include the AccountingSupplierParty Party PartyLegalEntity HeadOfficeParty + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cac:ShareholderParty) + [UBL-CR-188]-A UBL invoice should not include the AccountingSupplierParty Party PartyLegalEntity ShareholderParty + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:Contact/cbc:ID) + [UBL-CR-189]-A UBL invoice should not include the AccountingSupplierParty Party Contact ID + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:Contact/cbc:Telefax) + [UBL-CR-190]-A UBL invoice should not include the AccountingSupplierParty Party Contact Telefax + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:Contact/cbc:Note) + [UBL-CR-191]-A UBL invoice should not include the AccountingSupplierParty Party Contact Note + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:Contact/cac:OtherCommunication) + [UBL-CR-192]-A UBL invoice should not include the AccountingSupplierParty Party Contact OtherCommunication + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:Person) + [UBL-CR-193]-A UBL invoice should not include the AccountingSupplierParty Party Person + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:AgentParty) + [UBL-CR-194]-A UBL invoice should not include the AccountingSupplierParty Party AgentParty + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:ServiceProviderParty) + [UBL-CR-195]-A UBL invoice should not include the AccountingSupplierParty Party ServiceProviderParty + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:PowerOfAttorney) + [UBL-CR-196]-A UBL invoice should not include the AccountingSupplierParty Party PowerOfAttorney + + + + + not(cac:AccountingSupplierParty/cac:Party/cac:FinancialAccount) + [UBL-CR-197]-A UBL invoice should not include the AccountingSupplierParty Party FinancialAccount + + + + + not(cac:AccountingSupplierParty/cac:DespatchContact) + [UBL-CR-198]-A UBL invoice should not include the AccountingSupplierParty DespatchContact + + + + + not(cac:AccountingSupplierParty/cac:AccountingContact) + [UBL-CR-199]-A UBL invoice should not include the AccountingSupplierParty AccountingContact + + + + + not(cac:AccountingSupplierParty/cac:SellerContact) + [UBL-CR-200]-A UBL invoice should not include the AccountingSupplierParty SellerContact + + + + + not(cac:AccountingCustomerParty/cbc:CustomerAssignedAccountID) + [UBL-CR-201]-A UBL invoice should not include the AccountingCustomerParty CustomerAssignedAccountID + + + + + not(cac:AccountingCustomerParty/cbc:SupplierAssignedAccountID) + [UBL-CR-202]-A UBL invoice should not include the AccountingCustomerParty SupplierAssignedAccountID + + + + + not(cac:AccountingCustomerParty/cbc:AdditionalAccountID) + [UBL-CR-203]-A UBL invoice should not include the AccountingCustomerParty AdditionalAccountID + + + + + not(cac:AccountingCustomerParty/cac:Party/cbc:MarkCareIndicator) + [UBL-CR-204]-A UBL invoice should not include the AccountingCustomerParty Party MarkCareIndicator + + + + + not(cac:AccountingCustomerParty/cac:Party/cbc:MarkAttentionIndicator) + [UBL-CR-205]-A UBL invoice should not include the AccountingCustomerParty Party MarkAttentionIndicator + + + + + not(cac:AccountingCustomerParty/cac:Party/cbc:WebsiteURI) + [UBL-CR-206]-A UBL invoice should not include the AccountingCustomerParty Party WebsiteURI + + + + + not(cac:AccountingCustomerParty/cac:Party/cbc:LogoReferenceID) + [UBL-CR-207]-A UBL invoice should not include the AccountingCustomerParty Party LogoReferenceID + + + + + not(cac:AccountingCustomerParty/cac:Party/cbc:IndustryClassificationCode) + [UBL-CR-208]-A UBL invoice should not include the AccountingCustomerParty Party IndustryClassificationCode + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:Language) + [UBL-CR-209]-A UBL invoice should not include the AccountingCustomerParty Party Language + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:ID) + [UBL-CR-210]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress ID + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:AddressTypeCode) + [UBL-CR-211]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress AddressTypeCode + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:AddressFormatCode) + [UBL-CR-212]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress AddressFormatCode + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:Postbox) + [UBL-CR-213]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress Postbox + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:Floor) + [UBL-CR-214]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress Floor + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:Room) + [UBL-CR-215]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress Room + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:BlockName) + [UBL-CR-216]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress BlockName + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:BuildingName) + [UBL-CR-217]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress BuildingName + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:BuildingNumber) + [UBL-CR-218]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress BuildingNumber + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:InhouseMail) + [UBL-CR-219]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress InhouseMail + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:Department) + [UBL-CR-220]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress Department + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:MarkAttention) + [UBL-CR-221]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress MarkAttention + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:MarkCare) + [UBL-CR-222]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress MarkCare + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:PlotIdentification) + [UBL-CR-223]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress PlotIdentification + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CitySubdivisionName) + [UBL-CR-224]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress CitySubdivisionName + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CountrySubentityCode) + [UBL-CR-225]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress CountrySubentityCode + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:Region) + [UBL-CR-226]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress Region + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:District) + [UBL-CR-227]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress District + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:TimezoneOffset) + [UBL-CR-228]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress TimezoneOffset + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country/cbc:Name) + [UBL-CR-229]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress Country Name + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:LocationCoordinate) + [UBL-CR-230]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress LocationCoordinate + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PhysicalLocation) + [UBL-CR-231]-A UBL invoice should not include the AccountingCustomerParty Party PhysicalLocation + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:RegistrationName) + [UBL-CR-232]-A UBL invoice should not include the AccountingCustomerParty Party PartyTaxScheme RegistrationName + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:TaxLevelCode) + [UBL-CR-233]-A UBL invoice should not include the AccountingCustomerParty Party PartyTaxScheme TaxLevelCode + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:ExemptionReasonCode) + [UBL-CR-234]-A UBL invoice should not include the AccountingCustomerParty Party PartyTaxScheme ExemptionReasonCode + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:ExemptionReason) + [UBL-CR-235]-A UBL invoice should not include the AccountingCustomerParty Party PartyTaxScheme ExemptionReason + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:RegistrationAddress) + [UBL-CR-236]-A UBL invoice should not include the AccountingCustomerParty Party PartyTaxScheme RegistrationAddress + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme/cbc:Name) + [UBL-CR-237]-A UBL invoice should not include the AccountingCustomerParty Party PartyTaxScheme TaxScheme Name + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme/cbc:TaxTypeCode) + [UBL-CR-238]-A UBL invoice should not include the AccountingCustomerParty Party PartyTaxScheme TaxScheme TaxTypeCode + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme/cbc:CurrencyCode) + [UBL-CR-239]-A UBL invoice should not include the AccountingCustomerParty Party PartyTaxScheme TaxScheme CurrencyCode + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:TaxScheme/cac:JurisdictionRegionAddress) + [UBL-CR-240]-A UBL invoice should not include the AccountingCustomerParty Party PartyTaxScheme TaxScheme JurisdictionRegionAddress + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationDate) + [UBL-CR-241]-A UBL invoice should not include the AccountingCustomerParty Party PartyLegalEntity RegistrationDate + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationExpirationDate) + [UBL-CR-242]-A UBL invoice should not include the AccountingCustomerParty Party PartyLegalEntity RegistrationExpirationDate + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyLegalFormCode) + [UBL-CR-243]-A UBL invoice should not include the AccountingCustomerParty Party PartyLegalEntity CompanyLegalFormCode + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyLegalForm) + [UBL-CR-244]-A UBL invoice should not include the AccountingCustomerParty Party PartyLegalEntity CompanyLegalForm + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:SoleProprietorshipIndicator) + [UBL-CR-245]-A UBL invoice should not include the AccountingCustomerParty Party PartyLegalEntity SoleProprietorshipIndicator + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyLiquidationStatusCode) + [UBL-CR-246]-A UBL invoice should not include the AccountingCustomerParty Party PartyLegalEntity CompanyLiquidationStatusCode + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CorporateStockAmount) + [UBL-CR-247]-A UBL invoice should not include the AccountingCustomerParty Party PartyLegalEntity CorporateStockAmount + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:FullyPaidSharesIndicator) + [UBL-CR-248]-A UBL invoice should not include the AccountingCustomerParty Party PartyLegalEntity FullyPaidSharesIndicator + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cac:RegistrationAddress) + [UBL-CR-249]-A UBL invoice should not include the AccountingCustomerParty Party PartyLegalEntity RegistrationAddress + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cac:CorporateRegistrationScheme) + [UBL-CR-250]-A UBL invoice should not include the AccountingCustomerParty Party PartyLegalEntity CorporateRegistrationScheme + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cac:HeadOfficeParty) + [UBL-CR-251]-A UBL invoice should not include the AccountingCustomerParty Party PartyLegalEntity HeadOfficeParty + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cac:ShareholderParty) + [UBL-CR-252]-A UBL invoice should not include the AccountingCustomerParty Party PartyLegalEntity ShareholderParty + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:ID) + [UBL-CR-253]-A UBL invoice should not include the AccountingCustomerParty Party Contact ID + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:Telefax) + [UBL-CR-254]-A UBL invoice should not include the AccountingCustomerParty Party Contact Telefax + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:Note) + [UBL-CR-255]-A UBL invoice should not include the AccountingCustomerParty Party Contact Note + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:Contact/cac:OtherCommunication) + [UBL-CR-256]-A UBL invoice should not include the AccountingCustomerParty Party Contact OtherCommunication + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:Person) + [UBL-CR-257]-A UBL invoice should not include the AccountingCustomerParty Party Person + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:AgentParty) + [UBL-CR-258]-A UBL invoice should not include the AccountingCustomerParty Party AgentParty + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:ServiceProviderParty) + [UBL-CR-259]-A UBL invoice should not include the AccountingCustomerParty Party ServiceProviderParty + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:PowerOfAttorney) + [UBL-CR-260]-A UBL invoice should not include the AccountingCustomerParty Party PowerOfAttorney + + + + + not(cac:AccountingCustomerParty/cac:Party/cac:FinancialAccount) + [UBL-CR-261]-A UBL invoice should not include the AccountingCustomerParty Party FinancialAccount + + + + + not(cac:AccountingCustomerParty/cac:DeliveryContact) + [UBL-CR-262]-A UBL invoice should not include the AccountingCustomerParty DeliveryContact + + + + + not(cac:AccountingCustomerParty/cac:AccountingContact) + [UBL-CR-263]-A UBL invoice should not include the AccountingCustomerParty AccountingContact + + + + + not(cac:AccountingCustomerParty/cac:BuyerContact) + [UBL-CR-264]-A UBL invoice should not include the AccountingCustomerParty BuyerContact + + + + + not(cac:PayeeParty/cbc:MarkCareIndicator) + [UBL-CR-265]-A UBL invoice should not include the PayeeParty MarkCareIndicator + + + + + not(cac:PayeeParty/cbc:MarkAttentionIndicator) + [UBL-CR-266]-A UBL invoice should not include the PayeeParty MarkAttentionIndicator + + + + + not(cac:PayeeParty/cbc:WebsiteURI) + [UBL-CR-267]-A UBL invoice should not include the PayeeParty WebsiteURI + + + + + not(cac:PayeeParty/cbc:LogoReferenceID) + [UBL-CR-268]-A UBL invoice should not include the PayeeParty LogoReferenceID + + + + + not(cac:PayeeParty/cbc:EndpointID) + [UBL-CR-269]-A UBL invoice should not include the PayeeParty EndpointID + + + + + not(cac:PayeeParty/cbc:IndustryClassificationCode) + [UBL-CR-270]-A UBL invoice should not include the PayeeParty IndustryClassificationCode + + + + + not(cac:PayeeParty/cac:Language) + [UBL-CR-271]-A UBL invoice should not include the PayeeParty Language + + + + + not(cac:PayeeParty/cac:PostalAddress) + [UBL-CR-272]-A UBL invoice should not include the PayeeParty PostalAddress + + + + + not(cac:PayeeParty/cac:PhysicalLocation) + [UBL-CR-273]-A UBL invoice should not include the PayeeParty PhysicalLocation + + + + + not(cac:PayeeParty/cac:PartyTaxScheme) + [UBL-CR-274]-A UBL invoice should not include the PayeeParty PartyTaxScheme + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cbc:RegistrationName) + [UBL-CR-275]-A UBL invoice should not include the PayeeParty PartyLegalEntity RegistrationName + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cbc:RegistrationDate) + [UBL-CR-276]-A UBL invoice should not include the PayeeParty PartyLegalEntity RegistrationDate + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cbc:RegistrationExpirationDate) + [UBL-CR-277]-A UBL invoice should not include the PayeeParty PartyLegalEntity RegistrationExpirationDate + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cbc:CompanyLegalFormCode) + [UBL-CR-278]-A UBL invoice should not include the PayeeParty PartyLegalEntity CompanyLegalFormCode + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cbc:CompanyLegalForm) + [UBL-CR-279]-A UBL invoice should not include the PayeeParty PartyLegalEntity CompanyLegalForm + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cbc:SoleProprietorshipIndicator) + [UBL-CR-280]-A UBL invoice should not include the PayeeParty PartyLegalEntity SoleProprietorshipIndicator + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cbc:CompanyLiquidationStatusCode) + [UBL-CR-281]-A UBL invoice should not include the PayeeParty PartyLegalEntity CompanyLiquidationStatusCode + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cbc:CorporateStockAmount) + [UBL-CR-282]-A UBL invoice should not include the PayeeParty PartyLegalEntity CorporateStockAmount + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cbc:FullyPaidSharesIndicator) + [UBL-CR-283]-A UBL invoice should not include the PayeeParty PartyLegalEntity FullyPaidSharesIndicator + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cac:RegistrationAddress) + [UBL-CR-284]-A UBL invoice should not include the PayeeParty PartyLegalEntity RegistrationAddress + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cac:CorporateRegistrationScheme) + [UBL-CR-285]-A UBL invoice should not include the PayeeParty PartyLegalEntity CorporateRegistrationScheme + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cac:HeadOfficeParty) + [UBL-CR-286]-A UBL invoice should not include the PayeeParty PartyLegalEntity HeadOfficeParty + + + + + not(cac:PayeeParty/cac:PartyLegalEntity/cac:ShareholderParty) + [UBL-CR-287]-A UBL invoice should not include the PayeeParty PartyLegalEntity ShareholderParty + + + + + not(cac:PayeeParty/cac:Contact) + [UBL-CR-288]-A UBL invoice should not include the PayeeParty Contact + + + + + not(cac:PayeeParty/cac:Person) + [UBL-CR-289]-A UBL invoice should not include the PayeeParty Person + + + + + not(cac:PayeeParty/cac:AgentParty) + [UBL-CR-290]-A UBL invoice should not include the PayeeParty AgentParty + + + + + not(cac:PayeeParty/cac:ServiceProviderParty) + [UBL-CR-291]-A UBL invoice should not include the PayeeParty ServiceProviderParty + + + + + not(cac:PayeeParty/cac:PowerOfAttorney) + [UBL-CR-292]-A UBL invoice should not include the PayeeParty PowerOfAttorney + + + + + not(cac:PayeeParty/cac:FinancialAccount) + [UBL-CR-293]-A UBL invoice should not include the PayeeParty FinancialAccount + + + + + not(cac:BuyerCustomerParty) + [UBL-CR-294]-A UBL invoice should not include the BuyerCustomerParty + + + + + not(cac:SellerSupplierParty) + [UBL-CR-295]-A UBL invoice should not include the SellerSupplierParty + + + + + not(cac:TaxRepresentativeParty/cbc:MarkCareIndicator) + [UBL-CR-296]-A UBL invoice should not include the TaxRepresentativeParty MarkCareIndicator + + + + + not(cac:TaxRepresentativeParty/cbc:MarkAttentionIndicator) + [UBL-CR-297]-A UBL invoice should not include the TaxRepresentativeParty MarkAttentionIndicator + + + + + not(cac:TaxRepresentativeParty/cbc:WebsiteURI) + [UBL-CR-298]-A UBL invoice should not include the TaxRepresentativeParty WebsiteURI + + + + + not(cac:TaxRepresentativeParty/cbc:LogoReferenceID) + [UBL-CR-299]-A UBL invoice should not include the TaxRepresentativeParty LogoReferenceID + + + + + not(cac:TaxRepresentativeParty/cbc:EndpointID) + [UBL-CR-300]-A UBL invoice should not include the TaxRepresentativeParty EndpointID + + + + + not(cac:TaxRepresentativeParty/cbc:IndustryClassificationCode) + [UBL-CR-301]-A UBL invoice should not include the TaxRepresentativeParty IndustryClassificationCode + + + + + not(cac:TaxRepresentativeParty/cac:PartyIdentification) + [UBL-CR-302]-A UBL invoice should not include the TaxRepresentativeParty PartyIdentification + + + + + not(cac:TaxRepresentativeParty/cac:Language) + [UBL-CR-303]-A UBL invoice should not include the TaxRepresentativeParty Language + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:ID) + [UBL-CR-304]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress ID + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:AddressTypeCode) + [UBL-CR-305]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress AddressTypeCode + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:AddressFormatCode) + [UBL-CR-306]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress AddressFormatCode + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:Postbox) + [UBL-CR-307]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress Postbox + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:Floor) + [UBL-CR-308]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress Floor + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:Room) + [UBL-CR-309]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress Room + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:BlockName) + [UBL-CR-310]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress BlockName + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:BuildingName) + [UBL-CR-311]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress BuildingName + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:BuildingNumber) + [UBL-CR-312]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress BuildingNumber + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:InhouseMail) + [UBL-CR-313]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress InhouseMail + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:Department) + [UBL-CR-314]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress Department + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:MarkAttention) + [UBL-CR-315]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress MarkAttention + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:MarkCare) + [UBL-CR-316]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress MarkCare + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:PlotIdentification) + [UBL-CR-317]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress PlotIdentification + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:CitySubdivisionName) + [UBL-CR-318]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress CitySubdivisionName + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:CountrySubentityCode) + [UBL-CR-319]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress CountrySubentityCode + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:Region) + [UBL-CR-320]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress Region + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:District) + [UBL-CR-321]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress District + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cbc:TimezoneOffset) + [UBL-CR-322]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress TimezoneOffset + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cac:Country/cbc:Name) + [UBL-CR-323]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress Country Name + + + + + not(cac:TaxRepresentativeParty/cac:PostalAddress/cac:LocationCoordinate) + [UBL-CR-324]-A UBL invoice should not include the TaxRepresentativeParty PostalAddress LocationCoordinate + + + + + not(cac:TaxRepresentativeParty/cac:PhysicalLocation) + [UBL-CR-325]-A UBL invoice should not include the TaxRepresentativeParty PhysicalLocation + + + + + not(cac:TaxRepresentativeParty/cac:PartyTaxScheme/cbc:RegistrationName) + [UBL-CR-326]-A UBL invoice should not include the TaxRepresentativeParty PartyTaxScheme RegistrationName + + + + + not(cac:TaxRepresentativeParty/cac:PartyTaxScheme/cbc:TaxLevelCode) + [UBL-CR-327]-A UBL invoice should not include the TaxRepresentativeParty PartyTaxScheme TaxLevelCode + + + + + not(cac:TaxRepresentativeParty/cac:PartyTaxScheme/cbc:ExemptionReasonCode) + [UBL-CR-328]-A UBL invoice should not include the TaxRepresentativeParty PartyTaxScheme ExemptionReasonCode + + + + + not(cac:TaxRepresentativeParty/cac:PartyTaxScheme/cbc:ExemptionReason) + [UBL-CR-329]-A UBL invoice should not include the TaxRepresentativeParty PartyTaxScheme ExemptionReason + + + + + not(cac:TaxRepresentativeParty/cac:PartyTaxScheme/cac:RegistrationAddress) + [UBL-CR-330]-A UBL invoice should not include the TaxRepresentativeParty PartyTaxScheme RegistrationAddress + + + + + not(cac:TaxRepresentativeParty/cac:PartyTaxScheme/cac:TaxScheme/cbc:Name) + [UBL-CR-331]-A UBL invoice should not include the TaxRepresentativeParty PartyTaxScheme TaxScheme Name + + + + + not(cac:TaxRepresentativeParty/cac:PartyTaxScheme/cac:TaxScheme/cbc:TaxTypeCode) + [UBL-CR-332]-A UBL invoice should not include the TaxRepresentativeParty PartyTaxScheme TaxScheme TaxTypeCode + + + + + not(cac:TaxRepresentativeParty/cac:PartyTaxScheme/cac:TaxScheme/cbc:CurrencyCode) + [UBL-CR-333]-A UBL invoice should not include the TaxRepresentativeParty PartyTaxScheme TaxScheme CurrencyCode + + + + + not(cac:TaxRepresentativeParty/cac:PartyTaxScheme/cac:TaxScheme/cac:JurisdictionRegionAddress) + [UBL-CR-334]-A UBL invoice should not include the TaxRepresentativeParty PartyTaxScheme TaxScheme JurisdictionRegionAddress + + + + + not(cac:TaxRepresentativeParty/cac:PartyLegalEntity) + [UBL-CR-335]-A UBL invoice should not include the TaxRepresentativeParty PartyLegalEntity + + + + + not(cac:TaxRepresentativeParty/cac:Contact) + [UBL-CR-336]-A UBL invoice should not include the TaxRepresentativeParty Contact + + + + + not(cac:TaxRepresentativeParty/cac:Person) + [UBL-CR-337]-A UBL invoice should not include the TaxRepresentativeParty Person + + + + + not(cac:TaxRepresentativeParty/cac:AgentParty) + [UBL-CR-338]-A UBL invoice should not include the TaxRepresentativeParty AgentParty + + + + + not(cac:TaxRepresentativeParty/cac:ServiceProviderParty) + [UBL-CR-339]-A UBL invoice should not include the TaxRepresentativeParty ServiceProviderParty + + + + + not(cac:TaxRepresentativeParty/cac:PowerOfAttorney) + [UBL-CR-340]-A UBL invoice should not include the TaxRepresentativeParty PowerOfAttorney + + + + + not(cac:TaxRepresentativeParty/cac:FinancialAccount) + [UBL-CR-341]-A UBL invoice should not include the TaxRepresentativeParty FinancialAccount + + + + + not(cac:Delivery/cbc:ID) + [UBL-CR-342]-A UBL invoice should not include the Delivery ID + + + + + not(cac:Delivery/cbc:Quantity) + [UBL-CR-343]-A UBL invoice should not include the Delivery Quantity + + + + + not(cac:Delivery/cbc:MinimumQuantity) + [UBL-CR-344]-A UBL invoice should not include the Delivery MinimumQuantity + + + + + not(cac:Delivery/cbc:MaximumQuantity) + [UBL-CR-345]-A UBL invoice should not include the Delivery MaximumQuantity + + + + + not(cac:Delivery/cbc:ActualDeliveryTime) + [UBL-CR-346]-A UBL invoice should not include the Delivery ActualDeliveryTime + + + + + not(cac:Delivery/cbc:LatestDeliveryDate) + [UBL-CR-347]-A UBL invoice should not include the Delivery LatestDeliveryDate + + + + + not(cac:Delivery/cbc:LatestDeliveryTime) + [UBL-CR-348]-A UBL invoice should not include the Delivery LatestDeliveryTime + + + + + not(cac:Delivery/cbc:ReleaseID) + [UBL-CR-349]-A UBL invoice should not include the Delivery ReleaseID + + + + + not(cac:Delivery/cbc:TrackingID) + [UBL-CR-350]-A UBL invoice should not include the Delivery TrackingID + + + + + not(cac:Delivery/cac:DeliveryLocation/cbc:Description) + [UBL-CR-351]-A UBL invoice should not include the Delivery DeliveryLocation Description + + + + + not(cac:Delivery/cac:DeliveryLocation/cbc:Conditions) + [UBL-CR-352]-A UBL invoice should not include the Delivery DeliveryLocation Conditions + + + + + not(cac:Delivery/cac:DeliveryLocation/cbc:CountrySubentity) + [UBL-CR-353]-A UBL invoice should not include the Delivery DeliveryLocation CountrySubentity + + + + + not(cac:Delivery/cac:DeliveryLocation/cbc:CountrySubentityCode) + [UBL-CR-354]-A UBL invoice should not include the Delivery DeliveryLocation CountrySubentityCode + + + + + not(cac:Delivery/cac:DeliveryLocation/cbc:LocationTypeCode) + [UBL-CR-355]-A UBL invoice should not include the Delivery DeliveryLocation LocationTypeCode + + + + + not(cac:Delivery/cac:DeliveryLocation/cbc:InformationURI) + [UBL-CR-356]-A UBL invoice should not include the Delivery DeliveryLocation InformationURI + + + + + not(cac:Delivery/cac:DeliveryLocation/cbc:Name) + [UBL-CR-357]-A UBL invoice should not include the Delivery DeliveryLocation Name + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:ValidityPeriod) + [UBL-CR-358]-A UBL invoice should not include the Delivery DeliveryLocation ValidityPeriod + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:ID) + [UBL-CR-359]-A UBL invoice should not include the Delivery DeliveryLocation Address ID + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:AddressTypeCode) + [UBL-CR-360]-A UBL invoice should not include the Delivery DeliveryLocation Address AddressTypeCode + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:AddressFormatCode) + [UBL-CR-361]-A UBL invoice should not include the Delivery DeliveryLocation Address AddressFormatCode + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:Postbox) + [UBL-CR-362]-A UBL invoice should not include the Delivery DeliveryLocation Address Postbox + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:Floor) + [UBL-CR-363]-A UBL invoice should not include the Delivery DeliveryLocation Address Floor + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:Room) + [UBL-CR-364]-A UBL invoice should not include the Delivery DeliveryLocation Address Room + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:BlockName) + [UBL-CR-365]-A UBL invoice should not include the Delivery DeliveryLocation Address BlockName + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:BuildingName) + [UBL-CR-366]-A UBL invoice should not include the Delivery DeliveryLocation Address BuildingName + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:BuildingNumber) + [UBL-CR-367]-A UBL invoice should not include the Delivery DeliveryLocation Address BuildingNumber + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:InhouseMail) + [UBL-CR-368]-A UBL invoice should not include the Delivery DeliveryLocation Address InhouseMail + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:Department) + [UBL-CR-369]-A UBL invoice should not include the Delivery DeliveryLocation Address Department + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:MarkAttention) + [UBL-CR-370]-A UBL invoice should not include the Delivery DeliveryLocation Address MarkAttention + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:MarkCare) + [UBL-CR-371]-A UBL invoice should not include the Delivery DeliveryLocation Address MarkCare + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:PlotIdentification) + [UBL-CR-372]-A UBL invoice should not include the Delivery DeliveryLocation Address PlotIdentification + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:CitySubdivisionName) + [UBL-CR-373]-A UBL invoice should not include the Delivery DeliveryLocation Address CitySubdivisionName + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:CountrySubentityCode) + [UBL-CR-374]-A UBL invoice should not include the Delivery DeliveryLocation Address CountrySubentityCode + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:Region) + [UBL-CR-375]-A UBL invoice should not include the Delivery DeliveryLocation Address Region + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:District) + [UBL-CR-376]-A UBL invoice should not include the Delivery DeliveryLocation Address District + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:TimezoneOffset) + [UBL-CR-377]-A UBL invoice should not include the Delivery DeliveryLocation Address TimezoneOffset + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cac:Country/cbc:Name) + [UBL-CR-378]-A UBL invoice should not include the Delivery DeliveryLocation Address Country Name + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:Address/cac:LocationCoordinate) + [UBL-CR-379]-A UBL invoice should not include the Delivery DeliveryLocation Address LocationCoordinate + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:SubsidiaryLocation) + [UBL-CR-380]-A UBL invoice should not include the Delivery DeliveryLocation SubsidiaryLocation + + + + + not(cac:Delivery/cac:DeliveryLocation/cac:LocationCoordinate) + [UBL-CR-381]-A UBL invoice should not include the Delivery DeliveryLocation LocationCoordinate + + + + + not(cac:Delivery/cac:AlternativeDeliveryLocation) + [UBL-CR-382]-A UBL invoice should not include the Delivery AlternativeDeliveryLocation + + + + + not(cac:Delivery/cac:RequestedDeliveryPeriod) + [UBL-CR-383]-A UBL invoice should not include the Delivery RequestedDeliveryPeriod + + + + + not(cac:Delivery/cac:EstimatedDeliveryPeriod) + [UBL-CR-384]-A UBL invoice should not include the Delivery EstimatedDeliveryPeriod + + + + + not(cac:Delivery/cac:CarrierParty) + [UBL-CR-385]-A UBL invoice should not include the Delivery CarrierParty + + + + + not(cac:Delivery/cac:DeliveryParty/cbc:MarkCareIndicator) + [UBL-CR-386]-A UBL invoice should not include the DeliveryParty MarkCareIndicator + + + + + not(cac:Delivery/cac:DeliveryParty/cbc:MarkAttentionIndicator) + [UBL-CR-387]-A UBL invoice should not include the DeliveryParty MarkAttentionIndicator + + + + + not(cac:Delivery/cac:DeliveryParty/cbc:WebsiteURI) + [UBL-CR-388]-A UBL invoice should not include the DeliveryParty WebsiteURI + + + + + not(cac:Delivery/cac:DeliveryParty/cbc:LogoReferenceID) + [UBL-CR-389]-A UBL invoice should not include the DeliveryParty LogoReferenceID + + + + + not(cac:Delivery/cac:DeliveryParty/cbc:EndpointID) + [UBL-CR-390]-A UBL invoice should not include the DeliveryParty EndpointID + + + + + not(cac:Delivery/cac:DeliveryParty/cbc:IndustryClassificationCode) + [UBL-CR-391]-A UBL invoice should not include the DeliveryParty IndustryClassificationCode + + + + + not(cac:Delivery/cac:DeliveryParty/cac:PartyIdentification) + [UBL-CR-392]-A UBL invoice should not include the DeliveryParty PartyIdentification + + + + + not(cac:Delivery/cac:DeliveryParty/cac:Language) + [UBL-CR-393]-A UBL invoice should not include the DeliveryParty Language + + + + + not(cac:Delivery/cac:DeliveryParty/cac:PostalAddress) + [UBL-CR-394]-A UBL invoice should not include the DeliveryParty PostalAddress + + + + + not(cac:Delivery/cac:DeliveryParty/cac:PhysicalLocation) + [UBL-CR-395]-A UBL invoice should not include the DeliveryParty PhysicalLocation + + + + + not(cac:Delivery/cac:DeliveryParty/cac:PartyTaxScheme) + [UBL-CR-396]-A UBL invoice should not include the DeliveryParty PartyTaxScheme + + + + + not(cac:Delivery/cac:DeliveryParty/cac:PartyLegalEntity) + [UBL-CR-397]-A UBL invoice should not include the DeliveryParty PartyLegalEntity + + + + + not(cac:Delivery/cac:DeliveryParty/cac:Contact) + [UBL-CR-398]-A UBL invoice should not include the DeliveryParty Contact + + + + + not(cac:Delivery/cac:DeliveryParty/cac:Person) + [UBL-CR-399]-A UBL invoice should not include the DeliveryParty Person + + + + + not(cac:Delivery/cac:DeliveryParty/cac:AgentParty) + [UBL-CR-400]-A UBL invoice should not include the DeliveryParty AgentParty + + + + + not(cac:Delivery/cac:DeliveryParty/cac:ServiceProviderParty) + [UBL-CR-401]-A UBL invoice should not include the DeliveryParty ServiceProviderParty + + + + + not(cac:Delivery/cac:DeliveryParty/cac:PowerOfAttorney) + [UBL-CR-402]-A UBL invoice should not include the DeliveryParty PowerOfAttorney + + + + + not(cac:Delivery/cac:DeliveryParty/cac:FinancialAccount) + [UBL-CR-403]-A UBL invoice should not include the DeliveryParty FinancialAccount + + + + + not(cac:Delivery/cac:NotifyParty) + [UBL-CR-404]-A UBL invoice should not include the Delivery NotifyParty + + + + + not(cac:Delivery/cac:Despatch) + [UBL-CR-405]-A UBL invoice should not include the Delivery Despatch + + + + + not(cac:Delivery/cac:DeliveryTerms) + [UBL-CR-406]-A UBL invoice should not include the Delivery DeliveryTerms + + + + + not(cac:Delivery/cac:MinimumDeliveryUnit) + [UBL-CR-407]-A UBL invoice should not include the Delivery MinimumDeliveryUnit + + + + + not(cac:Delivery/cac:MaximumDeliveryUnit) + [UBL-CR-408]-A UBL invoice should not include the Delivery MaximumDeliveryUnit + + + + + not(cac:Delivery/cac:Shipment) + [UBL-CR-409]-A UBL invoice should not include the Delivery Shipment + + + + + not(cac:DeliveryTerms) + [UBL-CR-410]-A UBL invoice should not include the DeliveryTerms + + + + + not(cac:PaymentMeans/cbc:ID) + [UBL-CR-411]-A UBL invoice should not include the PaymentMeans ID + + + + + not(cac:PaymentMeans/cbc:PaymentDueDate) or ../cn:CreditNote + [UBL-CR-412]-A UBL invoice should not include the PaymentMeans PaymentDueDate + + + + + not(cac:PaymentMeans/cbc:PaymentChannelCode) + [UBL-CR-413]-A UBL invoice should not include the PaymentMeans PaymentChannelCode + + + + + not(cac:PaymentMeans/cbc:InstructionID) + [UBL-CR-414]-A UBL invoice should not include the PaymentMeans InstructionID + + + + + not(cac:PaymentMeans/cac:CardAccount/cbc:CardTypeCode) + [UBL-CR-415]-A UBL invoice should not include the PaymentMeans CardAccount CardTypeCode + + + + + not(cac:PaymentMeans/cac:CardAccount/cbc:ValidityStartDate) + [UBL-CR-416]-A UBL invoice should not include the PaymentMeans CardAccount ValidityStartDate + + + + + not(cac:PaymentMeans/cac:CardAccount/cbc:ExpiryDate) + [UBL-CR-417]-A UBL invoice should not include the PaymentMeans CardAccount ExpiryDate + + + + + not(cac:PaymentMeans/cac:CardAccount/cbc:IssuerID) + [UBL-CR-418]-A UBL invoice should not include the PaymentMeans CardAccount IssuerID + + + + + not(cac:PaymentMeans/cac:CardAccount/cbc:IssueNumberID) + [UBL-CR-419]-A UBL invoice should not include the PaymentMeans CardAccount IssueNumberID + + + + + not(cac:PaymentMeans/cac:CardAccount/cbc:CV2ID) + [UBL-CR-420]-A UBL invoice should not include the PaymentMeans CardAccount CV2ID + + + + + not(cac:PaymentMeans/cac:CardAccount/cbc:CardChipCode) + [UBL-CR-421]-A UBL invoice should not include the PaymentMeans CardAccount CardChipCode + + + + + not(cac:PaymentMeans/cac:CardAccount/cbc:ChipApplicationID) + [UBL-CR-422]-A UBL invoice should not include the PaymentMeans CardAccount ChipApplicationID + + + + + not(cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:AliasName) + [UBL-CR-424]-A UBL invoice should not include the PaymentMeans PayeeFinancialAccount AliasName + + + + + not(cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:AccountTypeCode) + [UBL-CR-425]-A UBL invoice should not include the PaymentMeans PayeeFinancialAccount AccountTypeCode + + + + + not(cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:AccountFormatCode) + [UBL-CR-426]-A UBL invoice should not include the PaymentMeans PayeeFinancialAccount AccountFormatCode + + + + + not(cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:CurrencyCode) + [UBL-CR-427]-A UBL invoice should not include the PaymentMeans PayeeFinancialAccount CurrencyCode + + + + + not(cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:PaymentNote) + [UBL-CR-428]-A UBL invoice should not include the PaymentMeans PayeeFinancialAccount PaymentNote + + + + + not(cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cbc:Name) + [UBL-CR-429]-A UBL invoice should not include the PaymentMeans PayeeFinancialAccount FinancialInstitutionBranch Name + + + + + not(cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:FinancialInstitution/cbc:Name) + [UBL-CR-430]-A UBL invoice should not include the PaymentMeans PayeeFinancialAccount FinancialInstitutionBranch FinancialInstitution Name + + + + + not(cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:FinancialInstitution/cac:Address) + [UBL-CR-431]-A UBL invoice should not include the PaymentMeans PayeeFinancialAccount FinancialInstitutionBranch FinancialInstitution Address + + + + + not(cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cac:Address) + [UBL-CR-432]-A UBL invoice should not include the PaymentMeans PayeeFinancialAccount FinancialInstitutionBranch Address + + + + + not(cac:PaymentMeans/cac:PayeeFinancialAccount/cac:Country) + [UBL-CR-433]-A UBL invoice should not include the PaymentMeans PayeeFinancialAccount Country + + + + + not(cac:PaymentMeans/cac:CreditAccount) + [UBL-CR-434]-A UBL invoice should not include the PaymentMeans CreditAccount + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cbc:MandateTypeCode) + [UBL-CR-435]-A UBL invoice should not include the PaymentMeans PaymentMandate MandateTypeCode + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cbc:MaximumPaymentInstructionsNumeric) + [UBL-CR-436]-A UBL invoice should not include the PaymentMeans PaymentMandate MaximumPaymentInstructionsNumeric + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cbc:MaximumPaidAmount) + [UBL-CR-437]-A UBL invoice should not include the PaymentMeans PaymentMandate MaximumPaidAmount + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cbc:SignatureID) + [UBL-CR-438]-A UBL invoice should not include the PaymentMeans PaymentMandate SignatureID + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cac:PayerParty) + [UBL-CR-439]-A UBL invoice should not include the PaymentMeans PaymentMandate PayerParty + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:Name) + [UBL-CR-440]-A UBL invoice should not include the PaymentMeans PaymentMandate PayerFinancialAccount Name + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:AliasName) + [UBL-CR-441]-A UBL invoice should not include the PaymentMeans PaymentMandate PayerFinancialAccount AliasName + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:AccountTypeCode) + [UBL-CR-442]-A UBL invoice should not include the PaymentMeans PaymentMandate PayerFinancialAccount AccountTypeCode + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:AccountFormatCode) + [UBL-CR-443]-A UBL invoice should not include the PaymentMeans PaymentMandate PayerFinancialAccount AccountFormatCode + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:CurrencyCode) + [UBL-CR-444]-A UBL invoice should not include the PaymentMeans PaymentMandate PayerFinancialAccount CurrencyCode + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:PaymentNote) + [UBL-CR-445]-A UBL invoice should not include the PaymentMeans PaymentMandate PayerFinancialAccount PaymentNote + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cac:FinancialInstitutionBranch) + [UBL-CR-446]-A UBL invoice should not include the PaymentMeans PaymentMandate PayerFinancialAccount FinancialInstitutionBranch + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cac:Country) + [UBL-CR-447]-A UBL invoice should not include the PaymentMeans PaymentMandate PayerFinancialAccount Country + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cac:ValidityPeriod) + [UBL-CR-448]-A UBL invoice should not include the PaymentMeans PaymentMandate ValidityPeriod + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cac:PaymentReversalPeriod) + [UBL-CR-449]-A UBL invoice should not include the PaymentMeans PaymentMandate PaymentReversalPeriod + + + + + not(cac:PaymentMeans/cac:PaymentMandate/cac:Clause) + [UBL-CR-450]-A UBL invoice should not include the PaymentMeans PaymentMandate Clause + + + + + not(cac:PaymentMeans/cac:TradeFinancing) + [UBL-CR-451]-A UBL invoice should not include the PaymentMeans TradeFinancing + + + + + not(cac:PaymentTerms/cbc:ID) + [UBL-CR-452]-A UBL invoice should not include the PaymentTerms ID + + + + + not(cac:PaymentTerms/cbc:PaymentMeansID) + [UBL-CR-453]-A UBL invoice should not include the PaymentTerms PaymentMeansID + + + + + not(cac:PaymentTerms/cbc:PrepaidPaymentReferenceID) + [UBL-CR-454]-A UBL invoice should not include the PaymentTerms PrepaidPaymentReferenceID + + + + + not(cac:PaymentTerms/cbc:ReferenceEventCode) + [UBL-CR-455]-A UBL invoice should not include the PaymentTerms ReferenceEventCode + + + + + not(cac:PaymentTerms/cbc:SettlementDiscountPercent) + [UBL-CR-456]-A UBL invoice should not include the PaymentTerms SettlementDiscountPercent + + + + + not(cac:PaymentTerms/cbc:PenaltySurchargePercent) + [UBL-CR-457]-A UBL invoice should not include the PaymentTerms PenaltySurchargePercent + + + + + not(cac:PaymentTerms/cbc:PaymentPercent) + [UBL-CR-458]-A UBL invoice should not include the PaymentTerms PaymentPercent + + + + + not(cac:PaymentTerms/cbc:Amount) + [UBL-CR-459]-A UBL invoice should not include the PaymentTerms Amount + + + + + not(cac:PaymentTerms/cbc:SettlementDiscountAmount) + [UBL-CR-460]-A UBL invoice should not include the PaymentTerms SettlementDiscountAmount + + + + + not(cac:PaymentTerms/cbc:PenaltyAmount) + [UBL-CR-461]-A UBL invoice should not include the PaymentTerms PenaltyAmount + + + + + not(cac:PaymentTerms/cbc:PaymentTermsDetailsURI) + [UBL-CR-462]-A UBL invoice should not include the PaymentTerms PaymentTermsDetailsURI + + + + + not(cac:PaymentTerms/cbc:PaymentDueDate) + [UBL-CR-463]-A UBL invoice should not include the PaymentTerms PaymentDueDate + + + + + not(cac:PaymentTerms/cbc:InstallmentDueDate) + [UBL-CR-464]-A UBL invoice should not include the PaymentTerms InstallmentDueDate + + + + + not(cac:PaymentTerms/cbc:InvoicingPartyReference) + [UBL-CR-465]-A UBL invoice should not include the PaymentTerms InvoicingPartyReference + + + + + not(cac:PaymentTerms/cac:SettlementPeriod) + [UBL-CR-466]-A UBL invoice should not include the PaymentTerms SettlementPeriod + + + + + not(cac:PaymentTerms/cac:PenaltyPeriod) + [UBL-CR-467]-A UBL invoice should not include the PaymentTerms PenaltyPeriod + + + + + not(cac:PaymentTerms/cac:ExchangeRate) + [UBL-CR-468]-A UBL invoice should not include the PaymentTerms ExchangeRate + + + + + not(cac:PaymentTerms/cac:ValidityPeriod) + [UBL-CR-469]-A UBL invoice should not include the PaymentTerms ValidityPeriod + + + + + not(cac:PrepaidPayment) + [UBL-CR-470]-A UBL invoice should not include the PrepaidPayment + + + + + not(cac:AllowanceCharge/cbc:ID) + [UBL-CR-471]-A UBL invoice should not include the AllowanceCharge ID + + + + + not(cac:AllowanceCharge/cbc:PrepaidIndicator) + [UBL-CR-472]-A UBL invoice should not include the AllowanceCharge PrepaidIndicator + + + + + not(cac:AllowanceCharge/cbc:SequenceNumeric) + [UBL-CR-473]-A UBL invoice should not include the AllowanceCharge SequenceNumeric + + + + + not(cac:AllowanceCharge/cbc:AccountingCostCode) + [UBL-CR-474]-A UBL invoice should not include the AllowanceCharge AccountingCostCode + + + + + not(cac:AllowanceCharge/cbc:AccountingCost) + [UBL-CR-475]-A UBL invoice should not include the AllowanceCharge AccountingCost + + + + + not(cac:AllowanceCharge/cbc:PerUnitAmount) + [UBL-CR-476]-A UBL invoice should not include the AllowanceCharge PerUnitAmount + + + + + not(cac:AllowanceCharge/cac:TaxCategory/cbc:Name) + [UBL-CR-477]-A UBL invoice should not include the AllowanceCharge TaxCategory Name + + + + + not(cac:AllowanceCharge/cac:TaxCategory/cbc:BaseUnitMeasure) + [UBL-CR-478]-A UBL invoice should not include the AllowanceCharge TaxCategory BaseUnitMeasure + + + + + not(cac:AllowanceCharge/cac:TaxCategory/cbc:PerUnitAmount) + [UBL-CR-479]-A UBL invoice should not include the AllowanceCharge TaxCategory PerUnitAmount + + + + + not(cac:AllowanceCharge/cac:TaxCategory/cbc:TaxExemptionReasonCode) + [UBL-CR-480]-A UBL invoice should not include the AllowanceCharge TaxCategory TaxExemptionReasonCode + + + + + not(cac:AllowanceCharge/cac:TaxCategory/cbc:TaxExemptionReason) + [UBL-CR-481]-A UBL invoice should not include the AllowanceCharge TaxCategory TaxExemptionReason + + + + + not(cac:AllowanceCharge/cac:TaxCategory/cbc:TierRange) + [UBL-CR-482]-A UBL invoice should not include the AllowanceCharge TaxCategory TierRange + + + + + not(cac:AllowanceCharge/cac:TaxCategory/cbc:TierRatePercent) + [UBL-CR-483]-A UBL invoice should not include the AllowanceCharge TaxCategory TierRatePercent + + + + + not(cac:AllowanceCharge/cac:TaxCategory/cac:TaxScheme/cbc:Name) + [UBL-CR-484]-A UBL invoice should not include the AllowanceCharge TaxCategory TaxScheme Name + + + + + not(cac:AllowanceCharge/cac:TaxCategory/cac:TaxScheme/cbc:TaxTypeCode) + [UBL-CR-485]-A UBL invoice should not include the AllowanceCharge TaxCategory TaxScheme TaxTypeCode + + + + + not(cac:AllowanceCharge/cac:TaxCategory/cac:TaxScheme/cbc:CurrencyCode) + [UBL-CR-486]-A UBL invoice should not include the AllowanceCharge TaxCategory TaxScheme CurrencyCode + + + + + not(cac:AllowanceCharge/cac:TaxCategory/cac:TaxScheme/cac:JurisdictionRegionAddress) + [UBL-CR-487]-A UBL invoice should not include the AllowanceCharge TaxCategory TaxScheme JurisdictionRegionAddress + + + + + not(cac:AllowanceCharge/cac:TaxTotal) + [UBL-CR-488]-A UBL invoice should not include the AllowanceCharge TaxTotal + + + + + not(cac:AllowanceCharge/cac:PaymentMeans) + [UBL-CR-489]-A UBL invoice should not include the AllowanceCharge PaymentMeans + + + + + not(cac:TaxExchangeRate) + [UBL-CR-490]-A UBL invoice should not include the TaxExchangeRate + + + + + not(cac:PricingExchangeRate) + [UBL-CR-491]-A UBL invoice should not include the PricingExchangeRate + + + + + not(cac:PaymentExchangeRate) + [UBL-CR-492]-A UBL invoice should not include the PaymentExchangeRate + + + + + not(cac:PaymentAlternativeExchangeRate) + [UBL-CR-493]-A UBL invoice should not include the PaymentAlternativeExchangeRate + + + + + not(cac:TaxTotal/cbc:RoundingAmount) + [UBL-CR-494]-A UBL invoice should not include the TaxTotal RoundingAmount + + + + + not(cac:TaxTotal/cbc:TaxEvidenceIndicator) + [UBL-CR-495]-A UBL invoice should not include the TaxTotal TaxEvidenceIndicator + + + + + not(cac:TaxTotal/cbc:TaxIncludedIndicator) + [UBL-CR-496]-A UBL invoice should not include the TaxTotal TaxIncludedIndicator + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cbc:CalculationSequenceNumeric) + [UBL-CR-497]-A UBL invoice should not include the TaxTotal TaxSubtotal CalulationSequenceNumeric + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cbc:TransactionCurrencyTaxAmount) + [UBL-CR-498]-A UBL invoice should not include the TaxTotal TaxSubtotal TransactionCurrencyTaxAmount + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cbc:Percent) + [UBL-CR-499]-A UBL invoice should not include the TaxTotal TaxSubtotal Percent + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cbc:BaseUnitMeasure) + [UBL-CR-500]-A UBL invoice should not include the TaxTotal TaxSubtotal BaseUnitMeasure + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cbc:PerUnitAmount) + [UBL-CR-501]-A UBL invoice should not include the TaxTotal TaxSubtotal PerUnitAmount + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cbc:TierRange) + [UBL-CR-502]-A UBL invoice should not include the TaxTotal TaxSubtotal TierRange + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cbc:TierRatePercent) + [UBL-CR-503]-A UBL invoice should not include the TaxTotal TaxSubtotal TierRatePercent + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:Name) + [UBL-CR-504]-A UBL invoice should not include the TaxTotal TaxSubtotal TaxCategory Name + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:BaseUnitMeasure) + [UBL-CR-505]-A UBL invoice should not include the TaxTotal TaxSubtotal TaxCategory BaseUnitMeasure + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:PerUnitAmount) + [UBL-CR-506]-A UBL invoice should not include the TaxTotal TaxSubtotal TaxCategory PerUnitAmount + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:TierRange) + [UBL-CR-507]-A UBL invoice should not include the TaxTotal TaxSubtotal TaxCategory TierRange + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:TierRatePercent) + [UBL-CR-508]-A UBL invoice should not include the TaxTotal TaxSubtotal TaxCategory TierRatePercent + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:Name) + [UBL-CR-509]-A UBL invoice should not include the TaxTotal TaxSubtotal TaxCategory TaxScheme Name + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:TaxTypeCode) + [UBL-CR-510]-A UBL invoice should not include the TaxTotal TaxSubtotal TaxCategory TaxScheme TaxTypeCode + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:CurrencyCode) + [UBL-CR-511]-A UBL invoice should not include the TaxTotal TaxSubtotal TaxCategory TaxScheme CurrencyCode + + + + + not(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cac:JurisdictionRegionAddress) + [UBL-CR-512]-A UBL invoice should not include the TaxTotal TaxSubtotal TaxCategory TaxScheme JurisdictionRegionAddress + + + + + not(cac:WithholdingTaxTotal) + [UBL-CR-513]-A UBL invoice should not include the WithholdingTaxTotal + + + + + not(cac:LegalMonetaryTotal/cbc:PayableAlternativeAmount) + [UBL-CR-514]-A UBL invoice should not include the LegalMonetaryTotal PayableAlternativeAmount + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cbc:UUID) + [UBL-CR-515]-A UBL invoice should not include the InvoiceLine UUID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cbc:TaxPointDate) + [UBL-CR-516]-A UBL invoice should not include the InvoiceLine TaxPointDate + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cbc:AccountingCostCode) + [UBL-CR-517]-A UBL invoice should not include the InvoiceLine AccountingCostCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cbc:PaymentPurposeCode) + [UBL-CR-518]-A UBL invoice should not include the InvoiceLine PaymentPurposeCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cbc:FreeOfChargeIndicator) + [UBL-CR-519]-A UBL invoice should not include the InvoiceLine FreeOfChargeIndicator + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:InvoicePeriod/cbc:StartTime) + [UBL-CR-520]-A UBL invoice should not include the InvoiceLine InvoicePeriod StartTime + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:InvoicePeriod/cbc:EndTime) + [UBL-CR-521]-A UBL invoice should not include the InvoiceLine InvoicePeriod EndTime + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:InvoicePeriod/cbc:DurationMeasure) + [UBL-CR-522]-A UBL invoice should not include the InvoiceLine InvoicePeriod DurationMeasure + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:InvoicePeriod/cbc:DescriptionCode) + [UBL-CR-523]-A UBL invoice should not include the InvoiceLine InvoicePeriod DescriptionCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:InvoicePeriod/cbc:Description) + [UBL-CR-524]-A UBL invoice should not include the InvoiceLine InvoicePeriod Description + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:OrderLineReference/cbc:SalesOrderLineID) + [UBL-CR-525]-A UBL invoice should not include the InvoiceLine OrderLineReference SalesOrderLineID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:OrderLineReference/cbc:UUID) + [UBL-CR-526]-A UBL invoice should not include the InvoiceLine OrderLineReference UUID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:OrderLineReference/cbc:LineStatusCode) + [UBL-CR-527]-A UBL invoice should not include the InvoiceLine OrderLineReference LineStatusCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:OrderLineReference/cac:OrderReference) + [UBL-CR-528]-A UBL invoice should not include the InvoiceLine OrderLineReference OrderReference + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DespatchLineReference) + [UBL-CR-529]-A UBL invoice should not include the InvoiceLine DespatchLineReference + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:ReceiptLineReference) + [UBL-CR-530]-A UBL invoice should not include the InvoiceLine ReceiptLineReference + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:BillingReference) + [UBL-CR-531]-A UBL invoice should not include the InvoiceLine BillingReference + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cbc:CopyIndicator) + [UBL-CR-532]-A UBL invoice should not include the InvoiceLine DocumentReference CopyIndicator + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cbc:UUID) + [UBL-CR-533]-A UBL invoice should not include the InvoiceLine DocumentReference UUID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cbc:IssueDate) + [UBL-CR-534]-A UBL invoice should not include the InvoiceLine DocumentReference IssueDate + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cbc:IssueTime) + [UBL-CR-535]-A UBL invoice should not include the InvoiceLine DocumentReference IssueTime + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cbc:DocumentType) + [UBL-CR-537]-A UBL invoice should not include the InvoiceLine DocumentReference DocumentType + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cbc:XPath) + [UBL-CR-538]-A UBL invoice should not include the InvoiceLine DocumentReference Xpath + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cbc:LanguageID) + [UBL-CR-539]-A UBL invoice should not include the InvoiceLine DocumentReference LanguageID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cbc:LocaleCode) + [UBL-CR-540]-A UBL invoice should not include the InvoiceLine DocumentReference LocaleCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cbc:VersionID) + [UBL-CR-541]-A UBL invoice should not include the InvoiceLine DocumentReference VersionID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cbc:DocumentStatusCode) + [UBL-CR-542]-A UBL invoice should not include the InvoiceLine DocumentReference DocumentStatusCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cbc:DocumentDescription) + [UBL-CR-543]-A UBL invoice should not include the InvoiceLine DocumentReference DocumentDescription + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cac:Attachment) + [UBL-CR-544]-A UBL invoice should not include the InvoiceLine DocumentReference Attachment + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cac:ValidityPeriod) + [UBL-CR-545]-A UBL invoice should not include the InvoiceLine DocumentReference ValidityPeriod + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cac:IssuerParty) + [UBL-CR-546]-A UBL invoice should not include the InvoiceLine DocumentReference IssuerParty + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DocumentReference/cac:ResultOfVerification) + [UBL-CR-547]-A UBL invoice should not include the InvoiceLine DocumentReference ResultOfVerification + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:PricingReference) + [UBL-CR-548]-A UBL invoice should not include the InvoiceLine PricingReference + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:OriginatorParty) + [UBL-CR-549]-A UBL invoice should not include the InvoiceLine OriginatorParty + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Delivery) + [UBL-CR-550]-A UBL invoice should not include the InvoiceLine Delivery + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:PaymentTerms) + [UBL-CR-551]-A UBL invoice should not include the InvoiceLine PaymentTerms + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:AllowanceCharge/cbc:ID) + [UBL-CR-552]-A UBL invoice should not include the InvoiceLine AllowanceCharge ID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:AllowanceCharge/cbc:PrepaidIndicator) + [UBL-CR-553]-A UBL invoice should not include the InvoiceLine AllowanceCharge PrepaidIndicator + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:AllowanceCharge/cbc:SequenceNumeric) + [UBL-CR-554]-A UBL invoice should not include the InvoiceLine AllowanceCharge SequenceNumeric + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:AllowanceCharge/cbc:AccountingCostCode) + [UBL-CR-555]-A UBL invoice should not include the InvoiceLine AllowanceCharge AccountingCostCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:AllowanceCharge/cbc:AccountingCost) + [UBL-CR-556]-A UBL invoice should not include the InvoiceLine AllowanceCharge AccountingCost + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:AllowanceCharge/cbc:PerUnitAmount) + [UBL-CR-557]-A UBL invoice should not include the InvoiceLine AllowanceCharge PerUnitAmount + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:AllowanceCharge/cac:TaxCategory) + [UBL-CR-558]-A UBL invoice should not include the InvoiceLine AllowanceCharge TaxCategory + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:AllowanceCharge/cac:TaxTotal) + [UBL-CR-559]-A UBL invoice should not include the InvoiceLine AllowanceCharge TaxTotal + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:AllowanceCharge/cac:PaymentMeans) + [UBL-CR-560]-A UBL invoice should not include the InvoiceLine AllowanceCharge PaymentMeans + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:TaxTotal) + [UBL-CR-561]-A UBL invoice should not include the InvoiceLine TaxTotal + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:WithholdingTaxTotal) + [UBL-CR-562]-A UBL invoice should not include the InvoiceLine WithholdingTaxTotal + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cbc:PackQuantity) + [UBL-CR-563]-A UBL invoice should not include the InvoiceLine Item PackQuantity + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cbc:PackSizeNumeric) + [UBL-CR-564]-A UBL invoice should not include the InvoiceLine Item PackSizeNumeric + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cbc:CatalogueIndicator) + [UBL-CR-565]-A UBL invoice should not include the InvoiceLine Item CatalogueIndicator + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cbc:HazardousRiskIndicator) + [UBL-CR-566]-A UBL invoice should not include the InvoiceLine Item HazardousRiskIndicator + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cbc:AdditionalInformation) + [UBL-CR-567]-A UBL invoice should not include the InvoiceLine Item AdditionalInformation + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cbc:Keyword) + [UBL-CR-568]-A UBL invoice should not include the InvoiceLine Item Keyword + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cbc:BrandName) + [UBL-CR-569]-A UBL invoice should not include the InvoiceLine Item BrandName + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cbc:ModelName) + [UBL-CR-570]-A UBL invoice should not include the InvoiceLine Item ModelName + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:BuyersItemIdentification/cbc:ExtendedID) + [UBL-CR-571]-A UBL invoice should not include the InvoiceLine Item BuyersItemIdentification ExtendedID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:BuyersItemIdentification/cbc:BarcodeSymbologyID) + [UBL-CR-572]-A UBL invoice should not include the InvoiceLine Item BuyersItemIdentification BarcodeSymbologyID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:BuyersItemIdentification/cac:PhysicalAttribute) + [UBL-CR-573]-A UBL invoice should not include the InvoiceLine Item BuyersItemIdentification PhysicalAttribute + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:BuyersItemIdentification/cac:MeasurementDimension) + [UBL-CR-574]-A UBL invoice should not include the InvoiceLine Item BuyersItemIdentification MeasurementDimension + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:BuyersItemIdentification/cac:IssuerParty) + [UBL-CR-575]-A UBL invoice should not include the InvoiceLine Item BuyersItemIdentification IssuerParty + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:SellersItemIdentification/cbc:ExtendedID) + [UBL-CR-576]-A UBL invoice should not include the InvoiceLine Item SellersItemIdentification ExtendedID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:SellersItemIdentification/cbc:BarcodeSymbologyID) + [UBL-CR-577]-A UBL invoice should not include the InvoiceLine Item SellersItemIdentification BarcodeSymbologyID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:SellersItemIdentification/cac:PhysicalAttribute) + [UBL-CR-578]-A UBL invoice should not include the InvoiceLine Item SellersItemIdentification PhysicalAttribute + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:SellersItemIdentification/cac:MeasurementDimension) + [UBL-CR-579]-A UBL invoice should not include the InvoiceLine Item SellersItemIdentification MeasurementDimension + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:SellersItemIdentification/cac:IssuerParty) + [UBL-CR-580]-A UBL invoice should not include the InvoiceLine Item SellersItemIdentification IssuerParty + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ManufacturersItemIdentification) + [UBL-CR-581]-A UBL invoice should not include the InvoiceLine Item ManufacturersItemIdentification + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:StandardItemIdentification/cbc:ExtendedID) + [UBL-CR-582]-A UBL invoice should not include the InvoiceLine Item StandardItemIdentification ExtendedID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:StandardItemIdentification/cbc:BarcodeSymbologyID) + [UBL-CR-583]-A UBL invoice should not include the InvoiceLine Item StandardItemIdentification BarcodeSymbologyID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:StandardItemIdentification/cac:PhysicalAttribute) + [UBL-CR-584]-A UBL invoice should not include the InvoiceLine Item StandardItemIdentification PhysicalAttribute + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:StandardItemIdentification/cac:MeasurementDimension) + [UBL-CR-585]-A UBL invoice should not include the InvoiceLine Item StandardItemIdentification MeasurementDimension + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:StandardItemIdentification/cac:IssuerParty) + [UBL-CR-586]-A UBL invoice should not include the InvoiceLine Item StandardItemIdentification IssuerParty + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:CatalogueItemIdentification) + [UBL-CR-587]-A UBL invoice should not include the InvoiceLine Item CatalogueItemIdentification + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:AdditionalItemIdentification) + [UBL-CR-588]-A UBL invoice should not include the InvoiceLine Item AdditionalItemIdentification + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:CatalogueDocumentReference) + [UBL-CR-589]-A UBL invoice should not include the InvoiceLine Item CatalogueDocumentReference + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ItemSpecificationDocumentReference) + [UBL-CR-590]-A UBL invoice should not include the InvoiceLine Item ItemSpecificationDocumentReference + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:OriginCountry/cbc:Name) + [UBL-CR-591]-A UBL invoice should not include the InvoiceLine Item OriginCountry Name + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:CommodityClassification/cbc:NatureCode) + [UBL-CR-592]-A UBL invoice should not include the InvoiceLine Item CommodityClassification NatureCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:CommodityClassification/cbc:CargoTypeCode) + [UBL-CR-593]-A UBL invoice should not include the InvoiceLine Item CommodityClassification CargoTypeCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:CommodityClassification/cbc:CommodityCode) + [UBL-CR-594]-A UBL invoice should not include the InvoiceLine Item CommodityClassification CommodityCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:TransactionConditions) + [UBL-CR-595]-A UBL invoice should not include the InvoiceLine Item TransactionConditions + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:HazardousItem) + [UBL-CR-596]-A UBL invoice should not include the InvoiceLine Item HazardousItem + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory/cbc:Name) + [UBL-CR-597]-A UBL invoice should not include the InvoiceLine Item ClassifiedTaxCategory Name + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory/cbc:BaseUnitMeasure) + [UBL-CR-598]-A UBL invoice should not include the InvoiceLine Item ClassifiedTaxCategory BaseUnitMeasure + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory/cbc:PerUnitAmount) + [UBL-CR-599]-A UBL invoice should not include the InvoiceLine Item ClassifiedTaxCategory PerUnitAmount + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory/cbc:TaxExemptionReasonCode) + [UBL-CR-600]-A UBL invoice should not include the InvoiceLine Item ClassifiedTaxCategory TaxExemptionReasonCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory/cbc:TaxExemptionReason) + [UBL-CR-601]-A UBL invoice should not include the InvoiceLine Item ClassifiedTaxCategory TaxExemptionReason + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory/cbc:TierRange) + [UBL-CR-602]-A UBL invoice should not include the InvoiceLine Item ClassifiedTaxCategory TierRange + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory/cbc:TierRatePercent) + [UBL-CR-603]-A UBL invoice should not include the InvoiceLine Item ClassifiedTaxCategory TierRatePercent + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory/cac:TaxScheme/cbc:Name) + [UBL-CR-604]-A UBL invoice should not include the InvoiceLine Item ClassifiedTaxCategory TaxScheme Name + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory/cac:TaxScheme/cbc:TaxTypeCode) + [UBL-CR-605]-A UBL invoice should not include the InvoiceLine Item ClassifiedTaxCategory TaxScheme TaxTypeCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory/cac:TaxScheme/cbc:CurrencyCode) + [UBL-CR-606]-A UBL invoice should not include the InvoiceLine Item ClassifiedTaxCategory TaxScheme CurrencyCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory/cac:TaxScheme/cac:JurisdictionRegionAddress) + [UBL-CR-607]-A UBL invoice should not include the InvoiceLine Item ClassifiedTaxCategory TaxScheme JurisdictionRegionAddress + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty/cbc:ID) + [UBL-CR-608]-A UBL invoice should not include the InvoiceLine Item AdditionalItemProperty ID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty/cbc:NameCode) + [UBL-CR-609]-A UBL invoice should not include the InvoiceLine Item AdditionalItemProperty NameCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty/cbc:TestMethod) + [UBL-CR-610]-A UBL invoice should not include the InvoiceLine Item AdditionalItemProperty TestMethod + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty/cbc:ValueQuantity) + [UBL-CR-611]-A UBL invoice should not include the InvoiceLine Item AdditionalItemProperty ValueQuantity + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty/cbc:ValueQualifier) + [UBL-CR-612]-A UBL invoice should not include the InvoiceLine Item AdditionalItemProperty ValueQualifier + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty/cbc:ImportanceCode) + [UBL-CR-613]-A UBL invoice should not include the InvoiceLine Item AdditionalItemProperty ImportanceCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty/cbc:ListValue) + [UBL-CR-614]-A UBL invoice should not include the InvoiceLine Item AdditionalItemProperty ListValue + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty/cac:UsabilityPeriod) + [UBL-CR-615]-A UBL invoice should not include the InvoiceLine Item AdditionalItemProperty UsabilityPeriod + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty/cac:ItemPropertyGroup) + [UBL-CR-616]-A UBL invoice should not include the InvoiceLine Item AdditionalItemProperty ItemPropertyGroup + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty/cac:RangeDimension) + [UBL-CR-617]-A UBL invoice should not include the InvoiceLine Item AdditionalItemProperty RangeDimension + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty/cac:ItemPropertyRange) + [UBL-CR-618]-A UBL invoice should not include the InvoiceLine Item AdditionalItemProperty ItemPropertyRange + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ManufacturerParty) + [UBL-CR-619]-A UBL invoice should not include the InvoiceLine Item ManufacturerParty + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:InformationContentProviderParty) + [UBL-CR-620]-A UBL invoice should not include the InvoiceLine Item InformationContentProviderParty + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:OriginAddress) + [UBL-CR-621]-A UBL invoice should not include the InvoiceLine Item OriginAddress + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:ItemInstance) + [UBL-CR-622]-A UBL invoice should not include the InvoiceLine Item ItemInstance + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:Certificate) + [UBL-CR-623]-A UBL invoice should not include the InvoiceLine Item Certificate + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/cac:Dimension) + [UBL-CR-624]-A UBL invoice should not include the InvoiceLine Item Dimension + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cbc:PriceChangeReason) + [UBL-CR-625]-A UBL invoice should not include the InvoiceLine Item Price PriceChangeReason + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cbc:PriceTypeCode) + [UBL-CR-626]-A UBL invoice should not include the InvoiceLine Item Price PriceTypeCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cbc:PriceType) + [UBL-CR-627]-A UBL invoice should not include the InvoiceLine Item Price PriceType + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cbc:OrderableUnitFactorRate) + [UBL-CR-628]-A UBL invoice should not include the InvoiceLine Item Price OrderableUnitFactorRate + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cbc:ValidityPeriod) + [UBL-CR-629]-A UBL invoice should not include the InvoiceLine Item Price ValidityPeriod + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cbc:PriceList) + [UBL-CR-630]-A UBL invoice should not include the InvoiceLine Item Price PriceList + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cbc:ID) + [UBL-CR-632]-A UBL invoice should not include the InvoiceLine Item Price AllowanceCharge ID + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) + [UBL-CR-633]-A UBL invoice should not include the InvoiceLine Item Price AllowanceCharge AllowanceChargeReasonCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cbc:AllowanceChargeReason) + [UBL-CR-634]-A UBL invoice should not include the InvoiceLine Item Price AllowanceCharge AllowanceChargeReason + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cbc:MultiplierFactorNumeric) + [UBL-CR-635]-A UBL invoice should not include the InvoiceLine Item Price AllowanceCharge MultiplierFactorNumeric + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cbc:PrepaidIndicator) + [UBL-CR-636]-A UBL invoice should not include the InvoiceLine Item Price AllowanceCharge PrepaidIndicator + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cbc:SequenceNumeric) + [UBL-CR-637]-A UBL invoice should not include the InvoiceLine Item Price AllowanceCharge SequenceNumeric + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cbc:AccountingCostCode) + [UBL-CR-638]-A UBL invoice should not include the InvoiceLine Item Price AllowanceCharge AccountingCostCode + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cbc:AccountingCost) + [UBL-CR-639]-A UBL invoice should not include the InvoiceLine Item Price AllowanceCharge AccountingCost + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cbc:PerUnitAmount) + [UBL-CR-640]-A UBL invoice should not include the InvoiceLine Item Price AllowanceCharge PerUnitAmount + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cac:TaxCategory) + [UBL-CR-641]-A UBL invoice should not include the InvoiceLine Item Price AllowanceCharge TaxCategory + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cac:TaxTotal) + [UBL-CR-642]-A UBL invoice should not include the InvoiceLine Item Price AllowanceCharge TaxTotal + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cac:PaymentMeans) + [UBL-CR-643]-A UBL invoice should not include the InvoiceLine Item Price AllowanceCharge PaymentMeans + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:PricingExchangeRate) + [UBL-CR-644]-A UBL invoice should not include the InvoiceLine Item Price PricingExchangeRate + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:DeliveryTerms) + [UBL-CR-645]-A UBL invoice should not include the InvoiceLine DeliveryTerms + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:SubInvoiceLine) + [UBL-CR-646]-A UBL invoice should not include the InvoiceLine SubInvoiceLine + + + + + not((cac:InvoiceLine|cac:CreditNoteLine)/cac:ItemPriceExtension) + [UBL-CR-647]-A UBL invoice should not include the InvoiceLine ItemPriceExtension + + + + + not(cbc:CustomizationID/@schemeID) + [UBL-CR-648]-A UBL invoice should not include the CustomizationID scheme identifier + + + + + not(cbc:ProfileID/@schemeID) + [UBL-CR-649]-A UBL invoice should not include the ProfileID scheme identifier + + + + + not(cbc:ID/@schemeID) + [UBL-CR-650]-A UBL invoice shall not include the Invoice ID scheme identifier + + + + + not(cbc:SalesOrderID/@schemeID) + [UBL-CR-651]-A UBL invoice should not include the SalesOrderID scheme identifier + + + + + not(//cac:PartyTaxScheme/cbc:CompanyID/@schemeID) + [UBL-CR-652]-A UBL invoice should not include the PartyTaxScheme CompanyID scheme identifier + + + + + not(cac:PaymentMeans/cbc:PaymentID/@schemeID) + [UBL-CR-653]-A UBL invoice should not include the PaymentID scheme identifier + + + + + not(cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID/@schemeID) + [UBL-CR-654]-A UBL invoice should not include the PayeeFinancialAccount scheme identifier + + + + + not(cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cbc:ID/@schemeID) + [UBL-CR-655]-A UBL invoice shall not include the FinancialInstitutionBranch ID scheme identifier + + + + + not(cbc:InvoiceTypeCode/@listID) + [UBL-CR-656]-A UBL invoice should not include the InvoiceTypeCode listID + + + + + not(cbc:DocumentCurrencyCode/@listID) + [UBL-CR-657]-A UBL invoice should not include the DocumentCurrencyCode listID + + + + + not(cbc:TaxCurrencyCode/@listID) + [UBL-CR-658]-A UBL invoice should not include the TaxCurrencyCode listID + + + + + not(cac:AdditionalDocumentReference/cbc:DocumentTypeCode/@listID) + [UBL-CR-659]-A UBL invoice shall not include the AdditionalDocumentReference DocumentTypeCode listID + + + + + not(//cac:Country/cbc:IdentificationCode/@listID) + [UBL-CR-660]-A UBL invoice should not include the Country Identification code listID + + + + + not(cac:PaymentMeans/cbc:PaymentMeansCode/@listID) + [UBL-CR-661]-A UBL invoice should not include the PaymentMeansCode listID + + + + + not(//cbc:AllowanceChargeReasonCode/@listID) + [UBL-CR-662]-A UBL invoice should not include the AllowanceChargeReasonCode listID + + + + + not(//@unitCodeListID) + [UBL-CR-663]-A UBL invoice should not include the unitCodeListID + + + + + not(//cac:FinancialInstitution) + [UBL-CR-664]-A UBL invoice should not include the FinancialInstitutionBranch FinancialInstitution + + + + + not(//cac:AdditionalDocumentReference[cbc:DocumentTypeCode != '130' or not(cbc:DocumentTypeCode)]/cbc:ID/@schemeID) + [UBL-CR-665]-A UBL invoice should not include the AdditionalDocumentReference ID schemeID unless the DocumentTypeCode equals '130' + + + + + not(//cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cac:Attachment) + [UBL-CR-666]-A UBL invoice shall not include an AdditionalDocumentReference simultaneously referring an Invoice Object Identifier and an Attachment + + + + + not(//cac:BuyersItemIdentification/cbc:ID/@schemeID) + [UBL-CR-667]-A UBL invoice should not include a Buyer Item Identification schemeID + + + + + not(//cac:SellersItemIdentification/cbc:ID/@schemeID) + [UBL-CR-668]-A UBL invoice should not include a Sellers Item Identification schemeID + + + + + not(//cac:Price/cac:AllowanceCharge/cbc:AllowanceChargeReasonCode) + [UBL-CR-669]-A UBL invoice should not include a Price Allowance Reason Code + + + + + not(//cac:Price/cac:AllowanceCharge/cbc:AllowanceChargeReason) + [UBL-CR-670]-A UBL invoice should not include a Price Allowance Reason + + + + + not(//cac:Price/cac:AllowanceCharge/cbc:MultiplierFactorNumeric) + [UBL-CR-671]-A UBL invoice should not include a Price Allowance Multiplier Factor + + + + + not(cbc:CreditNoteTypeCode/@listID) + [UBL-CR-672]-A UBL credit note should not include the CreditNoteTypeCode listID + + + + + not(//cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cbc:DocumentDescription) + [UBL-CR-673]-A UBL invoice shall not include an AdditionalDocumentReference simultaneously referring an Invoice Object Identifier and an Document Description + + + + + not(//cbc:PrimaryAccountNumberID/@schemeID) + [UBL-CR-674]-A UBL invoice should not include the PrimaryAccountNumber schemeID + + + + + not(//cac:CardAccount/cbc:NetworkID/@schemeID) + [UBL-CR-675]-A UBL invoice should not include the NetworkID schemeID + + + + + not(//cac:PaymentMandate/cbc:ID/@schemeID) + [UBL-CR-676]-A UBL invoice should not include the PaymentMandate/ID schemeID + + + + + not(//cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID/@schemeID) + [UBL-CR-677]-A UBL invoice should not include the PayerFinancialAccount/ID schemeID + + + + + not(//cac:TaxCategory/cbc:ID/@schemeID) + [UBL-CR-678]-A UBL invoice should not include the TaxCategory/ID schemeID + + + + + not(//cac:ClassifiedTaxCategory/cbc:ID/@schemeID) + [UBL-CR-679]-A UBL invoice should not include the ClassifiedTaxCategory/ID schemeID + + + + + not(//cac:PaymentMeans/cac:PayerFinancialAccount) + [UBL-CR-680]-A UBL invoice should not include the PaymentMeans/PayerFinancialAccount + + + + + not(cac:PaymentMeans/cbc:InstructionNote) + [UBL-CR-681]-A UBL invoice should not include the PaymentMeans InstructionNote + + + + + not(cac:Delivery/cac:DeliveryAddress) + [UBL-CR-682]-A UBL invoice should not include the Delivery DeliveryAddress + + + + + not(//@schemeName) + [UBL-DT-08]-Scheme name attribute should not be present + + + + + not(//@schemeAgencyName) + [UBL-DT-09]-Scheme agency name attribute should not be present + + + + + not(//@schemeDataURI) + [UBL-DT-10]-Scheme data uri attribute should not be present + + + + + not(//@schemeURI) + [UBL-DT-11]-Scheme uri attribute should not be present + + + + + not(//@format) + [UBL-DT-12]-Format attribute should not be present + + + + + not(//@unitCodeListIdentifier) + [UBL-DT-13]-Unit code list identifier attribute should not be present + + + + + not(//@unitCodeListAgencyIdentifier) + [UBL-DT-14]-Unit code list agency identifier attribute should not be present + + + + + not(//@unitCodeListAgencyName) + [UBL-DT-15]-Unit code list agency name attribute should not be present + + + + + not(//@listAgencyName) + [UBL-DT-16]-List agency name attribute should not be present + + + + + not(//@listName) + [UBL-DT-17]-List name attribute should not be present + + + + + count(//@name) - count(//cbc:PaymentMeansCode/@name) <= 0 + [UBL-DT-18]-Name attribute should not be present + + + + + not(//@languageID) + [UBL-DT-19]-Language identifier attribute should not be present + + + + + not(//@listURI) + [UBL-DT-20]-List uri attribute should not be present + + + + + not(//@listSchemeURI) + [UBL-DT-21]-List scheme uri attribute should not be present + + + + + not(//@languageLocaleID) + [UBL-DT-22]-Language local identifier attribute should not be present + + + + + not(//@uri) + [UBL-DT-23]-Uri attribute should not be present + + + + + not(//@currencyCodeListVersionID) + [UBL-DT-24]-Currency code list version id should not be present + + + + + not(//@characterSetCode) + [UBL-DT-25]-CharacterSetCode attribute should not be present + + + + + not(//@encodingCode) + [UBL-DT-26]-EncodingCode attribute should not be present + + + + + not(//@schemeAgencyID) + [UBL-DT-27]-Scheme Agency ID attribute should not be present + + + + + not(//@listAgencyID) + [UBL-DT-28]-List Agency ID attribute should not be present + + + + + (count(cac:ContractDocumentReference/cbc:ID) <= 1) + [UBL-SR-01]-Contract identifier shall occur maximum once. + + + + + (count(cac:ReceiptDocumentReference/cbc:ID) <= 1) + [UBL-SR-02]-Receive advice identifier shall occur maximum once + + + + + (count(cac:DespatchDocumentReference/cbc:ID) <= 1) + [UBL-SR-03]-Despatch advice identifier shall occur maximum once + + + + + (count(cac:AdditionalDocumentReference[cbc:DocumentTypeCode='130']/cbc:ID) <= 1) + [UBL-SR-04]-Invoice object identifier shall occur maximum once + + + + + (count(cac:PaymentTerms/cbc:Note) <= 1) + [UBL-SR-05]-Payment terms shall occur maximum once + + + + + (count(cac:InvoicePeriod) <= 1) + [UBL-SR-08]-Invoice period shall occur maximum once + + + + + (count(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) <= 1) + [UBL-SR-09]-Seller name shall occur maximum once + + + + + (count(cac:AccountingSupplierParty/cac:Party/cac:PartyName/cbc:Name) <= 1) + [UBL-SR-10]-Seller trader name shall occur maximum once + + + + + (count(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID) <= 1) + [UBL-SR-11]-Seller legal registration identifier shall occur maximum once + + + + + (count(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/upper-case(cbc:ID)='VAT']/cbc:CompanyID) <= 1) + [UBL-SR-12]-Seller VAT identifier shall occur maximum once + + + + + (count(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/upper-case(cbc:ID)!='VAT']/cbc:CompanyID) <= 1) + [UBL-SR-13]-Seller tax registration shall occur maximum once + + + + + (count(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyLegalForm) <= 1) + [UBL-SR-14]-Seller additional legal information shall occur maximum once + + + + + (count(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) <= 1) + [UBL-SR-15]-Buyer name shall occur maximum once + + + + + (count(cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID) <= 1) + [UBL-SR-16]-Buyer identifier shall occur maximum once + + + + + (count(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID) <= 1) + [UBL-SR-17]-Buyer legal registration identifier shall occur maximum once + + + + + (count(cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/upper-case(cbc:ID)='VAT']/cbc:CompanyID) <= 1) + [UBL-SR-18]-Buyer VAT identifier shall occur maximum once + + + + + (count(cac:Delivery) <= 1) + [UBL-SR-24]-Deliver to information shall occur maximum once + + + + + (count(//cac:PartyIdentification/cbc:ID[upper-case(@schemeID) = 'SEPA']) <= 1) + [UBL-SR-29]-Bank creditor reference shall occur maximum once + + + + + (count(cac:ProjectReference/cbc:ID) <= 1) + [UBL-SR-39]-Project reference shall occur maximum once. + + + + + (count(cac:AccountingCustomerParty/cac:Party/cac:PartyName/cbc:Name) <= 1) + [UBL-SR-40]-Buyer trade name shall occur maximum once + + + + + count(//cbc:PaymentID[not(preceding::cbc:PaymentID/. = .)]) <= 1 + [UBL-SR-44]-An Invoice may only have one unique PaymentID, but the PaymentID may be used for multiple PaymentMeans + + + + + (count(cac:PaymentMeans/cbc:PaymentDueDate) <=1) + [UBL-SR-45]-Due Date shall occur maximum once + + + + + (count(cac:PaymentMeans/cbc:PaymentMeansCode/@name) <=1) + [UBL-SR-46]-Payment means text shall occur maximum once + + + + + count(//cbc:PaymentMeansCode[not(preceding::cbc:PaymentMeansCode/. = .)]) <= 1 + [UBL-SR-47]-When there are more than one payment means code, they shall be equal + + + + + (count(cac:InvoicePeriod/cbc:DescriptionCode) <=1) + [UBL-SR-49]-Value tax point date shall occur maximum once + + + + + count(cac:PaymentMeans/cac:CardAccount) <= 1 + [UBL-SR-54]-An Invoice shall contain maximum one Payment Card account (BG-18). + + + + + count(cac:PaymentMeans/cac:PaymentMandate) <= 1 + [UBL-SR-55]-An Invoice shall contain maximum one Payment Mandate (BG-19). + + + + + count(cac:OriginatorDocumentReference/cbc:ID) <= 1 + [UBL-SR-56]-An Invoice shall contain maximum one Originator document reference identifier (BT-17). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine | cac:CreditNoteLine" shadowed by preceding rule + + cac:InvoiceLine | cac:CreditNoteLine + + + + + + + + + + + + + + cac:InvoiceLine | cac:CreditNoteLine + + + + + + + + (count(cbc:Note) <= 1) + [UBL-SR-34]-Invoice line note shall occur maximum once + + + + + (count(cac:OrderLineReference/cbc:LineID) <= 1) + [UBL-SR-35]-Referenced purchase order line identifier shall occur maximum once + + + + + (count(cac:InvoicePeriod) <= 1) + [UBL-SR-36]-Invoice line period shall occur maximum once + + + + + (count(cac:Price/cac:AllowanceCharge/cbc:Amount) <= 1) + [UBL-SR-37]-Item price discount shall occur maximum once + + + + + count(cac:Item/cac:ClassifiedTaxCategory) = 1 + [UBL-SR-48]-Invoice lines shall have one and only one classified tax category. + + + + + count(cac:Item/cbc:Description) <= 1 + [UBL-SR-50]-Item description shall occur maximum once + + + + + count(cac:DocumentReference) <= 1 + [UBL-SR-52]-Document reference shall occur maximum once + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PayeeParty" shadowed by preceding rule + + cac:PayeeParty + + + + + + + + + + + + + + cac:PayeeParty + + + + + + + + (count(cac:PartyName/cbc:Name) <= 1) and ((cac:PartyName/cbc:Name) != (../cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName)) + [UBL-SR-19]-Payee name shall occur maximum once, if the Payee is different from the Seller + + + + + (count(cac:PartyIdentification/cbc:ID[upper-case(@schemeID) != 'SEPA']) <= 1) and ((cac:PartyName/cbc:Name) != (../cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName)) + [UBL-SR-20]-Payee identifier shall occur maximum once, if the Payee is different from the Seller + + + + + (count(cac:PartyLegalEntity/cbc:CompanyID) <= 1) and ((cac:PartyName/cbc:Name) != (../cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName)) + [UBL-SR-21]-Payee legal registration identifier shall occur maximum once, if the Payee is different from the Seller + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PaymentMeans" shadowed by preceding rule + + cac:PaymentMeans + + + + + + + + + + + + + + cac:PaymentMeans + + + + + + + + (count(cbc:PaymentID) <= 1) + [UBL-SR-26]-Payment reference shall occur maximum once + + + + + (count(cbc:PaymentMeansCode) <= 1) + [UBL-SR-27]-Payment means text shall occur maximum once + + + + + (count(cac:PaymentMandate/cbc:ID) <= 1) + [UBL-SR-28]-Mandate reference identifier shall occur maximum once + + + + + + + + + + + + + + + WARNING: Rule for context "cac:BillingReference" shadowed by preceding rule + + cac:BillingReference + + + + + + + + + + + + + + cac:BillingReference + + + + + + + + (count(cac:InvoiceDocumentReference) <= 1) + [UBL-SR-06]-Preceding invoice reference shall occur maximum once + + + + + (cac:InvoiceDocumentReference/cbc:ID) + [UBL-SR-07]-If there is a preceding invoice reference, the preceding invoice number shall be present + + + + + + + + + + + + + + + WARNING: Rule for context "cac:TaxRepresentativeParty" shadowed by preceding rule + + cac:TaxRepresentativeParty + + + + + + + + + + + + + + cac:TaxRepresentativeParty + + + + + + + + (count(cac:PartyName/cbc:Name) <= 1) + [UBL-SR-22]-Seller tax representative name shall occur maximum once, if the Seller has a tax representative + + + + + (count(cac:PartyTaxScheme/cbc:CompanyID) <= 1) + [UBL-SR-23]-Seller tax representative VAT identifier shall occur maximum once, if the Seller has a tax representative + + + + + + + + + + + + + + + WARNING: Rule for context "cac:TaxSubtotal" shadowed by preceding rule + + cac:TaxSubtotal + + + + + + + + + + + + + + cac:TaxSubtotal + + + + + + + + (count(cac:TaxCategory/cbc:TaxExemptionReason) <= 1) + [UBL-SR-32]-VAT exemption reason text shall occur maximum once + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode" shadowed by preceding rule + + cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode + + + + + + + + + + + + + + cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode + + + + + + + + (self::cbc:InvoiceTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 71 80 81 82 84 102 130 202 203 204 211 218 219 295 325 326 331 380 382 383 384 385 386 387 388 389 390 393 394 395 456 457 471 472 473 500 501 527 553 575 623 633 751 780 817 870 875 876 877 935 ', concat(' ', normalize-space(.), ' '))))) or (self::cbc:CreditNoteTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 81 83 261 262 296 308 381 396 420 458 502 503 532 ', concat(' ', normalize-space(.), ' '))))) + [BR-CL-01]-The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001. + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:Amount | cbc:BaseAmount | cbc:PriceAmount | cbc:TaxAmount | cbc:TaxableAmount | cbc:LineExtensionAmount | cbc:TaxExclusiveAmount | cbc:TaxInclusiveAmount | cbc:AllowanceTotalAmount | cbc:ChargeTotalAmount | cbc:PrepaidAmount | cbc:PayableRoundingAmount | cbc:PayableAmount" shadowed by preceding rule + + cbc:Amount | cbc:BaseAmount | cbc:PriceAmount | cbc:TaxAmount | cbc:TaxableAmount | cbc:LineExtensionAmount | cbc:TaxExclusiveAmount | cbc:TaxInclusiveAmount | cbc:AllowanceTotalAmount | cbc:ChargeTotalAmount | cbc:PrepaidAmount | cbc:PayableRoundingAmount | cbc:PayableAmount + + + + + + + + + + + + + + cbc:Amount | cbc:BaseAmount | cbc:PriceAmount | cbc:TaxAmount | cbc:TaxableAmount | cbc:LineExtensionAmount | cbc:TaxExclusiveAmount | cbc:TaxInclusiveAmount | cbc:AllowanceTotalAmount | cbc:ChargeTotalAmount | cbc:PrepaidAmount | cbc:PayableRoundingAmount | cbc:PayableAmount + + + + + + + + ((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD AOA ARS AUD AWG AZN BAM BBD BDT BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XCG XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(@currencyID), ' ')))) + [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:DocumentCurrencyCode" shadowed by preceding rule + + cbc:DocumentCurrencyCode + + + + + + + + + + + + + + cbc:DocumentCurrencyCode + + + + + + + + ((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD AOA ARS AUD AWG AZN BAM BBD BDT BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XCG XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' ')))) + [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:TaxCurrencyCode" shadowed by preceding rule + + cbc:TaxCurrencyCode + + + + + + + + + + + + + + cbc:TaxCurrencyCode + + + + + + + + ((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD AOA ARS AUD AWG AZN BAM BBD BDT BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XCG XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' ')))) + [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoicePeriod/cbc:DescriptionCode" shadowed by preceding rule + + cac:InvoicePeriod/cbc:DescriptionCode + + + + + + + + + + + + + + cac:InvoicePeriod/cbc:DescriptionCode + + + + + + + + ((not(contains(normalize-space(.), ' ')) and contains(' 3 35 432 ', concat(' ', normalize-space(.), ' ')))) + [BR-CL-06]-Value added tax point date code MUST be coded using a restriction of UNTDID 2005. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID[@schemeID] | cac:DocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID[@schemeID]" shadowed by preceding rule + + cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID[@schemeID] | cac:DocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID[@schemeID] + + + + + + + + + + + + + + cac:AdditionalDocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID[@schemeID] | cac:DocumentReference[cbc:DocumentTypeCode = '130']/cbc:ID[@schemeID] + + + + + + + + ((not(contains(normalize-space(@schemeID), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABQ ABR ABS ABT ABU ABV ABW ABX ABY ABZ AC ACA ACB ACC ACD ACE ACF ACG ACH ACI ACJ ACK ACL ACN ACO ACP ACQ ACR ACT ACU ACV ACW ACX ACY ACZ ADA ADB ADC ADD ADE ADF ADG ADI ADJ ADK ADL ADM ADN ADO ADP ADQ ADT ADU ADV ADW ADX ADY ADZ AE AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AF AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX AFY AFZ AGA AGB AGC AGD AGE AGF AGG AGH AGI AGJ AGK AGL AGM AGN AGO AGP AGQ AGR AGS AGT AGU AGV AGW AGX AGY AGZ AHA AHB AHC AHD AHE AHF AHG AHH AHI AHJ AHK AHL AHM AHN AHO AHP AHQ AHR AHS AHT AHU AHV AHX AHY AHZ AIA AIB AIC AID AIE AIF AIG AIH AII AIJ AIK AIL AIM AIN AIO AIP AIQ AIR AIS AIT AIU AIV AIW AIX AIY AIZ AJA AJB AJC AJD AJE AJF AJG AJH AJI AJJ AJK AJL AJM AJN AJO AJP AJQ AJR AJS AJT AJU AJV AJW AJX AJY AJZ AKA AKB AKC AKD AKE AKF AKG AKH AKI AKJ AKK AKL AKM AKN AKO AKP AKQ AKR AKS AKT AKU AKV AKW AKX AKY AKZ ALA ALB ALC ALD ALE ALF ALG ALH ALI ALJ ALK ALL ALM ALN ALO ALP ALQ ALR ALS ALT ALU ALV ALW ALX ALY ALZ AMA AMB AMC AMD AME AMF AMG AMH AMI AMJ AMK AML AMM AMN AMO AMP AMQ AMR AMS AMT AMU AMV AMW AMX AMY AMZ ANA ANB ANC AND ANE ANF ANG ANH ANI ANJ ANK ANL ANM ANN ANO ANP ANQ ANR ANS ANT ANU ANV ANW ANX ANY AOA AOD AOE AOF AOG AOH AOI AOJ AOK AOL AOM AON AOO AOP AOQ AOR AOS AOT AOU AOV AOW AOX AOY AOZ AP APA APB APC APD APE APF APG APH API APJ APK APL APM APN APO APP APQ APR APS APT APU APV APW APX APY APZ AQA AQB AQC AQD AQE AQF AQG AQH AQI AQJ AQK AQL AQM AQN AQO AQP AQQ AQR AQS AQT AQU AQV AQW AQX AQY AQZ ARA ARB ARC ARD ARE ARF ARG ARH ARI ARJ ARK ARL ARM ARN ARO ARP ARQ ARR ARS ART ARU ARV ARW ARX ARY ARZ ASA ASB ASC ASD ASE ASF ASG ASH ASI ASJ ASK ASL ASM ASN ASO ASP ASQ ASR ASS AST ASU ASV ASW ASX ASY ASZ ATA ATB ATC ATD ATE ATF ATG ATH ATI ATJ ATK ATL ATM ATN ATO ATP ATQ ATR ATS ATT ATU ATV ATW ATX ATY ATZ AU AUA AUB AUC AUD AUE AUF AUG AUH AUI AUJ AUK AUL AUM AUN AUO AUP AUQ AUR AUS AUT AUU AUV AUW AUX AUY AUZ AV AVA AVB AVC AVD AVE AVF AVG AVH AVI AVJ AVK AVL AVM AVN AVO AVP AVQ AVR AVS AVT AVU AVV AVW AVX AVY AVZ AWA AWB AWC AWD AWE AWF AWG AWH AWI AWJ AWK AWL AWM AWN AWO AWP AWQ AWR AWS AWT AWU AWV AWW AWX AWY AWZ AXA AXB AXC AXD AXE AXF AXG AXH AXI AXJ AXK AXL AXM AXN AXO AXP AXQ AXR AXS AXU BA BC BD BE BH BM BN BO BR BT BTP BW CAS CAT CAU CAV CAW CAX CAY CAZ CBA CBB CD CEC CED CFE CFF CFO CG CH CK CKN CM CMR CN CNO COF CP CR CRN CS CST CT CU CV CW CZ DA DAN DB DI DL DM DQ DR EA EB ED EE EEP EI EN EQ ER ERN ET EX FC FF FI FLW FN FO FS FT FV FX GA GC GD GDN GN HS HWB IA IB ICA ICE ICO II IL INB INN INO IP IS IT IV JB JE LA LAN LAR LB LC LI LO LRC LS MA MB MF MG MH MR MRN MS MSS MWB NA NF OH OI ON OP OR PB PC PD PE PF PI PK PL POR PP PQ PR PS PW PY RA RC RCN RE REN RF RR RT SA SB SD SE SEA SF SH SI SM SN SP SQ SRN SS STA SW SZ TB TCR TE TF TI TIN TL TN TP UAR UC UCN UN UO URI VA VC VGR VM VN VON VOR VP VR VS VT VV WE WM WN WR WS WY XA XC XP ZZZ ', concat(' ', normalize-space(@schemeID), ' ')))) + [BR-CL-07]-Object identifier identification scheme identifier MUST be coded using a restriction of UNTDID 1153. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PartyIdentification/cbc:ID[@schemeID]" shadowed by preceding rule + + cac:PartyIdentification/cbc:ID[@schemeID] + + + + + + + + + + + + + + cac:PartyIdentification/cbc:ID[@schemeID] + + + + + + + + ((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244 0245 0246 0247 0248 ', concat(' ', normalize-space(@schemeID), ' ')))) or ((not(contains(normalize-space(@schemeID), ' ')) and contains(' SEPA ', concat(' ', normalize-space(@schemeID), ' '))) and ((ancestor::cac:AccountingSupplierParty) or (ancestor::cac:PayeeParty))) + [BR-CL-10]-Any identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PartyLegalEntity/cbc:CompanyID[@schemeID]" shadowed by preceding rule + + cac:PartyLegalEntity/cbc:CompanyID[@schemeID] + + + + + + + + + + + + + + cac:PartyLegalEntity/cbc:CompanyID[@schemeID] + + + + + + + + ((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244 0245 0246 0247 0248 ', concat(' ', normalize-space(@schemeID), ' ')))) + [BR-CL-11]-Any registration identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:CommodityClassification/cbc:ItemClassificationCode[@listID]" shadowed by preceding rule + + cac:CommodityClassification/cbc:ItemClassificationCode[@listID] + + + + + + + + + + + + + + cac:CommodityClassification/cbc:ItemClassificationCode[@listID] + + + + + + + + ((not(contains(normalize-space(@listID), ' ')) and contains(' AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CC CG CL CR CV DR DW EC EF EMD EN FS GB GN GMN GS HS IB IN IS IT IZ MA MF MN MP NB ON PD PL PO PPI PV QS RC RN RU RY SA SG SK SN SRS SRT SRU SRV SRW SRX SRY SRZ SS SSA SSB SSC SSD SSE SSF SSG SSH SSI SSJ SSK SSL SSM SSN SSO SSP SSQ SSR SSS SST SSU SSV SSW SSX SSY SSZ ST STA STB STC STD STE STF STG STH STI STJ STK STL STM STN STO STP STQ STR STS STT STU STV STW STX STY STZ SUA SUB SUC SUD SUE SUF SUG SUH SUI SUJ SUK SUL SUM TG TSN TSO TSP TSQ TSR TSS TST TSU UA UP VN VP VS VX ZZZ ', concat(' ', normalize-space(@listID), ' ')))) + [BR-CL-13]-Item classification identifier identification scheme identifier MUST be + coded using one of the UNTDID 7143 list. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Country/cbc:IdentificationCode" shadowed by preceding rule + + cac:Country/cbc:IdentificationCode + + + + + + + + + + + + + + cac:Country/cbc:IdentificationCode + + + + + + + + ((not(contains(normalize-space(.), ' ')) and contains(' 1A AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS XI YE YT ZA ZM ZW ', concat(' ', normalize-space(.), ' ')))) + [BR-CL-14]-Country codes in an invoice MUST be coded using ISO code list 3166-1 + + + + + + + + + + + + + + + WARNING: Rule for context "cac:OriginCountry/cbc:IdentificationCode" shadowed by preceding rule + + cac:OriginCountry/cbc:IdentificationCode + + + + + + + + + + + + + + cac:OriginCountry/cbc:IdentificationCode + + + + + + + + ((not(contains(normalize-space(.), ' ')) and contains(' 1A AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS XI YE YT ZA ZM ZW ', concat(' ', normalize-space(.), ' ')))) + [BR-CL-15]-Country codes in an invoice MUST be coded using ISO code list 3166-1 + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PaymentMeans/cbc:PaymentMeansCode" shadowed by preceding rule + + cac:PaymentMeans/cbc:PaymentMeansCode + + + + + + + + + + + + + + cac:PaymentMeans/cbc:PaymentMeansCode + + + + + + + + ( ( not(contains(normalize-space(.),' ')) and contains( ' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 74 75 76 77 78 91 92 93 94 95 96 97 98 ZZZ ',concat(' ',normalize-space(.),' ') ) ) ) + [BR-CL-16]-Payment means in an invoice MUST be coded using UNCL4461 code list + + + + + + + + + + + + + + + WARNING: Rule for context "cac:TaxCategory/cbc:ID" shadowed by preceding rule + + cac:TaxCategory/cbc:ID + + + + + + + + + + + + + + cac:TaxCategory/cbc:ID + + + + + + + + ( ( not(contains(normalize-space(.),' ')) and contains( ' AE L M E S Z G O K B ',concat(' ',normalize-space(.),' ') ) ) ) + [BR-CL-17]-Invoice tax categories MUST be coded using UNCL5305 code list + + + + + + + + + + + + + + + WARNING: Rule for context "cac:ClassifiedTaxCategory/cbc:ID" shadowed by preceding rule + + cac:ClassifiedTaxCategory/cbc:ID + + + + + + + + + + + + + + cac:ClassifiedTaxCategory/cbc:ID + + + + + + + + ( ( not(contains(normalize-space(.),' ')) and contains( ' AE L M E S Z G O K B ',concat(' ',normalize-space(.),' ') ) ) ) + [BR-CL-18]-Invoice tax categories MUST be coded using UNCL5305 code list + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:AllowanceChargeReasonCode" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:AllowanceChargeReasonCode + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:AllowanceChargeReasonCode + + + + + + + + ((not(contains(normalize-space(.), ' ')) and contains(' 41 42 60 62 63 64 65 66 67 68 70 71 88 95 100 102 103 104 105 ', concat(' ', normalize-space(.), ' ')))) + [BR-CL-19]-Coded allowance reasons MUST belong to the UNCL 5189 code list + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:AllowanceChargeReasonCode" shadowed by preceding rule + + cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:AllowanceChargeReasonCode + + + + + + + + + + + + + + cac:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:AllowanceChargeReasonCode + + + + + + + + ((not(contains(normalize-space(.), ' ')) and contains(' AA AAA AAC AAD AAE AAF AAH AAI AAS AAT AAV AAY AAZ ABA ABB ABC ABD ABF ABK ABL ABN ABR ABS ABT ABU ACF ACG ACH ACI ACJ ACK ACL ACM ACS ADC ADE ADJ ADK ADL ADM ADN ADO ADP ADQ ADR ADT ADW ADY ADZ AEA AEB AEC AED AEF AEH AEI AEJ AEK AEL AEM AEN AEO AEP AES AET AEU AEV AEW AEX AEY AEZ AJ AU CA CAB CAD CAE CAF CAI CAJ CAK CAL CAM CAN CAO CAP CAQ CAR CAS CAT CAU CAV CAW CAX CAY CAZ CD CG CS CT DAB DAD DAC DAF DAG DAH DAI DAJ DAK DAL DAM DAN DAO DAP DAQ DL EG EP ER FAA FAB FAC FC FH FI GAA HAA HD HH IAA IAB ID IF IR IS KO L1 LA LAA LAB LF MAE MI ML NAA OA PA PAA PC PL PRV RAB RAC RAD RAF RE RF RH RV SA SAA SAD SAE SAI SG SH SM SU TAB TAC TT TV V1 V2 WH XAA YY ZZZ ', concat(' ', normalize-space(.), ' ')))) + [BR-CL-20]-Coded charge reasons MUST belong to the UNCL 7161 code list + + + + + + + + + + + + + + + WARNING: Rule for context "cac:StandardItemIdentification/cbc:ID[@schemeID]" shadowed by preceding rule + + cac:StandardItemIdentification/cbc:ID[@schemeID] + + + + + + + + + + + + + + cac:StandardItemIdentification/cbc:ID[@schemeID] + + + + + + + + ((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244 0245 0246 0247 0248 ', concat(' ', normalize-space(@schemeID), ' ')))) + [BR-CL-21]-Item standard identifier scheme identifier MUST belong to the ISO 6523 ICD code list + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:TaxExemptionReasonCode" shadowed by preceding rule + + cbc:TaxExemptionReasonCode + + + + + + + + + + + + + + cbc:TaxExemptionReasonCode + + + + + + + + ((not(contains(normalize-space(.), ' ')) and contains(' VATEX-EU-79-C VATEX-EU-132 VATEX-EU-132-1A VATEX-EU-132-1B VATEX-EU-132-1C VATEX-EU-132-1D VATEX-EU-132-1E VATEX-EU-132-1F VATEX-EU-132-1G VATEX-EU-132-1H VATEX-EU-132-1I VATEX-EU-132-1J VATEX-EU-132-1K VATEX-EU-132-1L VATEX-EU-132-1M VATEX-EU-132-1N VATEX-EU-132-1O VATEX-EU-132-1P VATEX-EU-132-1Q VATEX-EU-135-1 VATEX-EU-143 VATEX-EU-143-1A VATEX-EU-143-1B VATEX-EU-143-1C VATEX-EU-143-1D VATEX-EU-143-1E VATEX-EU-143-1F VATEX-EU-143-1FA VATEX-EU-143-1G VATEX-EU-143-1H VATEX-EU-143-1I VATEX-EU-143-1J VATEX-EU-143-1K VATEX-EU-143-1L VATEX-EU-144 VATEX-EU-146-1E VATEX-EU-159 VATEX-EU-309 VATEX-EU-148 VATEX-EU-148-A VATEX-EU-148-B VATEX-EU-148-C VATEX-EU-148-D VATEX-EU-148-E VATEX-EU-148-F VATEX-EU-148-G VATEX-EU-151 VATEX-EU-151-1A VATEX-EU-151-1AA VATEX-EU-151-1B VATEX-EU-151-1C VATEX-EU-151-1D VATEX-EU-151-1E VATEX-EU-G VATEX-EU-O VATEX-EU-IC VATEX-EU-AE VATEX-EU-D VATEX-EU-F VATEX-EU-I VATEX-EU-J VATEX-FR-FRANCHISE VATEX-FR-CNWVAT VATEX-EU-153 VATEX-FR-CGI261-1 VATEX-FR-CGI261-2 VATEX-FR-CGI261-3 VATEX-FR-CGI261-4 VATEX-FR-CGI261-5 VATEX-FR-CGI261-7 VATEX-FR-CGI261-8 VATEX-FR-CGI261A VATEX-FR-CGI261B VATEX-FR-CGI261C-1 VATEX-FR-CGI261C-2 VATEX-FR-CGI261C-3 VATEX-FR-CGI261D-1 VATEX-FR-CGI261D-1BIS VATEX-FR-CGI261D-2 VATEX-FR-CGI261D-3 VATEX-FR-CGI261D-4 VATEX-FR-CGI261E-1 VATEX-FR-CGI261E-2 VATEX-FR-CGI277A VATEX-FR-CGI275 VATEX-FR-298SEXDECIESA VATEX-FR-CGI295 VATEX-FR-AE ', concat(' ', normalize-space(upper-case(.)), ' ')))) + [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:InvoicedQuantity[@unitCode] | cbc:BaseQuantity[@unitCode] | cbc:CreditedQuantity[@unitCode]" shadowed by preceding rule + + cbc:InvoicedQuantity[@unitCode] | cbc:BaseQuantity[@unitCode] | cbc:CreditedQuantity[@unitCode] + + + + + + + + + + + + + + cbc:InvoicedQuantity[@unitCode] | cbc:BaseQuantity[@unitCode] | cbc:CreditedQuantity[@unitCode] + + + + + + + + ((not(contains(normalize-space(@unitCode), ' ')) and contains(' 10 11 13 14 15 20 21 22 23 24 25 27 28 33 34 35 37 38 40 41 56 57 58 59 60 61 74 77 80 81 85 87 89 91 1I 2A 2B 2C 2G 2H 2I 2J 2K 2L 2M 2N 2P 2Q 2R 2U 2X 2Y 2Z 3B 3C 4C 4G 4H 4K 4L 4M 4N 4O 4P 4Q 4R 4T 4U 4W 4X 5A 5B 5E 5J A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A2 A20 A21 A22 A23 A24 A26 A27 A28 A29 A3 A30 A31 A32 A33 A34 A35 A36 A37 A38 A39 A4 A40 A41 A42 A43 A44 A45 A47 A48 A49 A5 A53 A54 A55 A56 A59 A6 A68 A69 A7 A70 A71 A73 A74 A75 A76 A8 A84 A85 A86 A87 A88 A89 A9 A90 A91 A93 A94 A95 A96 A97 A98 A99 AA AB ACR ACT AD AE AH AI AK AL AMH AMP ANN APZ AQ AS ASM ASU ATM AWG AY AZ B1 B10 B11 B12 B13 B14 B15 B16 B17 B18 B19 B20 B21 B22 B23 B24 B25 B26 B27 B28 B29 B3 B30 B31 B32 B33 B34 B35 B4 B41 B42 B43 B44 B45 B46 B47 B48 B49 B50 B52 B53 B54 B55 B56 B57 B58 B59 B60 B61 B62 B63 B64 B66 B67 B68 B69 B7 B70 B71 B72 B73 B74 B75 B76 B77 B78 B79 B8 B80 B81 B82 B83 B84 B85 B86 B87 B88 B89 B90 B91 B92 B93 B94 B95 B96 B97 B98 B99 BAR BB BFT BHP BIL BLD BLL BP BPM BQL BTU BUA BUI C0 C10 C11 C12 C13 C14 C15 C16 C17 C18 C19 C20 C21 C22 C23 C24 C25 C26 C27 C28 C29 C3 C30 C31 C32 C33 C34 C35 C36 C37 C38 C39 C40 C41 C42 C43 C44 C45 C46 C47 C48 C49 C50 C51 C52 C53 C54 C55 C56 C57 C58 C59 C60 C61 C62 C63 C64 C65 C66 C67 C68 C69 C7 C70 C71 C72 C73 C74 C75 C76 C78 C79 C8 C80 C81 C82 C83 C84 C85 C86 C87 C88 C89 C9 C90 C91 C92 C93 C94 C95 C96 C97 C99 CCT CDL CEL CEN CG CGM CKG CLF CLT CMK CMQ CMT CNP CNT COU CTG CTM CTN CUR CWA CWI D03 D04 D1 D10 D11 D12 D13 D15 D16 D17 D18 D19 D2 D20 D21 D22 D23 D24 D25 D26 D27 D29 D30 D31 D32 D33 D34 D36 D41 D42 D43 D44 D45 D46 D47 D48 D49 D5 D50 D51 D52 D53 D54 D55 D56 D57 D58 D59 D6 D60 D61 D62 D63 D65 D68 D69 D73 D74 D77 D78 D80 D81 D82 D83 D85 D86 D87 D88 D89 D91 D93 D94 D95 DAA DAD DAY DB DBM DBW DD DEC DG DJ DLT DMA DMK DMO DMQ DMT DN DPC DPR DPT DRA DRI DRL DT DTN DWT DZN DZP E01 E07 E08 E09 E10 E12 E14 E15 E16 E17 E18 E19 E20 E21 E22 E23 E25 E27 E28 E30 E31 E32 E33 E34 E35 E36 E37 E38 E39 E4 E40 E41 E42 E43 E44 E45 E46 E47 E48 E49 E50 E51 E52 E53 E54 E55 E56 E57 E58 E59 E60 E61 E62 E63 E64 E65 E66 E67 E68 E69 E70 E71 E72 E73 E74 E75 E76 E77 E78 E79 E80 E81 E82 E83 E84 E85 E86 E87 E88 E89 E90 E91 E92 E93 E94 E95 E96 E97 E98 E99 EA EB EQ F01 F02 F03 F04 F05 F06 F07 F08 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F20 F21 F22 F23 F24 F25 F26 F27 F28 F29 F30 F31 F32 F33 F34 F35 F36 F37 F38 F39 F40 F41 F42 F43 F44 F45 F46 F47 F48 F49 F50 F51 F52 F53 F54 F55 F56 F57 F58 F59 F60 F61 F62 F63 F64 F65 F66 F67 F68 F69 F70 F71 F72 F73 F74 F75 F76 F77 F78 F79 F80 F81 F82 F83 F84 F85 F86 F87 F88 F89 F90 F91 F92 F93 F94 F95 F96 F97 F98 F99 FAH FAR FBM FC FF FH FIT FL FNU FOT FP FR FS FTK FTQ G01 G04 G05 G06 G08 G09 G10 G11 G12 G13 G14 G15 G16 G17 G18 G19 G2 G20 G21 G23 G24 G25 G26 G27 G28 G29 G3 G30 G31 G32 G33 G34 G35 G36 G37 G38 G39 G40 G41 G42 G43 G44 G45 G46 G47 G48 G49 G50 G51 G52 G53 G54 G55 G56 G57 G58 G59 G60 G61 G62 G63 G64 G65 G66 G67 G68 G69 G70 G71 G72 G73 G74 G75 G76 G77 G78 G79 G80 G81 G82 G83 G84 G85 G86 G87 G88 G89 G90 G91 G92 G93 G94 G95 G96 G97 G98 G99 GB GBQ GDW GE GF GFI GGR GIA GIC GII GIP GJ GL GLD GLI GLL GM GO GP GQ GRM GRN GRO GV GWH H03 H04 H05 H06 H07 H08 H09 H10 H11 H12 H13 H14 H15 H16 H18 H19 H20 H21 H22 H23 H24 H25 H26 H27 H28 H29 H30 H31 H32 H33 H34 H35 H36 H37 H38 H39 H40 H41 H42 H43 H44 H45 H46 H47 H48 H49 H50 H51 H52 H53 H54 H55 H56 H57 H58 H59 H60 H61 H62 H63 H64 H65 H66 H67 H68 H69 H70 H71 H72 H73 H74 H75 H76 H77 H79 H80 H81 H82 H83 H84 H85 H87 H88 H89 H90 H91 H92 H93 H94 H95 H96 H98 H99 HA HAD HBA HBX HC HDW HEA HGM HH HIU HKM HLT HM HMO HMQ HMT HPA HTZ HUR HWE IA IE INH INK INQ ISD IU IUG IV J10 J12 J13 J14 J15 J16 J17 J18 J19 J2 J20 J21 J22 J23 J24 J25 J26 J27 J28 J29 J30 J31 J32 J33 J34 J35 J36 J38 J39 J40 J41 J42 J43 J44 J45 J46 J47 J48 J49 J50 J51 J52 J53 J54 J55 J56 J57 J58 J59 J60 J61 J62 J63 J64 J65 J66 J67 J68 J69 J70 J71 J72 J73 J74 J75 J76 J78 J79 J81 J82 J83 J84 J85 J87 J90 J91 J92 J93 J95 J96 J97 J98 J99 JE JK JM JNT JOU JPS JWL K1 K10 K11 K12 K13 K14 K15 K16 K17 K18 K19 K2 K20 K21 K22 K23 K26 K27 K28 K3 K30 K31 K32 K33 K34 K35 K36 K37 K38 K39 K40 K41 K42 K43 K45 K46 K47 K48 K49 K50 K51 K52 K53 K54 K55 K58 K59 K6 K60 K61 K62 K63 K64 K65 K66 K67 K68 K69 K70 K71 K73 K74 K75 K76 K77 K78 K79 K80 K81 K82 K83 K84 K85 K86 K87 K88 K89 K90 K91 K92 K93 K94 K95 K96 K97 K98 K99 KA KAT KB KBA KCC KDW KEL KGM KGS KHY KHZ KI KIC KIP KJ KJO KL KLK KLX KMA KMH KMK KMQ KMT KNI KNM KNS KNT KO KPA KPH KPO KPP KR KSD KSH KT KTN KUR KVA KVR KVT KW KWH KWN KWO KWS KWT KWY KX L10 L11 L12 L13 L14 L15 L16 L17 L18 L19 L2 L20 L21 L23 L24 L25 L26 L27 L28 L29 L30 L31 L32 L33 L34 L35 L36 L37 L38 L39 L40 L41 L42 L43 L44 L45 L46 L47 L48 L49 L50 L51 L52 L53 L54 L55 L56 L57 L58 L59 L60 L63 L64 L65 L66 L67 L68 L69 L70 L71 L72 L73 L74 L75 L76 L77 L78 L79 L80 L81 L82 L83 L84 L85 L86 L87 L88 L89 L90 L91 L92 L93 L94 L95 L96 L98 L99 LA LAC LBR LBT LD LEF LF LH LK LM LN LO LP LPA LR LS LTN LTR LUB LUM LUX LY M1 M10 M11 M12 M13 M14 M15 M16 M17 M18 M19 M20 M21 M22 M23 M24 M25 M26 M27 M29 M30 M31 M32 M33 M34 M35 M36 M37 M38 M39 M4 M40 M41 M42 M43 M44 M45 M46 M47 M48 M49 M5 M50 M51 M52 M53 M55 M56 M57 M58 M59 M60 M61 M62 M63 M64 M65 M66 M67 M68 M69 M7 M70 M71 M72 M73 M74 M75 M76 M77 M78 M79 M80 M81 M82 M83 M84 M85 M86 M87 M88 M89 M9 M90 M91 M92 M93 M94 M95 M96 M97 M98 M99 MAH MAL MAM MAR MAW MBE MBF MBR MC MCU MD MGM MHZ MIK MIL MIN MIO MIU MKD MKM MKW MLD MLT MMK MMQ MMT MND MNJ MON MPA MQD MQH MQM MQS MQW MRD MRM MRW MSK MTK MTQ MTR MTS MTZ MVA MWH N1 N10 N11 N12 N13 N14 N15 N16 N17 N18 N19 N20 N21 N22 N23 N24 N25 N26 N27 N28 N29 N3 N30 N31 N32 N33 N34 N35 N36 N37 N38 N39 N40 N41 N42 N43 N44 N45 N46 N47 N48 N49 N50 N51 N52 N53 N54 N55 N56 N57 N58 N59 N60 N61 N62 N63 N64 N65 N66 N67 N68 N69 N70 N71 N72 N73 N74 N75 N76 N77 N78 N79 N80 N81 N82 N83 N84 N85 N86 N87 N88 N89 N90 N91 N92 N93 N94 N95 N96 N97 N98 N99 NA NAR NCL NEW NF NIL NIU NL NM3 NMI NMP NPT NT NTU NU NX OA ODE ODG ODK ODM OHM ON ONZ OPM OT OZA OZI P1 P10 P11 P12 P13 P14 P15 P16 P17 P18 P19 P2 P20 P21 P22 P23 P24 P25 P26 P27 P28 P29 P30 P31 P32 P33 P34 P35 P36 P37 P38 P39 P40 P41 P42 P43 P44 P45 P46 P47 P48 P49 P5 P50 P51 P52 P53 P54 P55 P56 P57 P58 P59 P60 P61 P62 P63 P64 P65 P66 P67 P68 P69 P70 P71 P72 P73 P74 P75 P76 P77 P78 P79 P80 P81 P82 P83 P84 P85 P86 P87 P88 P89 P90 P91 P92 P93 P94 P95 P96 P97 P98 P99 PAL PD PFL PGL PI PLA PO PQ PR PS PTD PTI PTL PTN Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 Q19 Q20 Q21 Q22 Q23 Q24 Q25 Q26 Q27 Q28 Q29 Q3 Q30 Q31 Q32 Q33 Q34 Q35 Q36 Q37 Q38 Q39 Q40 Q41 Q42 QA QAN QB QR QTD QTI QTL QTR R1 R9 RH RM ROM RP RPM RPS RT S3 S4 SAN SCO SCR SEC SET SG SIE SM3 SMI SQ SQR SR STC STI STK STL STN STW SW SX SYR T0 T3 TAH TAN TI TIC TIP TKM TMS TNE TP TPI TPR TQD TRL TST TTS U1 U2 UB UC VA VLT VP W2 WA WB WCD WE WEB WEE WG WHR WM WSD WTT X1 YDK YDQ YRD Z11 Z9 ZP ZZ X1A X1B X1D X1F X1G X1W X2C X3A X3H X43 X44 X4A X4B X4C X4D X4F X4G X4H X5H X5L X5M X6H X6P X7A X7B X8A X8B X8C XAA XAB XAC XAD XAE XAF XAG XAH XAI XAJ XAL XAM XAP XAT XAV XB4 XBA XBB XBC XBD XBE XBF XBG XBH XBI XBJ XBK XBL XBM XBN XBO XBP XBQ XBR XBS XBT XBU XBV XBW XBX XBY XBZ XCA XCB XCC XCD XCE XCF XCG XCH XCI XCJ XCK XCL XCM XCN XCO XCP XCQ XCR XCS XCT XCU XCV XCW XCX XCY XCZ XDA XDB XDC XDG XDH XDI XDJ XDK XDL XDM XDN XDP XDR XDS XDT XDU XDV XDW XDX XDY XEC XED XEE XEF XEG XEH XEI XEN XFB XFC XFD XFE XFI XFL XFO XFP XFR XFT XFW XFX XGB XGI XGL XGR XGU XGY XGZ XHA XHB XHC XHG XHN XHR XIA XIB XIC XID XIE XIF XIG XIH XIK XIL XIN XIZ XJB XJC XJG XJR XJT XJY XKG XKI XLE XLG XLT XLU XLV XLZ XMA XMB XMC XME XMR XMS XMT XMW XMX XNA XNE XNF XNG XNS XNT XNU XNV XO1 XO2 XO3 XO4 XO5 XO6 XO7 XO8 XO9 XOA XOB XOC XOD XOE XOF XOG XOH XOI XOJ XOK XOL XOM XON XOP XOQ XOR XOS XOT XOU XOV XOW XOX XOY XOZ XP1 XP2 XP3 XP4 XPA XPB XPC XPD XPE XPF XPG XPH XPI XPJ XPK XPL XPN XPO XPP XPR XPT XPU XPV XPX XPY XPZ XQA XQB XQC XQD XQF XQG XQH XQJ XQK XQL XQM XQN XQP XQQ XQR XQS XRD XRG XRJ XRK XRL XRO XRT XRZ XSA XSB XSC XSD XSE XSH XSI XSK XSL XSM XSO XSP XSS XST XSU XSV XSW XSX XSY XSZ XT1 XTB XTC XTD XTE XTG XTI XTK XTL XTN XTO XTR XTS XTT XTU XTV XTW XTY XTZ XUC XUN XVA XVG XVI XVK XVL XVN XVO XVP XVQ XVR XVS XVY XWA XWB XWC XWD XWF XWG XWH XWJ XWK XWL XWM XWN XWP XWQ XWR XWS XWT XWU XWV XWW XWX XWY XWZ XXA XXB XXC XXD XXF XXG XXH XXJ XXK XYA XYB XYC XYD XYF XYG XYH XYJ XYK XYL XYM XYN XYP XYQ XYR XYS XYT XYV XYW XYX XYY XYZ XZA XZB XZC XZD XZF XZG XZH XZJ XZK XZL XZM XZN XZP XZQ XZR XZS XZT XZU XZV XZW XZX XZY XZZ ', concat(' ', normalize-space(@unitCode), ' ')))) + [BR-CL-23]-Unit code MUST be coded according to the UN/ECE Recommendation 20 with + Rec 21 extension + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:EmbeddedDocumentBinaryObject[@mimeCode]" shadowed by preceding rule + + cbc:EmbeddedDocumentBinaryObject[@mimeCode] + + + + + + + + + + + + + + cbc:EmbeddedDocumentBinaryObject[@mimeCode] + + + + + + + + ((@mimeCode = 'application/pdf' or @mimeCode = 'image/png' or @mimeCode = 'image/jpeg' or @mimeCode = 'text/csv' or @mimeCode = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' or @mimeCode = 'application/vnd.oasis.opendocument.spreadsheet')) + [BR-CL-24]-For Mime code in attribute use MIMEMediaType. + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:EndpointID[@schemeID]" shadowed by preceding rule + + cbc:EndpointID[@schemeID] + + + + + + + + + + + + + + cbc:EndpointID[@schemeID] + + + + + + + + ((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0154 0158 0170 0177 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 0235 0240 0244 0242 0245 0246 0248 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' ')))) + [BR-CL-25]-Endpoint identifier scheme identifier MUST belong to the CEF EAS code list + + + + + + + + + + + + + + + WARNING: Rule for context "cac:DeliveryLocation/cbc:ID[@schemeID]" shadowed by preceding rule + + cac:DeliveryLocation/cbc:ID[@schemeID] + + + + + + + + + + + + + + cac:DeliveryLocation/cbc:ID[@schemeID] + + + + + + + + ((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244 0245 0246 0247 0248 ', concat(' ', normalize-space(@schemeID), ' ')))) + [BR-CL-26]-Delivery location identifier scheme identifier MUST belong to the ISO 6523 ICD code list + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/KoSIT-LICENSE.txt b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/KoSIT-LICENSE.txt new file mode 100644 index 0000000..de6f9fe --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/KoSIT-LICENSE.txt @@ -0,0 +1,208 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +----- +Der Standard XRechnung steht unter dem Lizenzabkommen (englischsprachige Originalquelle: https://ec.europa.eu/cefdigital/wiki/display/CEFDIGITAL/Obtaining+a+copy+of+the+European+standard+on+eInvoicing) der Europäischen Kommission (EK) und dem Europäischen Komitee für Normung (CEN): + +Der europäische Standard zur elektronischen Rechnungsstellung (EN 16931) wird vom CEN durch Beauftragung der EK entwickelt und veröffentlicht. Die Urheberrechte am Standard liegen beim CEN, Kopien des Standards werden über die nationalen Standardisierungsorganisationen vertrieben. +Das Abkommen zwischen EK und CEN besagt, dass im Rahmen der geistigen Eigentumsrechte (IPR) am Standard das semantische Datenmodell der Kernelemente einer elektronischen Rechnung (EN 16931-1:2017) und den zwei mandatorischen Syntaxen (CEN/TS 16931-2:2017) unentgeltlich über das Deutsche Institut für Normung (DIN) in ihrer Rolle als nationale Standardisierungsorganisation zu beziehen sind. +Der Standard XRechnung ist eine Implementierung dieses Datenmodelles und der zwei mandatorischen Syntaxen und die Vervielfältigung ist durch die Genehmigung von CEN und DIN als Urheberrechtsträger gestattet. +CEN und DIN übernehmen keine Garantie für den Inhalt und die Implementierung dieser Derivate und im Zweifelsfalle ist immer auf die offiziell autorisierten Dokumente des semantischen Datenmodells und der zwei mandatorischen Syntaxen zurückzugreifen, welche durch das DIN zur Verfügung gestellt werden. diff --git a/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/KoSIT-NOTICE.txt b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/KoSIT-NOTICE.txt new file mode 100644 index 0000000..88333ac --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/KoSIT-NOTICE.txt @@ -0,0 +1,5 @@ +KoSIT XML-Validator Configuration for XRechnung +Copyright 2020 Koordinierungsstelle für IT-Standards + +This product includes software developed by +Coordination Office for IT-Standards (http://www.xoev.de/). diff --git a/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/PROVENANCE.txt b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/PROVENANCE.txt new file mode 100644 index 0000000..9b5bc71 --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/PROVENANCE.txt @@ -0,0 +1,42 @@ +Official unmodified XRechnung UBL validation stylesheets +====================================================== + +Release: https://github.com/itplr-kosit/validator-configuration-xrechnung/releases/tag/v2026-08-31 +Archive: xrechnung-3.0.2-validator-configuration-2026-08-31.zip +Archive SHA-256: 2530CD107C414511C5D0462EC10F886910395ABFCA820DB82E83D70BF01221A8 +The distribution scenarios.xml records its build date as 2026-09-02. + +EN16931-UBL-validation.xsl: + Archive path: resources/ubl/2.1/xsl/EN16931-UBL-validation.xsl + CEN rule version: 1.3.16 + SHA-256: 759F2D2E830C7FD1D5A6E8B4F61E5DBAFC7A7805862C4AE1C749EEAC6ADDE698 + Source: https://github.com/ConnectingEurope/eInvoicing-EN16931/tree/validation-1.3.16 + License: EUPL 1.2; see EN16931-LICENSE.txt. + +XRechnung-UBL-validation.xsl: + Archive path: resources/xrechnung/3.0.2/xsl/XRechnung-UBL-validation.xsl + Rule version: 2.6.0; XRechnung specification: 3.0.2 + SHA-256: E32D831668FACBBD5136CC0119BF1DD6F92AC20738AA3B3F021586F5A305C738 + Source: https://projekte.kosit.org/xrechnung/xrechnung-schematron/ + License: Apache 2.0; see XRechnung-LICENSE.txt. + +Configuration license and attribution: KoSIT-LICENSE.txt, KoSIT-NOTICE.txt. +The generated files retain SchXslt creator metadata unchanged. +The stylesheets are embedded and also included as source in the NuGet package. +No runtime Schematron compilation, download, or rule rewriting is performed. + +The standard UBL Invoice scenario supplies these overrides: + BR-CL-21: warning + BR-CL-23: warning + UBL-CR-646: error + +Engine: The Saxon XSLT and XQuery Processor from Saxonica Limited +https://www.saxonica.com/ +SaxonCS-HE 13.0.0 is supplied via an unmodified NuGet dependency. +The specific Saxon 13 licensing documentation explicitly describes SaxonCS-HE +as an executable form under MPL 2.0 and permits redistribution with notices: +https://www.saxonica.com/html/documentation13/conditions/index.html +See Saxon-MPL-2.0.txt. The NuGet package contains a generic proprietary +SaxonCS LICENSE.txt; use the product-specific HE licensing section above to +distinguish it from commercial SaxonCS-EE. No license key was used in either +the desktop or published browser tests. diff --git a/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/Saxon-MPL-2.0.txt b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/Saxon-MPL-2.0.txt new file mode 100644 index 0000000..14e2f77 --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/Saxon-MPL-2.0.txt @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/Saxon-NOTICE.txt b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/Saxon-NOTICE.txt new file mode 100644 index 0000000..445ba03 --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/Saxon-NOTICE.txt @@ -0,0 +1,19 @@ +The Saxon XSLT and XQuery Processor from Saxonica Limited +https://www.saxonica.com/ + +This library requires unmodified SaxonCS-HE 13.0.0 through NuGet. +SaxonCS-HE is made available as an executable form under Mozilla Public License +2.0. See Saxon-MPL-2.0.txt and the product-specific licensing documentation: +https://www.saxonica.com/html/documentation13/conditions/index.html + +Original source made available by Saxonica: +https://github.com/Saxonica/Saxon-HE +https://saxonica.plan.io/projects/saxonmirrorhe/repository + +Saxonica's third-party contributions and licensing notices are documented at: +https://www.saxonica.com/html/documentation13/conditions/contributors.html +https://www.saxonica.com/html/documentation13/conditions/third-party-components.html +https://www.saxonica.com/html/documentation13/conditions/redistributed.html + +No Saxon executable or source code is modified by this project. +Each additional NuGet dependency retains its own license and notices. diff --git a/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/XRechnung-LICENSE.txt b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/XRechnung-LICENSE.txt new file mode 100644 index 0000000..cebbc1f --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/XRechnung-LICENSE.txt @@ -0,0 +1,209 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--------- +Der Standard XRechnung steht unter dem Lizenzabkommen (englischsprachige Originalquelle: https://ec.europa.eu/cefdigital/wiki/display/CEFDIGITAL/Obtaining+a+copy+of+the+European+standard+on+eInvoicing) der Europäischen Kommission (EK) und dem Europäischen Komitee für Normung (CEN): + +Der europäische Standard zur elektronischen Rechnungsstellung (EN 16931) wird vom CEN durch Beauftragung der EK entwickelt und veröffentlicht. Die Urheberrechte am Standard liegen beim CEN, Kopien des Standards werden über die nationalen Standardisierungsorganisationen vertrieben. +Das Abkommen zwischen EK und CEN besagt, dass im Rahmen der geistigen Eigentumsrechte (IPR) am Standard das semantische Datenmodell der Kernelemente einer elektronischen Rechnung (EN 16931-1:2017) und den zwei mandatorischen Syntaxen (CEN/TS 16931-2:2017) unentgeltlich über das Deutsche Institut für Normung (DIN) in ihrer Rolle als nationale Standardisierungsorganisation zu beziehen sind. +Der Standard XRechnung ist eine Implementierung dieses Datenmodelles und der zwei mandatorischen Syntaxen und die Vervielfältigung ist durch die Genehmigung von CEN und DIN als Urheberrechtsträger gestattet. +CEN und DIN übernehmen keine Garantie für den Inhalt und die Implementierung dieser Derivate und im Zweifelsfalle ist immer auf die offiziell autorisierten Dokumente des semantischen Datenmodells und der zwei mandatorischen Syntaxen zurückzugreifen, welche durch das DIN zur Verfügung gestellt werden. diff --git a/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/XRechnung-UBL-validation.xsl b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/XRechnung-UBL-validation.xsl new file mode 100644 index 0000000..3a243ce --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Schematrons/XRechnung-2026-08-31/XRechnung-UBL-validation.xsl @@ -0,0 +1,2132 @@ + + + + + SchXslt/1.10.1 SAXON/HE 12.8 + true + + + 2026-09-02T11:31:12.927602434Z + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + + + + + + + + + ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SchXslt/1.10.1 SAXON/HE 12.8 + true + + + 2026-09-02T11:31:12.927602434Z + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WARNING: Rule for context "//*[not(*) and not(normalize-space())]" shadowed by preceding rule + + //*[not(*) and not(normalize-space())] + + + + + + + + + + + + + + //*[not(*) and not(normalize-space())] + + + + + + + + self::cbc:ID[parent::cac:OrderReference] + [PEPPOL-EN16931-R008]-Document MUST not contain empty elements. + + + + + + + + + + + + + + + WARNING: Rule for context "ubl-creditnote:CreditNote | ubl-invoice:Invoice" shadowed by preceding rule + + ubl-creditnote:CreditNote | ubl-invoice:Invoice + + + + + + + + + + + + + + ubl-creditnote:CreditNote | ubl-invoice:Invoice + + + + + + + + cbc:ProfileID + [PEPPOL-EN16931-R001]-Business process MUST be provided. + + + + + count(cac:TaxTotal[cac:TaxSubtotal]) = 1 + [PEPPOL-EN16931-R053]-Only one tax total with tax subtotals MUST be provided. + + + + + count(cac:TaxTotal[not(cac:TaxSubtotal)]) = (if (cbc:TaxCurrencyCode) then 1 else 0) + [PEPPOL-EN16931-R054]-Only one tax total without tax subtotals MUST be provided when tax currency code is provided. + + + + + not(cbc:TaxCurrencyCode) or (cac:TaxTotal/cbc:TaxAmount[@currencyID=normalize-space(../../cbc:TaxCurrencyCode)] <= 0 and cac:TaxTotal/cbc:TaxAmount[@currencyID=normalize-space(../../cbc:DocumentCurrencyCode)] <= 0) or (cac:TaxTotal/cbc:TaxAmount[@currencyID=normalize-space(../../cbc:TaxCurrencyCode)] >= 0 and cac:TaxTotal/cbc:TaxAmount[@currencyID=normalize-space(../../cbc:DocumentCurrencyCode)] >= 0) + [PEPPOL-EN16931-R055]-Invoice total VAT amount and Invoice total VAT amount in accounting currency MUST have the same operational sign + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:TaxCurrencyCode" shadowed by preceding rule + + cbc:TaxCurrencyCode + + + + + + + + + + + + + + cbc:TaxCurrencyCode + + + + + + + + not(normalize-space(text()) = normalize-space(../cbc:DocumentCurrencyCode/text())) + [PEPPOL-EN16931-R005]-VAT accounting currency code MUST be different from invoice currency code when provided. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AccountingCustomerParty/cac:Party" shadowed by preceding rule + + cac:AccountingCustomerParty/cac:Party + + + + + + + + + + + + + + cac:AccountingCustomerParty/cac:Party + + + + + + + + cbc:EndpointID + [PEPPOL-EN16931-R010]-Buyer electronic address MUST be provided + + + + + + + + + + + + + + + WARNING: Rule for context "cac:AccountingSupplierParty/cac:Party" shadowed by preceding rule + + cac:AccountingSupplierParty/cac:Party + + + + + + + + + + + + + + cac:AccountingSupplierParty/cac:Party + + + + + + + + cbc:EndpointID + [PEPPOL-EN16931-R020]-Seller electronic address MUST be provided + + + + + + + + + + + + + + + WARNING: Rule for context "ubl-invoice:Invoice/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] | ubl-invoice:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] | ubl-creditnote:CreditNote/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] | ubl-creditnote:CreditNote/cac:CreditNoteLine/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)]" shadowed by preceding rule + + ubl-invoice:Invoice/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] | ubl-invoice:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] | ubl-creditnote:CreditNote/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] | ubl-creditnote:CreditNote/cac:CreditNoteLine/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] + + + + + + + + + + + + + + ubl-invoice:Invoice/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] | ubl-invoice:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] | ubl-creditnote:CreditNote/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] | ubl-creditnote:CreditNote/cac:CreditNoteLine/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] + + + + + + + + false() + [PEPPOL-EN16931-R041]-Allowance/charge base amount MUST be provided when allowance/charge percentage is provided. + + + + + + + + + + + + + + + WARNING: Rule for context "ubl-invoice:Invoice/cac:AllowanceCharge[not(cbc:MultiplierFactorNumeric) and cbc:BaseAmount] | ubl-invoice:Invoice/cac:InvoiceLine/cac:AllowanceCharge[not(cbc:MultiplierFactorNumeric) and cbc:BaseAmount] | ubl-creditnote:CreditNote/cac:AllowanceCharge[not(cbc:MultiplierFactorNumeric) and cbc:BaseAmount] | ubl-creditnote:CreditNote/cac:CreditNoteLine/cac:AllowanceCharge[not(cbc:MultiplierFactorNumeric) and cbc:BaseAmount]" shadowed by preceding rule + + ubl-invoice:Invoice/cac:AllowanceCharge[not(cbc:MultiplierFactorNumeric) and cbc:BaseAmount] | ubl-invoice:Invoice/cac:InvoiceLine/cac:AllowanceCharge[not(cbc:MultiplierFactorNumeric) and cbc:BaseAmount] | ubl-creditnote:CreditNote/cac:AllowanceCharge[not(cbc:MultiplierFactorNumeric) and cbc:BaseAmount] | ubl-creditnote:CreditNote/cac:CreditNoteLine/cac:AllowanceCharge[not(cbc:MultiplierFactorNumeric) and cbc:BaseAmount] + + + + + + + + + + + + + + ubl-invoice:Invoice/cac:AllowanceCharge[not(cbc:MultiplierFactorNumeric) and cbc:BaseAmount] | ubl-invoice:Invoice/cac:InvoiceLine/cac:AllowanceCharge[not(cbc:MultiplierFactorNumeric) and cbc:BaseAmount] | ubl-creditnote:CreditNote/cac:AllowanceCharge[not(cbc:MultiplierFactorNumeric) and cbc:BaseAmount] | ubl-creditnote:CreditNote/cac:CreditNoteLine/cac:AllowanceCharge[not(cbc:MultiplierFactorNumeric) and cbc:BaseAmount] + + + + + + + + false() + [PEPPOL-EN16931-R042]-Allowance/charge percentage MUST be provided when allowance/charge base amount is provided. + + + + + + + + + + + + + + + WARNING: Rule for context "ubl-invoice:Invoice/cac:AllowanceCharge | ubl-invoice:Invoice/cac:InvoiceLine/cac:AllowanceCharge | ubl-creditnote:CreditNote/cac:AllowanceCharge | ubl-creditnote:CreditNote/cac:CreditNoteLine/cac:AllowanceCharge" shadowed by preceding rule + + ubl-invoice:Invoice/cac:AllowanceCharge | ubl-invoice:Invoice/cac:InvoiceLine/cac:AllowanceCharge | ubl-creditnote:CreditNote/cac:AllowanceCharge | ubl-creditnote:CreditNote/cac:CreditNoteLine/cac:AllowanceCharge + + + + + + + + + + + + + + ubl-invoice:Invoice/cac:AllowanceCharge | ubl-invoice:Invoice/cac:InvoiceLine/cac:AllowanceCharge | ubl-creditnote:CreditNote/cac:AllowanceCharge | ubl-creditnote:CreditNote/cac:CreditNoteLine/cac:AllowanceCharge + + + + + + + + not(cbc:MultiplierFactorNumeric and cbc:BaseAmount) or u:slack(if (cbc:Amount) then cbc:Amount else 0, (xs:decimal(cbc:BaseAmount) * xs:decimal(cbc:MultiplierFactorNumeric)) div 100, $slackValue) + [PEPPOL-EN16931-R040]-Allowance/charge amount must equal base amount * percentage/100 if base amount and percentage exists + + + + + normalize-space(cbc:ChargeIndicator/text()) = 'true' or normalize-space(cbc:ChargeIndicator/text()) = 'false' + [PEPPOL-EN16931-R043]-Allowance/charge ChargeIndicator value MUST equal 'true' or 'false' + + + + + + + + + + + + + + + WARNING: Rule for context " cac:PaymentMeans[some $code in tokenize('49 59', '\s') satisfies normalize-space(cbc:PaymentMeansCode) = $code]" shadowed by preceding rule + + cac:PaymentMeans[some $code in tokenize('49 59', '\s') satisfies normalize-space(cbc:PaymentMeansCode) = $code] + + + + + + + + + + + + + + cac:PaymentMeans[some $code in tokenize('49 59', '\s') satisfies normalize-space(cbc:PaymentMeansCode) = $code] + + + + + + + + cac:PaymentMandate/cbc:ID + [PEPPOL-EN16931-R061]-Mandate reference MUST be provided for direct debit. + + + + + + + + + + + + + + + WARNING: Rule for context "ubl-invoice:Invoice[cac:InvoicePeriod/cbc:StartDate]/cac:InvoiceLine/cac:InvoicePeriod/cbc:StartDate | ubl-creditnote:CreditNote[cac:InvoicePeriod/cbc:StartDate]/cac:CreditNoteLine/cac:InvoicePeriod/cbc:StartDate" shadowed by preceding rule + + ubl-invoice:Invoice[cac:InvoicePeriod/cbc:StartDate]/cac:InvoiceLine/cac:InvoicePeriod/cbc:StartDate | ubl-creditnote:CreditNote[cac:InvoicePeriod/cbc:StartDate]/cac:CreditNoteLine/cac:InvoicePeriod/cbc:StartDate + + + + + + + + + + + + + + ubl-invoice:Invoice[cac:InvoicePeriod/cbc:StartDate]/cac:InvoiceLine/cac:InvoicePeriod/cbc:StartDate | ubl-creditnote:CreditNote[cac:InvoicePeriod/cbc:StartDate]/cac:CreditNoteLine/cac:InvoicePeriod/cbc:StartDate + + + + + + + + xs:date(text()) >= xs:date(../../../cac:InvoicePeriod/cbc:StartDate) + [PEPPOL-EN16931-R110]-Start date of line period MUST be within invoice period. + + + + + + + + + + + + + + + WARNING: Rule for context "ubl-invoice:Invoice[cac:InvoicePeriod/cbc:EndDate]/cac:InvoiceLine/cac:InvoicePeriod/cbc:EndDate | ubl-creditnote:CreditNote[cac:InvoicePeriod/cbc:EndDate]/cac:CreditNoteLine/cac:InvoicePeriod/cbc:EndDate" shadowed by preceding rule + + ubl-invoice:Invoice[cac:InvoicePeriod/cbc:EndDate]/cac:InvoiceLine/cac:InvoicePeriod/cbc:EndDate | ubl-creditnote:CreditNote[cac:InvoicePeriod/cbc:EndDate]/cac:CreditNoteLine/cac:InvoicePeriod/cbc:EndDate + + + + + + + + + + + + + + ubl-invoice:Invoice[cac:InvoicePeriod/cbc:EndDate]/cac:InvoiceLine/cac:InvoicePeriod/cbc:EndDate | ubl-creditnote:CreditNote[cac:InvoicePeriod/cbc:EndDate]/cac:CreditNoteLine/cac:InvoicePeriod/cbc:EndDate + + + + + + + + xs:date(text()) <= xs:date(../../../cac:InvoicePeriod/cbc:EndDate) + [PEPPOL-EN16931-R111]-End date of line period MUST be within invoice period. + + + + + + + + + + + + + + + + + + + + + WARNING: Rule for context "cac:InvoiceLine | cac:CreditNoteLine" shadowed by preceding rule + + cac:InvoiceLine | cac:CreditNoteLine + + + + + + + + + + + + + + cac:InvoiceLine | cac:CreditNoteLine + + + + + + + + u:slack($lineExtensionAmount, ($quantity * ($priceAmount div $baseQuantity)) + $chargesTotal - $allowancesTotal, $slackValue) + [PEPPOL-EN16931-R120]-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 + + + + + not(cac:Price/cbc:BaseQuantity) or xs:decimal(cac:Price/cbc:BaseQuantity) > 0 + [PEPPOL-EN16931-R121]-Base quantity MUST be a positive number above zero. + + + + + (not(cac:DocumentReference) or (cac:DocumentReference/cbc:DocumentTypeCode='130')) + [PEPPOL-EN16931-R101]-Element Document reference can only be used for Invoice line object + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Price/cac:AllowanceCharge" shadowed by preceding rule + + cac:Price/cac:AllowanceCharge + + + + + + + + + + + + + + cac:Price/cac:AllowanceCharge + + + + + + + + normalize-space(cbc:ChargeIndicator) = 'false' + [PEPPOL-EN16931-R044]-Charge on price level is NOT allowed. Only value 'false' allowed. + + + + + not(cbc:BaseAmount) or xs:decimal(../cbc:PriceAmount) = xs:decimal(cbc:BaseAmount) - xs:decimal(cbc:Amount) + [PEPPOL-EN16931-R046]-Item net price MUST equal (Gross price - Allowance amount) when gross price is provided. + + + + + + + + + + + + + + + + + WARNING: Rule for context "cac:Price/cbc:BaseQuantity[@unitCode]" shadowed by preceding rule + + cac:Price/cbc:BaseQuantity[@unitCode] + + + + + + + + + + + + + + cac:Price/cbc:BaseQuantity[@unitCode] + + + + + + + + not($hasQuantity) or @unitCode = $quantity/@unitCode + [PEPPOL-EN16931-R130]-Unit code of price base quantity MUST be same as invoiced quantity. + + + + + + + + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice | /cn:CreditNote" shadowed by preceding rule + + /ubl:Invoice | /cn:CreditNote + + + + + + + + + + + + + + /ubl:Invoice | /cn:CreditNote + + + + + + + + cac:PaymentMeans + [BR-DE-1] Eine Rechnung (INVOICE) muss Angaben zu "PAYMENT INSTRUCTIONS" (BG-16) enthalten. + + + + + cbc:BuyerReference[boolean(normalize-space(.))] + [BR-DE-15] Das Element "Buyer reference" (BT-10) muss übermittelt werden. + + + + + (not( ($BT-95-UBL-Inv = $supportedVATCodes or $BT-95-UBL-CN = $supportedVATCodes) or ($BT-102 = $supportedVATCodes) or ($BT-151 = $supportedVATCodes) ) or (cac:TaxRepresentativeParty, $BT-31orBT-32Path)) + [BR-DE-16] Wenn in einer Rechnung die Steuercodes S, Z, E, AE, K, G, L oder M verwendet werden, muss mindestens eines der Elemente "Seller VAT identifier" (BT-31), "Seller tax registration identifier" (BT-32) + oder "SELLER TAX REPRESENTATIVE PARTY" (BG-11) übermittelt werden. + + + + + normalize-space(cbc:InvoiceTypeCode) = $supportedInvAndCNTypeCodes or normalize-space(cbc:CreditNoteTypeCode) = $supportedInvAndCNTypeCodes + [BR-DE-17] Mit dem Element "Invoice type code" (BT-3) sollen ausschließlich folgende Codes aus der Codeliste UNTDID 1001 übermittelt werden: 326 (Partial invoice), 380 (Commercial invoice), 384 (Corrected invoice), 389 (Self-billed invoice) und 381 (Credit note),875 (Partial construction invoice), 876 (Partial final construction invoice), 877 (Final construction invoice). + + + + + every $line in cac:PaymentTerms/cbc:Note[1]/tokenize(. , '(\r?\n)')[starts-with( normalize-space(.) , '#')] satisfies matches ( normalize-space ($line), $XR-SKONTO-REGEX) and matches( cac:PaymentTerms/cbc:Note[1]/tokenize(. , '#.+#')[last()], '^\s*\n' ) + [BR-DE-18] Skonto Zeilen in müssen diesem regulärem Ausdruck entsprechen: . Die Informationen zur Gewährung von Skonto müssen wie folgt im Element "Payment terms" (BT-20) übermittelt werden: Anzugeben ist im ersten Segment "SKONTO", im zweiten "TAGE=n", im dritten "PROZENT=n". Prozentzahlen sind ohne Vorzeichen sowie mit Punkt getrennt von zwei Nachkommastellen anzugeben. Liegt dem zu berechnenden Betrag nicht BT-115, "fälliger Betrag" zugrunde, sondern nur ein Teil des fälligen Betrags der Rechnung, ist der Grundwert zur Berechnung von Skonto als viertes Segment "BASISBETRAG=n" gemäß dem semantischen Datentypen Amount anzugeben. Jeder Eintrag beginnt mit einer #, die Segmente sind mit einer # getrennt und eine Zeile schließt mit einer # ab. Am Ende einer vollständigen Skontoangabe muss ein XML-konformer Zeilenumbruch folgen. Alle Angaben zur Gewährung von Skonto müssen in Großbuchstaben gemacht werden. Zusätzliches Whitespace (Leerzeichen, Tabulatoren oder Zeilenumbrüche) ist nicht zulässig. Andere Zeichen oder Texte als in den oberen Vorgaben genannt sind nicht zulässig. + + + + + cbc:CustomizationID = $XR-CIUS-ID or cbc:CustomizationID = $XR-EXTENSION-ID or cbc:CustomizationID = $XR-CVD-ID + [BR-DE-21] Das Element "Specification identifier" (BT-24) soll syntaktisch der Kennung des Standards XRechnung entsprechen. + + + + + count(cac:AdditionalDocumentReference) = count(cac:AdditionalDocumentReference[not(./cac:Attachment/cbc:EmbeddedDocumentBinaryObject/@filename = preceding-sibling::cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject/@filename)]) + [BR-DE-22] Das "filename"-Attribut aller "EmbeddedDocumentBinaryObject"-Elemente muss eindeutig sein + + + + + ((not(normalize-space(cbc:InvoiceTypeCode) = '384' or normalize-space(cbc:CreditNoteTypeCode) = '384') or (cac:BillingReference/cac:InvoiceDocumentReference))) + [BR-DE-26] Wenn im Element "Invoice type code" (BT-3) der Code 384 (Corrected invoice) übergeben wird, soll PRECEDING INVOICE REFERENCE BG-3 mind. einmal vorhanden sein. + + + + + not(cac:PaymentMeans/cac:PaymentMandate) or (cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID[@schemeID='SEPA'] | cac:PayeeParty/cac:PartyIdentification/cbc:ID[@schemeID='SEPA']) + [BR-DE-30] Wenn "DIRECT DEBIT" BG-19 vorhanden ist, dann muss "Bank assigned creditor identifier" BT-90 übermittelt werden. + + + + + not(cac:PaymentMeans/cac:PaymentMandate) or (cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID) + [BR-DE-31] Wenn "DIRECT DEBIT" BG-19 vorhanden ist, dann muss "Debited account identifier" BT-91 übermittelt werden. + + + + + cac:Delivery/cbc:ActualDeliveryDate or cac:InvoicePeriod or (every $line in (cac:InvoiceLine | cac:CreditNoteLine) satisfies $line/cac:InvoicePeriod) + + [BR-DE-TMP-32] Eine Rechnung sollte zur Angabe des Liefer-/Leistungsdatums entweder BT-72 "Actual delivery date", BG-14 "Invoicing period" oder in jeder Rechnungsposition BG-26 "Invoice line period" enthalten. + + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference | /cn:CreditNote/cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference" shadowed by preceding rule + + /ubl:Invoice/cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference | /cn:CreditNote/cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference + + + + + + + + + + + + + + /ubl:Invoice/cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference | /cn:CreditNote/cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference + + + + + + + + matches(cbc:URI, $XR-URL-REGEX) + [BR-TMP-2] BT-124 "External document location" muss eine absolute URL mit gültigem Schema enthalten. + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:IssueDate | cbc:DueDate | cbc:StartDate | cbc:EndDate | cbc:ActualDeliveryDate | cbc:IssueDate | cbc:TaxPointDate | cbc:PaymentDueDate" shadowed by preceding rule + + cbc:IssueDate | cbc:DueDate | cbc:StartDate | cbc:EndDate | cbc:ActualDeliveryDate | cbc:IssueDate | cbc:TaxPointDate | cbc:PaymentDueDate + + + + + + + + + + + + + + cbc:IssueDate | cbc:DueDate | cbc:StartDate | cbc:EndDate | cbc:ActualDeliveryDate | cbc:IssueDate | cbc:TaxPointDate | cbc:PaymentDueDate + + + + + + + + matches(normalize-space(text()), '^\d{4}-\d{2}-\d{2}$') + [BR-TMP-6] Datumsangaben in UBL müssen im Format JJJJ-MM-TT (YYYY-MM-DD) übermittelt werden. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:AccountingSupplierParty | /cn:CreditNote/cac:AccountingSupplierParty" shadowed by preceding rule + + /ubl:Invoice/cac:AccountingSupplierParty | /cn:CreditNote/cac:AccountingSupplierParty + + + + + + + + + + + + + + /ubl:Invoice/cac:AccountingSupplierParty | /cn:CreditNote/cac:AccountingSupplierParty + + + + + + + + cac:Party/cac:Contact + [BR-DE-2] Die Gruppe "SELLER CONTACT" (BG-6) muss übermittelt werden. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress | /cn:CreditNote/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress" shadowed by preceding rule + + /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress | /cn:CreditNote/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress + + + + + + + + + + + + + + /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress | /cn:CreditNote/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress + + + + + + + + cbc:CityName[boolean(normalize-space(.))] + [BR-DE-3] Das Element "Seller city" (BT-37) muss übermittelt werden. + + + + + cbc:PostalZone[boolean(normalize-space(.))] + [BR-DE-4] Das Element "Seller post code" (BT-38) muss übermittelt werden. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:Contact | /cn:CreditNote/cac:AccountingSupplierParty/cac:Party/cac:Contact" shadowed by preceding rule + + /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:Contact | /cn:CreditNote/cac:AccountingSupplierParty/cac:Party/cac:Contact + + + + + + + + + + + + + + /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:Contact | /cn:CreditNote/cac:AccountingSupplierParty/cac:Party/cac:Contact + + + + + + + + cbc:Name[boolean(normalize-space(.))] + [BR-DE-5] Das Element "Seller contact point" (BT-41) muss übermittelt werden. + + + + + cbc:Telephone[boolean(normalize-space(.))] + [BR-DE-6] Das Element "Seller contact telephone number" (BT-42) muss übermittelt werden. + + + + + cbc:ElectronicMail[boolean(normalize-space(.))] + [BR-DE-7] Das Element "Seller contact email address" (BT-43) muss übermittelt werden. + + + + + matches(normalize-space(cbc:Telephone), $XR-TELEPHONE-REGEX) + [BR-DE-27] In BT-42 sollen mindestens drei Ziffern enthalten sein. + + + + + matches(normalize-space(cbc:ElectronicMail), $XR-EMAIL-REGEX) + [BR-DE-28] In BT-43 soll genau ein @-Zeichen enthalten sein, welches nicht von einem Leerzeichen, einem Punkt, aber mindestens zwei Zeichen auf beiden Seiten flankiert werden soll. Ein Punkt sollte nicht am Anfang oder am Ende stehen. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress | /cn:CreditNote/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress" shadowed by preceding rule + + /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress | /cn:CreditNote/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress + + + + + + + + + + + + + + /ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress | /cn:CreditNote/cac:AccountingCustomerParty/cac:Party/cac:PostalAddress + + + + + + + + cbc:CityName[boolean(normalize-space(.))] + [BR-DE-8] Das Element "Buyer city" (BT-52) muss übermittelt werden. + + + + + cbc:PostalZone[boolean(normalize-space(.))] + [BR-DE-9] Das Element "Buyer post code" (BT-53) muss übermittelt werden. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address | /cn:CreditNote/cac:Delivery/cac:DeliveryLocation/cac:Address" shadowed by preceding rule + + /ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address | /cn:CreditNote/cac:Delivery/cac:DeliveryLocation/cac:Address + + + + + + + + + + + + + + /ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address | /cn:CreditNote/cac:Delivery/cac:DeliveryLocation/cac:Address + + + + + + + + cbc:CityName[boolean(normalize-space(.))] + [BR-DE-10] Das Element "Deliver to city" (BT-77) muss übermittelt werden, wenn die Gruppe "DELIVER TO ADDRESS" (BG-15) übermittelt wird. + + + + + cbc:PostalZone[boolean(normalize-space(.))] + [BR-DE-11] Das Element "Deliver to post code" (BT-78) muss übermittelt werden, wenn die Gruppe "DELIVER TO ADDRESS" (BG-15) übermittelt wird. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = ('30','58')] | /cn:CreditNote/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = ('30','58')]" shadowed by preceding rule + + /ubl:Invoice/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = ('30','58')] | /cn:CreditNote/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = ('30','58')] + + + + + + + + + + + + + + /ubl:Invoice/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = ('30','58')] | /cn:CreditNote/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = ('30','58')] + + + + + + + + not(normalize-space(cbc:PaymentMeansCode) = '58') or xr:checkIBAN(string(cac:PayeeFinancialAccount/cbc:ID)) + [BR-DE-19] "Payment account identifier" (BT-84) soll eine korrekte IBAN enthalten, wenn in "Payment means type code" (BT-81) mit dem Code 58 SEPA als Zahlungsmittel gefordert wird. + + + + + cac:PayeeFinancialAccount + [BR-DE-23-a] Wenn BT-81 "Payment means type code" einen Schlüssel für Überweisungen enthält (30, 58), muss BG-17 "CREDIT TRANSFER" übermittelt werden. + + + + + not(cac:CardAccount) and not(cac:PaymentMandate) + [BR-DE-23-b] Wenn BT-81 "Payment means type code" einen Schlüssel für Überweisungen enthält (30, 58), dürfen BG-18 und BG-19 nicht übermittelt werden. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = ('48','54','55')] |/cn:CreditNote/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = ('48','54','55')]" shadowed by preceding rule + + /ubl:Invoice/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = ('48','54','55')] |/cn:CreditNote/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = ('48','54','55')] + + + + + + + + + + + + + + /ubl:Invoice/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = ('48','54','55')] |/cn:CreditNote/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = ('48','54','55')] + + + + + + + + cac:CardAccount + [BR-DE-24-a] Wenn BT-81 "Payment means type code" einen Schlüssel für Kartenzahlungen enthält (48, 54, 55), muss genau BG-18 "PAYMENT CARD INFORMATION" übermittelt werden. + + + + + not(cac:PayeeFinancialAccount) and not(cac:PaymentMandate) + [BR-DE-24-b] Wenn BT-81 "Payment means type code" einen Schlüssel für Kartenzahlungen enthält (48, 54, 55), dürfen BG-17 und BG-19 nicht übermittelt werden. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = '59'] | /cn:CreditNote/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = '59']" shadowed by preceding rule + + /ubl:Invoice/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = '59'] | /cn:CreditNote/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = '59'] + + + + + + + + + + + + + + /ubl:Invoice/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = '59'] | /cn:CreditNote/cac:PaymentMeans[normalize-space(cbc:PaymentMeansCode) = '59'] + + + + + + + + not(normalize-space(cbc:PaymentMeansCode) = '59') or xr:checkIBAN(string(cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID)) + [BR-DE-20] "Debited account identifier" (BT-91) soll eine korrekte IBAN enthalten, wenn in "Payment means type code" (BT-81) mit dem Code 59 SEPA als Zahlungsmittel gefordert wird. + + + + + cac:PaymentMandate + [BR-DE-25-a] Wenn BT-81 "Payment means type code" einen Schlüssel für Lastschriften enthält (59), muss genau BG-19 "DIRECT DEBIT" übermittelt werden. + + + + + not(cac:PayeeFinancialAccount) and not(cac:CardAccount) + [BR-DE-25-b] Wenn BT-81 "Payment means type code" einen Schlüssel für Lastschriften enthält (59), dürfen BG-17 und BG-18 nicht übermittelt werden. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:TaxTotal/cac:TaxSubtotal | /cn:CreditNote/cac:TaxTotal/cac:TaxSubtotal" shadowed by preceding rule + + /ubl:Invoice/cac:TaxTotal/cac:TaxSubtotal | /cn:CreditNote/cac:TaxTotal/cac:TaxSubtotal + + + + + + + + + + + + + + /ubl:Invoice/cac:TaxTotal/cac:TaxSubtotal | /cn:CreditNote/cac:TaxTotal/cac:TaxSubtotal + + + + + + + + cac:TaxCategory/cbc:Percent[boolean(normalize-space(.))] + [BR-DE-14] Das Element "VAT category rate" (BT-119) muss übermittelt werden. + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:EmbeddedDocumentBinaryObject[$isExtension]" shadowed by preceding rule + + cbc:EmbeddedDocumentBinaryObject[$isExtension] + + + + + + + + + + + + + + cbc:EmbeddedDocumentBinaryObject[$isExtension] + + + + + + + + .[@mimeCode = 'application/pdf' or @mimeCode = 'image/png' or @mimeCode = 'image/jpeg' or @mimeCode = 'text/csv' or @mimeCode = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' or @mimeCode = 'application/vnd.oasis.opendocument.spreadsheet' or @mimeCode = 'application/xml'] + [BR-DEX-01] Das Element "Attached Document" (BT-125) benutzt einen nicht zulässigen MIME-Code: . Im Falle einer Extension darf zusätzlich zu der Liste der mime codes (definiert in Abschnitt 8.2, "Binary Object") der MIME-Code application/xml genutzt werden. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice[$isExtension]" shadowed by preceding rule + + /ubl:Invoice[$isExtension] + + + + + + + + + + + + + + /ubl:Invoice[$isExtension] + + + + + + + + (every $invoiceline in /ubl:Invoice/cac:InvoiceLine[ exists (./cac:SubInvoiceLine) ] satisfies $invoiceline/xs:decimal(cbc:LineExtensionAmount) = sum($invoiceline/cac:SubInvoiceLine/xs:decimal(cbc:LineExtensionAmount))) and (count( //cac:SubInvoiceLine [count(cac:SubInvoiceLine) > 0 and xs:decimal(cbc:LineExtensionAmount) = sum(cac:SubInvoiceLine/xs:decimal(cbc:LineExtensionAmount))]) = count(//cac:SubInvoiceLine [count(cac:SubInvoiceLine) > 0])) + [BR-DEX-02] Der Wert von "Invoice line net amount" (BT-131) einer "INVOICE LINE" + (BG-25) oder einer "SUB INVOICE LINE" (BG-DEX-01) soll der Summe + der "Invoice line net amount" (BT-131) der direkt darunterliegenden "SUB + INVOICE LINE" (BG-DEX-01) entsprechen. + + + + + not(exists(//cac:SubInvoiceLine/cac:Item[ count ( cac:ClassifiedTaxCategory) != 1])) + [BR-DEX-03] Eine Sub Invoice Line (BG-DEX-01) muss genau eine "SUB INVOICE LINE VAT INFORMATION" (BG-DEX-06) enthalten. + + + + + + + + + + + + + + + + + + WARNING: Rule for context "cac:LegalMonetaryTotal[$isExtension]" shadowed by preceding rule + + cac:LegalMonetaryTotal[$isExtension] + + + + + + + + + + + + + + cac:LegalMonetaryTotal[$isExtension] + + + + + + + + (round((xs:decimal(cbc:PayableAmount) - $payableroundingamount) * 10 * 10) div 100) = (round((xs:decimal(cbc:TaxInclusiveAmount) - $prepaidamount + $thirdpartyprepaidamount) * 10 * 10) div 100) + [BR-DEX-09] Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) - Paid amount (BT-113) + Rounding amount (BT-114) + Σ Third party payment amount (BT-DEX-002). + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PartyIdentification/cbc:ID[@schemeID and $isExtension]" shadowed by preceding rule + + cac:PartyIdentification/cbc:ID[@schemeID and $isExtension] + + + + + + + + + + + + + + cac:PartyIdentification/cbc:ID[@schemeID and $isExtension] + + + + + + + + ((not(contains(normalize-space(@schemeID), ' ')) and contains($ISO-6523-ICD-EXT-CODES, concat(' ', normalize-space(@schemeID), ' ')))) or ((not(contains(normalize-space(@schemeID), ' ')) and contains(' SEPA ', concat(' ', normalize-space(@schemeID), ' '))) and ((ancestor::cac:AccountingSupplierParty) or (ancestor::cac:PayeeParty))) + [BR-DEX-04] Any scheme identifier in MUST be coded using one of the ISO 6523 ICD list. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:PartyLegalEntity/cbc:CompanyID[@schemeID and $isExtension]" shadowed by preceding rule + + cac:PartyLegalEntity/cbc:CompanyID[@schemeID and $isExtension] + + + + + + + + + + + + + + cac:PartyLegalEntity/cbc:CompanyID[@schemeID and $isExtension] + + + + + + + + ((not(contains(normalize-space(@schemeID), ' ')) and contains($ISO-6523-ICD-EXT-CODES, concat(' ', normalize-space(@schemeID), ' ')))) + [BR-DEX-05] Any scheme identifier in MUST be coded using one of the ISO 6523 ICD list. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:StandardItemIdentification/cbc:ID[@schemeID and $isExtension]" shadowed by preceding rule + + cac:StandardItemIdentification/cbc:ID[@schemeID and $isExtension] + + + + + + + + + + + + + + cac:StandardItemIdentification/cbc:ID[@schemeID and $isExtension] + + + + + + + + ((not(contains(normalize-space(@schemeID), ' ')) and contains($ISO-6523-ICD-EXT-CODES, concat(' ', normalize-space(@schemeID), ' ')))) + [BR-DEX-06] Any scheme identifier in MUST be coded using one of the ISO 6523 ICD list. + + + + + + + + + + + + + + + WARNING: Rule for context "cbc:EndpointID[@schemeID and $isExtension]" shadowed by preceding rule + + cbc:EndpointID[@schemeID and $isExtension] + + + + + + + + + + + + + + cbc:EndpointID[@schemeID and $isExtension] + + + + + + + + ((not(contains(normalize-space(@schemeID), ' ')) and contains($CEF-EAS-EXT-CODES, concat(' ', normalize-space(@schemeID), ' ')))) + [BR-DEX-07] Any scheme identifier for an Endpoint Identifier in MUST belong to the CEF EAS code list. + + + + + + + + + + + + + + + WARNING: Rule for context "cac:DeliveryLocation/cbc:ID[@schemeID and $isExtension]" shadowed by preceding rule + + cac:DeliveryLocation/cbc:ID[@schemeID and $isExtension] + + + + + + + + + + + + + + cac:DeliveryLocation/cbc:ID[@schemeID and $isExtension] + + + + + + + + ((not(contains(normalize-space(@schemeID), ' ')) and contains($ISO-6523-ICD-EXT-CODES, concat(' ', normalize-space(@schemeID), ' ')))) + [BR-DEX-08] Any scheme identifier for a Delivery location identifier in MUST be coded using one of the ISO 6523 ICD list. + + + + + + + + + + + + + + + WARNING: Rule for context "/ubl:Invoice/cac:PrepaidPayment[$isExtension]" shadowed by preceding rule + + /ubl:Invoice/cac:PrepaidPayment[$isExtension] + + + + + + + + + + + + + + /ubl:Invoice/cac:PrepaidPayment[$isExtension] + + + + + + + + cbc:ID[boolean(normalize-space(xs:string(.)))] + [BR-DEX-10] Das Element "Third party payment type" BT-DEX-001 muss übermittelt werden, wenn die Gruppe "THIRD PARTY PAYMENT" (BG-DEX-09) übermittelt wird. + + + + + cbc:PaidAmount[boolean(normalize-space(xs:string(.)))] + [BR-DEX-11] Das Element "Third party payment amount" BT-DEX-002 muss übermittelt werden, wenn die Gruppe "THIRD PARTY PAYMENT" (BG-DEX-09) übermittelt wird. + + + + + cbc:InstructionID[boolean(normalize-space(xs:string(.)))] + [BR-DEX-12] Das Element "Third party payment description" BT-DEX-003 muss übermittelt werden, wenn die Gruppe "THIRD PARTY PAYMENT" (BG-DEX-09) übermittelt wird. + + + + + string-length(substring-after(cbc:PaidAmount, '.')) <= 2 + [BR-DEX-13] Die maximale Anzahl zulässiger Nachkommastellen für das Element "Third party payment amount" (BT-DEX-002) ist 2. + + + + + cbc:PaidAmount/@currencyID = parent::node()/cbc:DocumentCurrencyCode + [BR-DEX-14] Die Währungsangabe von "Third party payment amount" BT-DEX-002 muss BT-5 ("Invoice currency code") entsprechen. + + + + + + + + + + + + + + + WARNING: Rule for context "(/ubl:Invoice | /cn:CreditNote)[$isCVD]" shadowed by preceding rule + + (/ubl:Invoice | /cn:CreditNote)[$isCVD] + + + + + + + + + + + + + + (/ubl:Invoice | /cn:CreditNote)[$isCVD] + + + + + + + + cac:OriginatorDocumentReference/cbc:ID[boolean(normalize-space(.))] + + [BR-DE-CVD-02] Das Element "Tender or lot reference" (BT-17) muss übermittelt werden. + + + + + + cac:ContractDocumentReference/cbc:ID[boolean(normalize-space(.))] + + [BR-DE-CVD-01] Das Element "Contract reference" (BT-12) muss übermittelt werden. + + + + + + (cac:InvoiceLine/cac:Item | cac:CreditNoteLine/cac:Item)[cac:CommodityClassification/cbc:ItemClassificationCode/@listID = 'CVD' and cac:AdditionalItemProperty/cbc:Name = 'cva'] + + [BR-DE-CVD-03] In einer Rechnung muss mindestens eine INVOICE LINE (BG-25) enthalten sein, in der der Scheme identifier von "Item classification identifier" (BT-158) den Wert 'CVD' und der "Item attribute name" (BT-160) den Wert 'cva' enthält. + + + + + + + + + + + + + + + + WARNING: Rule for context "(/ubl:Invoice[$isCVD]/cac:InvoiceLine | /cn:CreditNote[$isCVD]/cac:CreditNoteLine)/cac:Item" shadowed by preceding rule + + (/ubl:Invoice[$isCVD]/cac:InvoiceLine | /cn:CreditNote[$isCVD]/cac:CreditNoteLine)/cac:Item + + + + + + + + + + + + + + (/ubl:Invoice[$isCVD]/cac:InvoiceLine | /cn:CreditNote[$isCVD]/cac:CreditNoteLine)/cac:Item + + + + + + + + not(cac:CommodityClassification/cbc:ItemClassificationCode[@listID = 'CVD']) or count(cac:AdditionalItemProperty[cbc:Name = 'cva']) = 1 + + [BR-DE-CVD-06-a] Wenn der Scheme identifier von "Item classification identifier" (BT-158) mit dem Wert 'CVD' angegeben ist, muss in derselben Rechnungszeile genau ein "Item attribute name" (BT-160) mit dem Wert 'cva' vorhanden sein. + + + + + + not(cac:AdditionalItemProperty[cbc:Name = 'cva']) or count(cac:CommodityClassification/cbc:ItemClassificationCode[@listID = 'CVD']) = 1 + + [BR-DE-CVD-06-b] Wenn "Item attribute name" (BT-160) mit dem Wert 'cva' angegeben ist, muss in derselben Rechnungszeile genau ein "Item classification identifier" (BT-158) mit dem Scheme identifier 'CVD' vorhanden sein. + + + + + + + + + + + + + + + + WARNING: Rule for context "(/ubl:Invoice[$isCVD]/cac:InvoiceLine | /cn:CreditNote[$isCVD]/cac:CreditNoteLine)/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode" shadowed by preceding rule + + (/ubl:Invoice[$isCVD]/cac:InvoiceLine | /cn:CreditNote[$isCVD]/cac:CreditNoteLine)/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode + + + + + + + + + + + + + + (/ubl:Invoice[$isCVD]/cac:InvoiceLine | /cn:CreditNote[$isCVD]/cac:CreditNoteLine)/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode + + + + + + + + ((not(contains(normalize-space(@listID), ' ')) and contains($UNTDID-7143-CVD-CODES, concat(' ', normalize-space(@listID), ' ')))) + + [BR-TMP-CVD-01] Das Bildungsschema für "Item classification identifier" (BT-158) ist aus der Codeliste UNTDID 7143 zu wählen. + + + + + + not(normalize-space(@listID) = 'CVD') or normalize-space(.) = $CVD-VEHICLE-CATEGORY + + [BR-DE-CVD-04] Ein "Item classification identifier" (BT-158) mit dem Scheme identifier 'CVD' muss einen Wert aus der Liste der zulässigen Fahrzeugkategorien enthalten. + + + + + + + + + + + + + + + + WARNING: Rule for context "(/ubl:Invoice[$isCVD]/cac:InvoiceLine | /cn:CreditNote[$isCVD]/cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty[cbc:Name = 'cva']" shadowed by preceding rule + + (/ubl:Invoice[$isCVD]/cac:InvoiceLine | /cn:CreditNote[$isCVD]/cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty[cbc:Name = 'cva'] + + + + + + + + + + + + + + (/ubl:Invoice[$isCVD]/cac:InvoiceLine | /cn:CreditNote[$isCVD]/cac:CreditNoteLine)/cac:Item/cac:AdditionalItemProperty[cbc:Name = 'cva'] + + + + + + + + normalize-space(cbc:Value) = $CVA-CODES + + [BR-DE-CVD-05] Wenn innerhalb von ITEM ATTRIBUTES (BG-32) der "Item attribute name" (BT-160) den Wert 'cva' hat, muss der "Item attribute value" (BT-161) einen der zulässigen Werte enthalten. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/LICENSE-FeRD-Apache-2.0.txt b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/LICENSE-FeRD-Apache-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/LICENSE-FeRD-Apache-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/NOTICE-FeRD.txt b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/NOTICE-FeRD.txt new file mode 100644 index 0000000..03ad93a --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/NOTICE-FeRD.txt @@ -0,0 +1,22 @@ +FeRD / FNFE-MPE technical validation artifacts +ZUGFeRD 2.3.3 / Factur-X 1.07.3 EN16931 +Copyright (c) 2025 FNFE-MPE | FeRD. All rights reserved. + +Source: official FeRD ZF233_EN_01.zip, published 07 May 2025. +https://www.ferd-net.de/fileadmin/user_upload/FeRD/Downloads/ZF233_EN_01.zip + +The official Factur-X Specification 1.07.3, Documentation/1. FACTUR-X 1.07.3 EN.pdf, +page 9 (Disclaimer), states that the document and its appendices fall under +Apache License 2.0 terms. The technical validation artifacts are provided under +those terms, on an AS IS basis. A full Apache-2.0 license is supplied separately +as LICENSE-FeRD-Apache-2.0.txt. See the source specification for its limitations +and references to third-party EN16931 source documents. + +All copied schemas, Schematron source, compiled XSLT, and code lists are +unmodified. Their official archive-relative paths and SHA-256 hashes are +recorded in PROVENANCE.md. This notice is supplied by this package for +attribution; it is not an original NOTICE file extracted from the FeRD ZIP. + +No Mustangproject source, license notice, or validation resource is included +in these resources. SaxonCS-HE and the existing ZUGFeRD-csharp writer retain +their own independent licenses and notices. diff --git a/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/PROVENANCE.md b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/PROVENANCE.md new file mode 100644 index 0000000..f709916 --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/PROVENANCE.md @@ -0,0 +1,48 @@ +# Official ZUGFeRD 2.3.3 / Factur-X 1.07.3 EN16931 resources + +Source URL: https://www.ferd-net.de/fileadmin/user_upload/FeRD/Downloads/ZF233_EN_01.zip +Retrieved and verified: 2026-10-10 +ZIP SHA-256: `cca2ac49a5012ad82c2c42342968486f012d49b1d9f027119c03158c83dfe659` + +All normative resources below were extracted directly from the publisher-hosted official FeRD ZIP. The ZIP-relative directory structure and filenames are preserved exactly under this directory. No files were renamed, reserialized, regenerated, or modified; XSD import paths and the compiled stylesheet's document() reference are unchanged. Raw-byte SHA-256 checks against the ZIP passed for all eight copied technical files. Git attributes disable text conversion for the copied official files. + +Four XSDs are embedded: the EN16931 root plus its entire transitive xs:import/xs:include/xs:redefine dependency closure. The closure was traversed from the official root; it contains exactly the four XSDs listed below, with no additional dependencies elsewhere in the ZIP. The official _XSLT_EN16931 stylesheet and its code-list XML are the other two embedded runtime resources. The separate .sch and its source-side code list are packaged as untouched reference files, not used at runtime. + +No Mustangproject resources, code, test fixtures, or LICENSE/NOTICE files remain in this validation addition. The existing ZUGFeRD-csharp writer stays at Version23 / Comfort / CII. Its independent package license is unaffected. + +## Extraction paths and raw SHA-256 + +Paths are relative both to ZF233_EN_01.zip and this resource directory. + +| Exact ZIP entry / local relative path | Embedded | SHA-256 | +|---|---|---| +| `Schema/3. Factur-X_1.07.3_EN16931/_XSLT_EN16931/FACTUR-X_EN16931_codedb.xml` | Yes | `33d04741e2970478d2e1129854b8960aef972e16e0352dd16108d35f94ad147a` | +| `Schema/3. Factur-X_1.07.3_EN16931/_XSLT_EN16931/FACTUR-X_EN16931.xslt` | Yes | `af0473fbae13ca9d46c7c70a5dc2ef95985544e779d9be8a7fc84c2555864cea` | +| `Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_codedb.xml` | No; reference only | `6eb005e7ff2802f728aa9a3332e89dc4a5f88ef2359ccddb3125e2e5ee43caa9` | +| `Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd` | Yes | `5a3ce756cfa8d4f2ff3165d68123cfb7fbf3c7b64664edb0de38cca64d5c413b` | +| `Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd` | Yes | `0c024357d6e5f96a0699cbb425d21bb8db4c65450ad9c265c30a8aad50c46e46` | +| `Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd` | Yes | `9590182879865144dfc6ae069ef7499defaa7d31cb62e30ccacf9146ace5306d` | +| `Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931.sch` | No; reference only | `74781c081d3a2cbeed85c23e8637bd2ac8fef97416c86db60548699dfcb0c801` | +| `Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931.xsd` | Yes | `d71afa234624a8ee03ec876caa757702806c68e2da5f77f67ae1df91964fc485` | + +## Official invoice fixture + +ZIP entry: `Examples/3. EN16931/EN16931_Einfach/EN16931_Einfach.xml` +Extracted unchanged to: `src/pax.XRechnung.NET.tests/Resources/zugferd/Examples/3. EN16931/EN16931_Einfach/EN16931_Einfach.xml` +Fixture SHA-256: `8cdc72bb82ac87d8a320f8324352a7b290a88a604b6349be6cc3b5e8bf39baab` +Embedded in the test assembly and WASM probe as `zugferd-invoice.xml`, not the production library. + +## License and attribution + +`Documentation/1. FACTUR-X 1.07.3 EN.pdf`, page 9 (Disclaimer), identifies Apache License 2.0 terms for the specification and its appendices. Its copyright attribution is ©2025 FNFE-MPE | FeRD. The dedicated `NOTICE-FeRD.txt` records that attribution and source; `LICENSE-FeRD-Apache-2.0.txt` contains the full license, obtained from https://www.apache.org/licenses/LICENSE-2.0.txt. These are package-provided notices, not invented ZIP entries or Mustang notices. See the official specification for the disclaimer and references to third-party EN16931 documents. The official example also retains the FeRD right-of-use notice in its original XML comments. + +## Reproduce verification + +From the repository root, in PowerShell 7: + +```powershell +Invoke-WebRequest 'https://www.ferd-net.de/fileadmin/user_upload/FeRD/Downloads/ZF233_EN_01.zip' -OutFile artifacts/provenance/ZF233_EN_01.zip +./tools/Verify-ZugferdArtifacts.ps1 -ZipPath artifacts/provenance/ZF233_EN_01.zip +``` + +The verifier checks the pinned ZIP hash, compares every copied technical file against raw decompressed ZIP bytes, and walks the complete root-schema dependency closure. Production tests separately check the SHA-256 of all six actual embedded manifest resources and the availability of every declared XSD dependency. Validation rejects DTDs, ignores invoice-supplied schemaLocation and xml-stylesheet directives, blocks external Saxon functions/protocols, and only resolves the exact embedded stylesheet code-list URI. diff --git a/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931.sch b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931.sch new file mode 100644 index 0000000..7116eaa --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931.sch @@ -0,0 +1,2167 @@ + + + Schema for Factur-X; 1.07.3; EN16931-COMPLIANT (FULLY) + + + + + + + + [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). + + + + + + [BR-45]-Each VAT breakdown (BG-23) shall have a VAT category taxable amount (BT-116). + + [BR-46]-Each VAT breakdown (BG-23) shall have a VAT category tax amount (BT-117). + + [BR-47]-Each VAT breakdown (BG-23) shall be defined through a VAT category code (BT-118). + + [BR-48]-Each VAT breakdown (BG-23) shall have a VAT category rate (BT-119), except if the Invoice is not subject to VAT. + + [BR-CO-03]-Value added tax point date (BT-7) and Value added tax point date code (BT-8) are mutually exclusive. + + [BR-CO-17]-VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals. + + [BR-DEC-19]-The allowed maximum number of decimals for the VAT category taxable amount (BT-116) is 2. + + [BR-DEC-20]-The allowed maximum number of decimals for the VAT category tax amount (BT-117) is 2. + + + + + + [BR-Z-08]-In a VAT breakdown (BG-23) where VAT category code (BT-118) is "Zero rated" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amount (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Zero rated". + + [BR-Z-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Zero rated" shall equal 0 (zero). + + [BR-Z-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Zero rated" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + [BR-S-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Standard rated" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). + + [BR-S-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Standard rate" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + [BR-S-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "Standard rated", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "Standard rated" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). + + + + + + [BR-29]-If both Invoicing period start date (BT-73) and Invoicing period end date (BT-74) are given then the Invoicing period end date (BT-74) shall be later or equal to the Invoicing period start date (BT-73). + + [BR-CO-19]-If Invoicing period (BG-14) is used, the Invoicing period start date (BT-73) or the Invoicing period end date (BT-74) shall be filled, or both. + + + + + + [BR-31]-Each Document level allowance (BG-20) shall have a Document level allowance amount (BT-92). + + [BR-32]-Each Document level allowance (BG-20) shall have a Document level allowance VAT category code (BT-95). + + [BR-33]-Each Document level allowance (BG-20) shall have a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98). + + [BR-CO-05]-Document level allowance reason code (BT-98) and Document level allowance reason (BT-97) shall indicate the same type of allowance. + + [BR-CO-21]-Each Document level allowance (BG-20) shall contain a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98), or both. + + [BR-DEC-01]-The allowed maximum number of decimals for the Document level allowance amount (BT-92) is 2. + + [BR-DEC-02]-The allowed maximum number of decimals for the Document level allowance base amount (BT-93) is 2. + + + + + + [BR-36]-Each Document level charge (BG-21) shall have a Document level charge amount (BT-99). + + [BR-37]-Each Document level charge (BG-21) shall have a Document level charge VAT category code (BT-102). + + [BR-38]-Each Document level charge (BG-21) shall have a Document level charge reason (BT-104) or a Document level charge reason code (BT-105). + + [BR-CO-06]-Document level charge reason code (BT-105) and Document level charge reason (BT-104) shall indicate the same type of charge. + + [BR-CO-22]-Each Document level charge (BG-21) shall contain a Document level charge reason (BT-104) or a Document level charge reason code (BT-105), or both. + + [BR-DEC-05]-The allowed maximum number of decimals for the Document level charge amount (BT-99) is 2. + + [BR-DEC-06]-The allowed maximum number of decimals for the Document level charge base amount (BT-100) is 2. + + + + + + [BR-54]-Each Item attribute (BG-32) shall contain an Item attribute name (BT-160) and an Item attribute value (BT-161). + + + + + + [BR-51]-In accordance with card payments security standards an invoice should never include a full card primary account number (BT-87). At the moment PCI Security Standards Council has defined that the first 6 digits and last 4 digits are the maximum number of digits to be shown. + + + + + + [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). + + [BR-22]-Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129). + + [BR-23]-An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130). + + [BR-24]-Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131). + + [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). + + [BR-26]-Each Invoice line (BG-25) shall contain the Item net price (BT-146). + + [BR-27]-The Item net price (BT-146) shall NOT be negative. + + [BR-28]-The Item gross price (BT-148) shall NOT be negative. + + [BR-64]-The Item standard identifier (BT-157) shall have a Scheme identifier. + + [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. + + + + + + [BR-17]-The Payee name (BT-59) shall be provided in the Invoice, if the Payee (BG-10) is different from the Seller (BG-4). + + + + + + [BR-18]-The Seller tax representative name (BT-62) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). + + [BR-19]-The Seller tax representative postal address (BG-12) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). + + [BR-20]-The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11). + + [BR-56]-Each Seller tax representative party (BG-11) shall have a Seller tax representative VAT identifier (BT-63). + + + + + + [BR-CO-26]-In order for the buyer to automatically identify a supplier, the Seller identifier (BT-29), the Seller legal registration identifier (BT-30) and/or the Seller VAT identifier (BT-31) shall be present. + + + + + + [BR-30]-If both Invoice line period start date (BT-134) and Invoice line period end date (BT-135) are given then the Invoice line period end date (BT-135) shall be later or equal to the Invoice line period start date (BT-134). + + [BR-CO-20]-If Invoice line period (BG-26) is used, the Invoice line period start date (BT-134) or the Invoice line period end date (BT-135) shall be filled, or both. + + + + + + [BR-42]-Each Invoice line allowance (BG-27) shall have an Invoice line allowance reason (BT-139) or an Invoice line allowance reason code (BT-140). + + + + + + [BR-41]-Each Invoice line allowance (BG-27) shall have an Invoice line allowance amount (BT-136). + + [BR-CO-07]-Invoice line allowance reason code (BT-140) and Invoice line allowance reason (BT-139) shall indicate the same type of allowance reason. + + [BR-CO-23]-Each Invoice line allowance (BG-27) shall contain an Invoice line allowance reason (BT-139) or an Invoice line allowance reason code (BT-140), or both. + + [BR-DEC-24]-The allowed maximum number of decimals for the Invoice line allowance amount (BT-136) is 2. + + [BR-DEC-25]-The allowed maximum number of decimals for the Invoice line allowance base amount (BT-137) is 2. + + + + + + [BR-43]-Each Invoice line charge (BG-28) shall have an Invoice line charge amount (BT-141). + + [BR-44]-Each Invoice line charge (BG-28) shall have an Invoice line charge reason (BT-144) or an Invoice line charge reason code (BT-145). + + [BR-CO-08]-Invoice line charge reason code (BT-145) and Invoice line charge reason (BT-144) shall indicate the same type of charge reason. + + [BR-CO-24]-Each Invoice line charge (BG-28) shall contain an Invoice line charge reason (BT-144) or an Invoice line charge reason code (BT-145), or both. + + [BR-DEC-27]-The allowed maximum number of decimals for the Invoice line charge amount (BT-141) is 2. + + [BR-DEC-28]-The allowed maximum number of decimals for the Invoice line charge base amount (BT-142) is 2. + + + + + + [BR-CO-09]-The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix ‘EL’. + + + + + + [BR-66]-Each Specified Trade Allowance Charge (BG-20)(BG-21) shall contain a Charge Indicator. + + + + + + [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-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Reverse charge" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + [BR-E-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Exempt from VAT" 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-E-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Exempt from VAT", the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + [BR-G-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63). + + [BR-G-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Export outside the EU" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + [BR-IC-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48). + + [BR-IC-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Intra-community supply" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + [BR-AF-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" 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-AF-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero. + + + + + + [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. + + + + + + [BR-O-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Not subject to VAT" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-48). + + [BR-O-06]-A Document level allowance (BG-20) where VAT category code (BT-95) is "Not subject to VAT" shall not contain a Document level allowance VAT rate (BT-96). + + + + + + [BR-S-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Standard rated" 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-S-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Standard rated" the Document level allowance VAT rate (BT-96) shall be greater than zero. + + + + + + [BR-Z-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Zero rated" 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-Z-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Zero rated" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + [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-AE-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Reverse charge" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + [BR-E-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Exempt from VAT" 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-E-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Exempt from VAT", the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + [BR-G-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63). + + [BR-G-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Export outside the EU" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + [BR-IC-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48). + + [BR-IC-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Intra-community supply" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + [BR-AF-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" 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-AF-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero. + + + + + + [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. + + + + + + [BR-O-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Not subject to VAT" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-48). + + [BR-O-07]-A Document level charge (BG-21) where the VAT category code (BT-102) is "Not subject to VAT" shall not contain a Document level charge VAT rate (BT-103). + + + + + + [BR-S-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Standard rated" 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-S-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Standard rated" the Document level charge VAT rate (BT-103) shall be greater than zero. + + + + + + [BR-Z-04]-An Invoice that contains a Document level charge where the Document level charge VAT category code (BT-102) is "Zero rated" 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-Z-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Zero rated" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + [BR-CO-10]-Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131). + + [BR-12]-An Invoice shall have the Sum of Invoice line net amount (BT-106). + + [BR-13]-An Invoice shall have the Invoice total amount without VAT (BT-109). + + [BR-14]-An Invoice shall have the Invoice total amount with VAT (BT-112). + + [BR-15]-An Invoice shall have the Amount due for payment (BT-115). + + [BR-CO-11]-Sum of allowances on document level (BT-107) = Σ Document level allowance amount (BT-92). + + [BR-CO-12]-Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99). + + [BR-CO-13]-Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108). + + [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-16]-Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) +Rounding amount (BT-114). + + [BR-DEC-09]-The allowed maximum number of decimals for the Sum of Invoice line net amount (BT-106) is 2. + + [BR-DEC-10]-The allowed maximum number of decimals for the Sum of allowanced on document level (BT-107) is 2. + + [BR-DEC-11]-The allowed maximum number of decimals for the Sum of charges on document level (BT-108) is 2. + + [BR-DEC-12]-The allowed maximum number of decimals for the Invoice total amount without VAT (BT-109) is 2. + + [BR-DEC-13]-The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2. + + [BR-DEC-14]-The allowed maximum number of decimals for the Invoice total amount with VAT (BT-112) is 2. + + [BR-DEC-15]-The allowed maximum number of decimals for the Invoice total VAT amount in accounting currency (BT-111) is 2. + + [BR-DEC-16]-The allowed maximum number of decimals for the Paid amount (BT-113) is 2. + + [BR-DEC-17]-The allowed maximum number of decimals for the Rounding amount (BT-114) is 2. + + [BR-DEC-18]-The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2. + + [BR-53]-If the VAT accounting currency code (BT-6) is present, then the Invoice total VAT amount in accounting currency (BT-111) shall be provided. + + + + + + [BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117). + + + + + + [BR-49]-A Payment instruction (BG-16) shall specify the Payment means type code (BT-81). + + + + + + [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. + + + + + + [BR-CO-27]-Either the IBAN or a Proprietary ID (BT-84) shall be used. + + + + + + [BR-CO-18]-An Invoice shall at least have one VAT breakdown group (BG-23). + + + + + + [BR-AE-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Reverse charge" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Reverse charge". + + [BR-AE-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Reverse charge" shall be 0 (zero). + + [BR-AE-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Reverse charge" shall have a VAT exemption reason code (BT-121), meaning "Reverse charge" or the VAT exemption reason text (BT-120) "Reverse charge" (or the equivalent standard text in another language). + + + + + + [BR-E-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Exempt from VAT" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Exempt from VAT". + + [BR-E-09]-The VAT category tax amount (BT-117) In a VAT breakdown (BG-23) where the VAT category code (BT-118) equals "Exempt from VAT" shall equal 0 (zero). + + [BR-E-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Exempt from VAT" shall have a VAT exemption reason code (BT-121) or a VAT exemption reason text (BT-120). + + + + + + [BR-G-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Export outside the EU" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Export outside the EU". + + [BR-G-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Export outside the EU" shall be 0 (zero). + + [BR-G-10]-A VAT Breakdown (BG-23) with the VAT Category code (BT-118) "Export outside the EU" shall have a VAT exemption reason code (BT-121), meaning "Export outside the EU" or the VAT exemption reason text (BT-120) "Export outside the EU" (or the equivalent standard text in another language). + + + + + + [BR-IC-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Intra-community supply". + + [BR-IC-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" shall be 0 (zero). + + [BR-IC-10]-A VAT Breakdown (BG-23) with the VAT Category code (BT-118) "Intra-community supply" shall have a VAT exemption reason code (BT-121), meaning "Intra-community supply" or the VAT exemption reason text (BT-120) "Intra-community supply" (or the equivalent standard text in another language). + + [BR-IC-11]-In an Invoice with a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the Actual delivery date (BT-72) or the Invoicing period (BG-14) shall not be blank. + + [BR-IC-12]-In an Invoice with a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the Deliver to country code (BT-80) shall not be blank. + + + + + + [BR-AF-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IGIC", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IGIC" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). + + [BR-AF-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IGIC" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). + + [BR-AF-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "IGIC" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + [BR-AG-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IPSI", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IPSI" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). + + [BR-AG-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IPSI" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). + + [BR-AG-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "IPSI" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + [BR-O-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Not subject to VAT" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Not subject to VAT". + + [BR-O-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Not subject to VAT" shall be 0 (zero). + + [BR-O-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) " Not subject to VAT" shall have a VAT exemption reason code (BT-121), meaning " Not subject to VAT" or a VAT exemption reason text (BT-120) " Not subject to VAT" (or the equivalent standard text in another language). + + [BR-O-11]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain other VAT breakdown groups (BG-23). + + [BR-O-12]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is not "Not subject to VAT". + + [BR-O-13]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain Document level allowances (BG-20) where Document level allowance VAT category code (BT-95) is not "Not subject to VAT". + + [BR-O-14]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain Document level charges (BG-21) where Document level charge VAT category code (BT-102) is not "Not subject to VAT". + + + + + + [BR-AE-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) 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-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Reverse charge" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + [BR-E-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Exempt from VAT" 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-E-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Exempt from VAT", the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + [BR-G-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63). + + [BR-G-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Export outside the EU" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + [BR-IC-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48). + + [BR-IC-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Intracommunity supply" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + [BR-AF-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" 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-AF-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" the invoiced item VAT rate (BT-152) shall be greater than 0 (zero). + + + + + + [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. + + + + + + [BR-O-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Not subject to VAT" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-46). + + [BR-O-05]-An Invoice line (BG-25) where the VAT category code (BT-151) is "Not subject to VAT" shall not contain an Invoiced item VAT rate (BT-152). + + + + + + [BR-S-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Standard rated" 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-S-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Standard rated" the Invoiced item VAT rate (BT-152) shall be greater than zero. + + + + + + [BR-Z-02]-An Invoice that contains an Invoice line where the Invoiced item VAT category code (BT-151) is "Zero rated" 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-Z-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Zero rated" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + [BR-16]-An Invoice shall have at least one Invoice line (BG-25). + + [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-01]-An Invoice shall have a Specification identifier (BT-24). + + [BR-02]-An Invoice shall have an Invoice number (BT-1). + + [BR-03]-An Invoice shall have an Invoice issue date (BT-2). + + [BR-04]-An Invoice shall have an Invoice type code (BT-3). + + [BR-05]-An Invoice shall have an Invoice currency code (BT-5). + + [BR-06]-An Invoice shall contain the Seller name (BT-27). + + [BR-07]-An Invoice shall contain the Buyer name (BT-44). + + [BR-08]-An Invoice shall contain the Seller postal address (BG-5). + + [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). + + [BR-10]-An Invoice shall contain the Buyer postal address (BG-8). + + [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). + + [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-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". + + [BR-E-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 “Exempt from VAT” shall contain exactly one VAT breakdown (BG-23) with the VAT category code (BT-118) equal to "Exempt from VAT". + + [BR-AE-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 "Reverse charge" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "VAT reverse charge". + + [BR-IC-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 "Intra-community supply" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Intra-community supply". + + [BR-G-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 "Export outside the EU" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Export outside the EU". + + [BR-O-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 "Not subject to VAT" shall contain exactly one VAT breakdown group (BG-23) with the VAT category code (BT-118) equal to "Not subject to VAT". + + [BR-AF-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 "IGIC" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IGIC". + + [BR-AG-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 "IPSI" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IPSI". + + [BR-B-01]-An Invoice where the VAT category code (BT-151, BT-95 or BT-102) is “Split payment” shall be a domestic Italian invoice. + + [BR-B-02]-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 “Split payment" shall not contain 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”. + + + + + + [BR-57]-Each Deliver to address (BG-15) shall contain a Deliver to country code (BT-80). + + + + + + [BR-55]-Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25). + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + + + Element 'ram:ID' must occur exactly 1 times. + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:Content' must occur exactly 1 times. + + Element 'ram:SubjectCode' may occur at maximum 1 times. + + + + + Value of 'ram:SubjectCode' is not allowed. + + Attribute @listID' marked as not used in the given context. + + Attribute @listVersionID' marked as not used in the given context. + + + + Attribute '@format' is required in this context. + + + Value of '@format' is not allowed. + + + + + Value of 'ram:TypeCode' is not allowed. + + + + Element 'ram:BusinessProcessSpecifiedDocumentContextParameter' may occur at maximum 1 times. + + Element 'ram:GuidelineSpecifiedDocumentContextParameter' must occur exactly 1 times. + + + + Element 'ram:ID' must occur exactly 1 times. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + Value of 'ram:ID' is not allowed. + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:IncludedSupplyChainTradeLineItem' must occur at least 1 times. + + + + Element 'ram:SellerTradeParty' must occur exactly 1 times. + + Element 'ram:BuyerTradeParty' must occur exactly 1 times. + + + + Element variant 'ram:AdditionalReferencedDocument[ not(ram:TypeCode="916") and not(ram:TypeCode="50") and not(ram:TypeCode="130")]' is marked as not used in the given context. + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + Element 'ram:Name' is marked as not used in the given context. + + + + + Value of 'ram:ReferenceTypeCode' is not allowed. + + + + + Value of 'ram:TypeCode' is not allowed. + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + Element 'ram:Name' is marked as not used in the given context. + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + + Value of 'ram:TypeCode' is not allowed. + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + Element 'ram:TypeCode' must occur exactly 1 times. + + Element 'ram:Name' may occur at maximum 1 times. + + Element 'ram:AttachmentBinaryObject' may occur at maximum 1 times. + + + + Attribute '@mimeCode' is required in this context. + + + Value of '@mimeCode' is not allowed. + + Attribute '@filename' is required in this context. + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + + Value of 'ram:TypeCode' is not allowed. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + Element 'ram:Name' is marked as not used in the given context. + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + Element 'ram:ID' may occur at maximum 1 times. + + Element 'ram:GlobalID' may occur at maximum 1 times. + + Element 'ram:Name' must occur exactly 1 times. + + Element 'ram:DefinedTradeContact' may occur at maximum 1 times. + + Element 'ram:PostalTradeAddress' must occur exactly 1 times. + + Element 'ram:URIUniversalCommunication' may occur at maximum 1 times. + + Element 'ram:SpecifiedTaxRegistration' may occur at maximum 1 times. + + + + Element 'ram:URIID' must occur exactly 1 times. + + + + Element 'ram:CompleteNumber' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:CompleteNumber' must occur exactly 1 times. + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + Element 'ram:Description' is marked as not used in the given context. + + + + Attribute '@schemeID' is required in this context. + + + Value of '@schemeID' is not allowed. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:CountryID' must occur exactly 1 times. + + Element 'ram:CountrySubDivisionName' may occur at maximum 1 times. + + + + + Value of 'ram:CountryID' is not allowed. + + + + Attribute @listID' marked as not used in the given context. + + Attribute @listVersionID' marked as not used in the given context. + + + + + Value of '@schemeID' is not allowed. + + + + Element 'ram:ID' must occur exactly 1 times. + + + + Attribute '@schemeID' is required in this context. + + + Value of '@schemeID' is not allowed. + + + + Element 'ram:URIID' must occur exactly 1 times. + + + + Element 'ram:CompleteNumber' is marked as not used in the given context. + + + + Attribute '@schemeID' is required in this context. + + + Value of '@schemeID' is not allowed. + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + Element 'ram:Name' is marked as not used in the given context. + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + Element 'ram:Name' is marked as not used in the given context. + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + Element 'ram:Name' must occur exactly 1 times. + + Element 'ram:PostalTradeAddress' must occur exactly 1 times. + + Element 'ram:SpecifiedTaxRegistration' must occur exactly 1 times. + + + + Element 'ram:DefinedTradeContact' is marked as not used in the given context. + + + + Element 'ram:Description' is marked as not used in the given context. + + + + Element 'ram:GlobalID' is marked as not used in the given context. + + + + Element 'ram:ID' is marked as not used in the given context. + + + + Element 'ram:CountryID' must occur exactly 1 times. + + Element 'ram:CountrySubDivisionName' may occur at maximum 1 times. + + + + + Value of 'ram:CountryID' is not allowed. + + + + Attribute @listID' marked as not used in the given context. + + Attribute @listVersionID' marked as not used in the given context. + + + + Element 'ram:SpecifiedLegalOrganization' is marked as not used in the given context. + + + + Element 'ram:ID' must occur exactly 1 times. + + + + Attribute '@schemeID' is required in this context. + + + Value of '@schemeID' is not allowed. + + + + Element 'ram:URIUniversalCommunication' is marked as not used in the given context. + + + + Element 'ram:Name' must occur exactly 1 times. + + Element 'ram:Description' may occur at maximum 1 times. + + Element 'ram:DefinedTradeContact' may occur at maximum 1 times. + + Element 'ram:PostalTradeAddress' must occur exactly 1 times. + + Element 'ram:URIUniversalCommunication' may occur at maximum 1 times. + + Element variant 'ram:SpecifiedTaxRegistration[ram:ID/@schemeID="VA"]' may occur at maximum 1 times. + + Element variant 'ram:SpecifiedTaxRegistration[ram:ID/@schemeID="FC"]' may occur at maximum 1 times. + + + + Element 'ram:URIID' must occur exactly 1 times. + + + + Element 'ram:CompleteNumber' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:CompleteNumber' must occur exactly 1 times. + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + Attribute '@schemeID' is required in this context. + + + Value of '@schemeID' is not allowed. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:CountryID' must occur exactly 1 times. + + Element 'ram:CountrySubDivisionName' may occur at maximum 1 times. + + + + + Value of 'ram:CountryID' is not allowed. + + + + Attribute @listID' marked as not used in the given context. + + Attribute @listVersionID' marked as not used in the given context. + + + + + Value of '@schemeID' is not allowed. + + + + Element variant 'ram:SpecifiedTaxRegistration[ not(ram:ID/@schemeID="VA") and not(ram:ID/@schemeID="FC")]' is marked as not used in the given context. + + + + Element 'ram:ID' must occur exactly 1 times. + + + + Attribute '@schemeID' is required in this context. + + + + Element 'ram:ID' must occur exactly 1 times. + + + + Attribute '@schemeID' is required in this context. + + + + Element 'ram:URIID' must occur exactly 1 times. + + + + Element 'ram:CompleteNumber' is marked as not used in the given context. + + + + Attribute '@schemeID' is required in this context. + + + Value of '@schemeID' is not allowed. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:OccurrenceDateTime' must occur exactly 1 times. + + + + Attribute '@format' is required in this context. + + + Value of '@format' is not allowed. + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + Element 'ram:Name' is marked as not used in the given context. + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + Element 'ram:Name' is marked as not used in the given context. + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + Element 'ram:ID' may occur at maximum 1 times. + + Element 'ram:GlobalID' may occur at maximum 1 times. + + + + Element 'ram:DefinedTradeContact' is marked as not used in the given context. + + + + Element 'ram:Description' is marked as not used in the given context. + + + + Attribute '@schemeID' is required in this context. + + + Value of '@schemeID' is not allowed. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:CountryID' must occur exactly 1 times. + + Element 'ram:CountrySubDivisionName' may occur at maximum 1 times. + + + + + Value of 'ram:CountryID' is not allowed. + + + + Attribute @listID' marked as not used in the given context. + + Attribute @listVersionID' marked as not used in the given context. + + + + Element 'ram:SpecifiedLegalOrganization' is marked as not used in the given context. + + + + Element 'ram:SpecifiedTaxRegistration' is marked as not used in the given context. + + + + Element 'ram:URIUniversalCommunication' is marked as not used in the given context. + + + + Element 'ram:PaymentReference' may occur at maximum 1 times. + + Element 'ram:InvoiceCurrencyCode' must occur exactly 1 times. + + Element 'ram:ApplicableTradeTax' must occur at least 1 times. + + Element 'ram:SpecifiedTradePaymentTerms' may occur at maximum 1 times. + + Element 'ram:SpecifiedTradeSettlementHeaderMonetarySummation' must occur exactly 1 times. + + Element 'ram:ReceivableSpecifiedTradeAccountingAccount' may occur at maximum 1 times. + + + + Element 'ram:CalculatedAmount' must occur exactly 1 times. + + Element 'ram:TypeCode' must occur exactly 1 times. + + Element 'ram:BasisAmount' must occur exactly 1 times. + + Element 'ram:CategoryCode' must occur exactly 1 times. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Attribute @currencyID' marked as not used in the given context. + + + + + Value of 'ram:CategoryCode' is not allowed. + + + + + Value of 'ram:DueDateTypeCode' is not allowed. + + + + + Value of 'ram:ExemptionReasonCode' is not allowed. + + Attribute @listID' marked as not used in the given context. + + Attribute @listVersionID' marked as not used in the given context. + + + + Attribute '@format' is required in this context. + + + Value of '@format' is not allowed. + + + + + Value of 'ram:TypeCode' is not allowed. + + + + Attribute '@format' is required in this context. + + + Value of '@format' is not allowed. + + + + Attribute '@format' is required in this context. + + + Value of '@format' is not allowed. + + + + Attribute @schemeID' marked as not used in the given context. + + + + + Value of 'ram:InvoiceCurrencyCode' is not allowed. + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + Attribute '@format' is required in this context. + + + Value of '@format' is not allowed. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + Element 'ram:Name' is marked as not used in the given context. + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + Element 'ram:ID' may occur at maximum 1 times. + + Element 'ram:GlobalID' may occur at maximum 1 times. + + Element 'ram:Name' must occur exactly 1 times. + + + + Element 'ram:DefinedTradeContact' is marked as not used in the given context. + + + + Element 'ram:Description' is marked as not used in the given context. + + + + Attribute '@schemeID' is required in this context. + + + Value of '@schemeID' is not allowed. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:PostalTradeAddress' is marked as not used in the given context. + + + + + Value of '@schemeID' is not allowed. + + + + Element 'ram:TradingBusinessName' is marked as not used in the given context. + + + + Element 'ram:SpecifiedTaxRegistration' is marked as not used in the given context. + + + + Element 'ram:URIUniversalCommunication' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element variant 'ram:SpecifiedTradeAllowanceCharge[ not(ram:ChargeIndicator/udt:Indicator="false") and not(ram:ChargeIndicator/udt:Indicator="true")]' is marked as not used in the given context. + + + + Element 'ram:ChargeIndicator' must occur exactly 1 times. + + Element 'ram:ActualAmount' must occur exactly 1 times. + + Element 'ram:CategoryTradeTax' must occur exactly 1 times. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + Element 'ram:CategoryCode' must occur exactly 1 times. + + + + Element 'ram:BasisAmount' is marked as not used in the given context. + + + + Element 'ram:CalculatedAmount' is marked as not used in the given context. + + + + + Value of 'ram:CategoryCode' is not allowed. + + + + Element 'ram:DueDateTypeCode' is marked as not used in the given context. + + + + Element 'ram:ExemptionReason' is marked as not used in the given context. + + + + Element 'ram:ExemptionReasonCode' is marked as not used in the given context. + + + + Element 'ram:TaxPointDate' is marked as not used in the given context. + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + Value of 'ram:ReasonCode' is not allowed. + + + + Element 'ram:ChargeIndicator' must occur exactly 1 times. + + Element 'ram:ActualAmount' must occur exactly 1 times. + + Element 'ram:CategoryTradeTax' must occur exactly 1 times. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + Element 'ram:CategoryCode' must occur exactly 1 times. + + + + Element 'ram:BasisAmount' is marked as not used in the given context. + + + + Element 'ram:CalculatedAmount' is marked as not used in the given context. + + + + + Value of 'ram:CategoryCode' is not allowed. + + + + Element 'ram:DueDateTypeCode' is marked as not used in the given context. + + + + Element 'ram:ExemptionReason' is marked as not used in the given context. + + + + Element 'ram:ExemptionReasonCode' is marked as not used in the given context. + + + + Element 'ram:TaxPointDate' is marked as not used in the given context. + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + Value of 'ram:ReasonCode' is not allowed. + + + + Element 'ram:Description' may occur at maximum 1 times. + + Element 'ram:DirectDebitMandateID' may occur at maximum 1 times. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Attribute '@format' is required in this context. + + + Value of '@format' is not allowed. + + + + Element 'ram:LineTotalAmount' must occur exactly 1 times. + + Element 'ram:ChargeTotalAmount' may occur at maximum 1 times. + + Element 'ram:AllowanceTotalAmount' may occur at maximum 1 times. + + Element 'ram:TaxBasisTotalAmount' must occur exactly 1 times. + + Element variant 'ram:TaxTotalAmount[@currencyID=../../ram:InvoiceCurrencyCode]' may occur at maximum 1 times. + + Element variant 'ram:TaxTotalAmount[@currencyID=../../ram:TaxCurrencyCode]' may occur at maximum 1 times. + + Element 'ram:RoundingAmount' may occur at maximum 1 times. + + Element 'ram:GrandTotalAmount' must occur exactly 1 times. + + Element 'ram:TotalPrepaidAmount' may occur at maximum 1 times. + + Element 'ram:DuePayableAmount' must occur exactly 1 times. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Element variant 'ram:TaxTotalAmount[ not(@currencyID=../../ram:InvoiceCurrencyCode) and not(@currencyID=../../ram:TaxCurrencyCode)]' is marked as not used in the given context. + + + + Attribute '@currencyID' is required in this context. + + + Value of '@currencyID' is not allowed. + + + + Attribute '@currencyID' is required in this context. + + + Value of '@currencyID' is not allowed. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + Element 'ram:Information' may occur at maximum 1 times. + + Element 'ram:PayeePartyCreditorFinancialAccount' may occur at maximum 1 times. + + + + Element 'ram:ID' must occur exactly 1 times. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:BICID' must occur exactly 1 times. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:IBANID' must occur exactly 1 times. + + + + Attribute @schemeID' marked as not used in the given context. + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + Value of 'ram:TaxCurrencyCode' is not allowed. + + + + Element 'ram:AssociatedDocumentLineDocument' must occur exactly 1 times. + + Element 'ram:SpecifiedTradeProduct' must occur exactly 1 times. + + Element 'ram:SpecifiedLineTradeAgreement' must occur exactly 1 times. + + Element 'ram:SpecifiedLineTradeDelivery' must occur exactly 1 times. + + + + Element 'ram:LineID' must occur exactly 1 times. + + Element 'ram:IncludedNote' may occur at maximum 1 times. + + + + Element 'ram:Content' must occur exactly 1 times. + + + + Element 'ram:SubjectCode' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:NetPriceProductTradePrice' must occur exactly 1 times. + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + Element 'ram:IssuerAssignedID' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:Name' is marked as not used in the given context. + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + Element 'ram:ChargeAmount' must occur exactly 1 times. + + Element variant 'ram:AppliedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="false"]' may occur at maximum 1 times. + + + + Element variant 'ram:AppliedTradeAllowanceCharge[ not(ram:ChargeIndicator/udt:Indicator="false") and not(ram:ChargeIndicator/udt:Indicator="true")]' is marked as not used in the given context. + + + + Element 'ram:ChargeIndicator' must occur exactly 1 times. + + Element 'ram:ActualAmount' must occur exactly 1 times. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Element 'ram:BasisAmount' is marked as not used in the given context. + + + + Element 'ram:CalculationPercent' is marked as not used in the given context. + + + + Element 'ram:CategoryTradeTax' is marked as not used in the given context. + + + + Element 'ram:Reason' is marked as not used in the given context. + + + + Element 'ram:ReasonCode' is marked as not used in the given context. + + + + + Value of '@unitCode' is not allowed. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Element 'ram:ChargeAmount' must occur exactly 1 times. + + + + Element 'ram:AppliedTradeAllowanceCharge' is marked as not used in the given context. + + + + + Value of '@unitCode' is not allowed. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Element 'ram:BilledQuantity' must occur exactly 1 times. + + + + Attribute '@unitCode' is required in this context. + + + Value of '@unitCode' is not allowed. + + + + Element 'ram:ApplicableTradeTax' must occur exactly 1 times. + + Element 'ram:SpecifiedTradeSettlementLineMonetarySummation' must occur exactly 1 times. + + Element 'ram:AdditionalReferencedDocument' may occur at maximum 1 times. + + Element 'ram:ReceivableSpecifiedTradeAccountingAccount' may occur at maximum 1 times. + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + Element 'ram:Name' is marked as not used in the given context. + + + + + Value of 'ram:ReferenceTypeCode' is not allowed. + + + + + Value of 'ram:TypeCode' is not allowed. + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + Element 'ram:CategoryCode' must occur exactly 1 times. + + + + Element 'ram:BasisAmount' is marked as not used in the given context. + + + + Element 'ram:CalculatedAmount' is marked as not used in the given context. + + + + + Value of 'ram:CategoryCode' is not allowed. + + + + Element 'ram:DueDateTypeCode' is marked as not used in the given context. + + + + Element 'ram:ExemptionReason' is marked as not used in the given context. + + + + Element 'ram:ExemptionReasonCode' is marked as not used in the given context. + + + + Element 'ram:TaxPointDate' is marked as not used in the given context. + + + + + Value of 'ram:TypeCode' is not allowed. + + + + Attribute '@format' is required in this context. + + + Value of '@format' is not allowed. + + + + Attribute '@format' is required in this context. + + + Value of '@format' is not allowed. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Element variant 'ram:SpecifiedTradeAllowanceCharge[ not(ram:ChargeIndicator/udt:Indicator="false") and not(ram:ChargeIndicator/udt:Indicator="true")]' is marked as not used in the given context. + + + + Element 'ram:ChargeIndicator' must occur exactly 1 times. + + Element 'ram:ActualAmount' must occur exactly 1 times. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Element 'ram:CategoryTradeTax' is marked as not used in the given context. + + + + + Value of 'ram:ReasonCode' is not allowed. + + + + Element 'ram:ChargeIndicator' must occur exactly 1 times. + + Element 'ram:ActualAmount' must occur exactly 1 times. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Element 'ram:CategoryTradeTax' is marked as not used in the given context. + + + + + Value of 'ram:ReasonCode' is not allowed. + + + + Element 'ram:LineTotalAmount' must occur exactly 1 times. + + + + Attribute @currencyID' marked as not used in the given context. + + + + Element 'ram:Name' must occur exactly 1 times. + + Element 'ram:Description' may occur at maximum 1 times. + + + + Element 'ram:Description' must occur exactly 1 times. + + Element 'ram:Value' must occur exactly 1 times. + + + + Attribute @schemeID' marked as not used in the given context. + + + + Attribute '@listID' is required in this context. + + + Value of '@listID' is not allowed. + + + + Attribute '@schemeID' is required in this context. + + + Value of '@schemeID' is not allowed. + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + Value of 'ram:ID' is not allowed. + + + + Attribute @schemeID' marked as not used in the given context. + + + diff --git a/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931.xsd b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931.xsd new file mode 100644 index 0000000..18285cd --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_codedb.xml b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_codedb.xml new file mode 100644 index 0000000..171b4ec --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_codedb.xml @@ -0,0 +1,5872 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd new file mode 100644 index 0000000..282f3e1 --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd new file mode 100644 index 0000000..069ed1e --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd @@ -0,0 +1,318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd new file mode 100644 index 0000000..fe62961 --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/Factur-X_1.07.3_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/_XSLT_EN16931/FACTUR-X_EN16931.xslt b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/_XSLT_EN16931/FACTUR-X_EN16931.xslt new file mode 100644 index 0000000..f8257f3 --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/_XSLT_EN16931/FACTUR-X_EN16931.xslt @@ -0,0 +1,11805 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + *: + + [namespace-uri()=' + + '] + + + + [ + + ] + + + + / + + @ + + + @*[local-name()=' + + ' and namespace-uri()=' + + '] + + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + + + + + + + + + + + + + + + + + . + + + + +U + + U + + + + U. + + n + + + + U. + + _ + + _ + + + + + + + + +   +   +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Schema for Factur-X; 1.07.3; EN16931-COMPLIANT (FULLY) + + + + + + + + + + + + + + FX-SCH-A-000280 + + + + + [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000047 + + + + + [BR-45]-Each VAT breakdown (BG-23) shall have a VAT category taxable amount (BT-116). + + + + + + + + + + FX-SCH-A-000048 + + + + + [BR-46]-Each VAT breakdown (BG-23) shall have a VAT category tax amount (BT-117). + + + + + + + + + + FX-SCH-A-000049 + + + + + [BR-47]-Each VAT breakdown (BG-23) shall be defined through a VAT category code (BT-118). + + + + + + + + + + FX-SCH-A-000050 + + + + + [BR-48]-Each VAT breakdown (BG-23) shall have a VAT category rate (BT-119), except if the Invoice is not subject to VAT. + + + + + + + + + + FX-SCH-A-000051 + + + + + [BR-CO-03]-Value added tax point date (BT-7) and Value added tax point date code (BT-8) are mutually exclusive. + + + + + + + + + + FX-SCH-A-000052 + + + + + [BR-CO-17]-VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals. + + + + + + + + + + FX-SCH-A-000053 + + + + + [BR-DEC-19]-The allowed maximum number of decimals for the VAT category taxable amount (BT-116) is 2. + + + + + + + + + + FX-SCH-A-000054 + + + + + [BR-DEC-20]-The allowed maximum number of decimals for the VAT category tax amount (BT-117) is 2. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000197 + + + + + [BR-Z-08]-In a VAT breakdown (BG-23) where VAT category code (BT-118) is "Zero rated" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amount (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Zero rated". + + + + + + + + + + FX-SCH-A-000055 + + + + + [BR-Z-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Zero rated" shall equal 0 (zero). + + + + + + + + + + FX-SCH-A-000056 + + + + + [BR-Z-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Zero rated" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000057 + + + + + [BR-S-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Standard rated" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). + + + + + + + + + + FX-SCH-A-000058 + + + + + [BR-S-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Standard rate" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + + + + + FX-SCH-A-000198 + + + + + [BR-S-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "Standard rated", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "Standard rated" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000059 + + + + + [BR-29]-If both Invoicing period start date (BT-73) and Invoicing period end date (BT-74) are given then the Invoicing period end date (BT-74) shall be later or equal to the Invoicing period start date (BT-73). + + + + + + + + + + FX-SCH-A-000060 + + + + + [BR-CO-19]-If Invoicing period (BG-14) is used, the Invoicing period start date (BT-73) or the Invoicing period end date (BT-74) shall be filled, or both. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000061 + + + + + [BR-31]-Each Document level allowance (BG-20) shall have a Document level allowance amount (BT-92). + + + + + + + + + + FX-SCH-A-000062 + + + + + [BR-32]-Each Document level allowance (BG-20) shall have a Document level allowance VAT category code (BT-95). + + + + + + + + + + FX-SCH-A-000063 + + + + + [BR-33]-Each Document level allowance (BG-20) shall have a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98). + + + + + + + + + + FX-SCH-A-000064 + + + + + [BR-CO-05]-Document level allowance reason code (BT-98) and Document level allowance reason (BT-97) shall indicate the same type of allowance. + + + + + + + + + + FX-SCH-A-000065 + + + + + [BR-CO-21]-Each Document level allowance (BG-20) shall contain a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98), or both. + + + + + + + + + + FX-SCH-A-000066 + + + + + [BR-DEC-01]-The allowed maximum number of decimals for the Document level allowance amount (BT-92) is 2. + + + + + + + + + + FX-SCH-A-000067 + + + + + [BR-DEC-02]-The allowed maximum number of decimals for the Document level allowance base amount (BT-93) is 2. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000068 + + + + + [BR-36]-Each Document level charge (BG-21) shall have a Document level charge amount (BT-99). + + + + + + + + + + FX-SCH-A-000069 + + + + + [BR-37]-Each Document level charge (BG-21) shall have a Document level charge VAT category code (BT-102). + + + + + + + + + + FX-SCH-A-000070 + + + + + [BR-38]-Each Document level charge (BG-21) shall have a Document level charge reason (BT-104) or a Document level charge reason code (BT-105). + + + + + + + + + + FX-SCH-A-000071 + + + + + [BR-CO-06]-Document level charge reason code (BT-105) and Document level charge reason (BT-104) shall indicate the same type of charge. + + + + + + + + + + FX-SCH-A-000072 + + + + + [BR-CO-22]-Each Document level charge (BG-21) shall contain a Document level charge reason (BT-104) or a Document level charge reason code (BT-105), or both. + + + + + + + + + + FX-SCH-A-000073 + + + + + [BR-DEC-05]-The allowed maximum number of decimals for the Document level charge amount (BT-99) is 2. + + + + + + + + + + FX-SCH-A-000074 + + + + + [BR-DEC-06]-The allowed maximum number of decimals for the Document level charge base amount (BT-100) is 2. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000199 + + + + + [BR-54]-Each Item attribute (BG-32) shall contain an Item attribute name (BT-160) and an Item attribute value (BT-161). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000281 + + + + + [BR-51]-In accordance with card payments security standards an invoice should never include a full card primary account number (BT-87). At the moment PCI Security Standards Council has defined that the first 6 digits and last 4 digits are the maximum number of digits to be shown. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000200 + + + + + [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). + + + + + + + + + + FX-SCH-A-000201 + + + + + [BR-22]-Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129). + + + + + + + + + + FX-SCH-A-000202 + + + + + [BR-23]-An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130). + + + + + + + + + + FX-SCH-A-000203 + + + + + [BR-24]-Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131). + + + + + + + + + + FX-SCH-A-000204 + + + + + [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). + + + + + + + + + + FX-SCH-A-000205 + + + + + [BR-26]-Each Invoice line (BG-25) shall contain the Item net price (BT-146). + + + + + + + + + + FX-SCH-A-000206 + + + + + [BR-27]-The Item net price (BT-146) shall NOT be negative. + + + + + + + + + + FX-SCH-A-000207 + + + + + [BR-28]-The Item gross price (BT-148) shall NOT be negative. + + + + + + + + + + FX-SCH-A-000208 + + + + + [BR-64]-The Item standard identifier (BT-157) shall have a Scheme identifier. + + + + + + + + + + FX-SCH-A-000209 + + + + + [BR-65]-The Item classification identifier (BT-158) shall have a Scheme identifier. + + + + + + + + + + FX-SCH-A-000210 + + + + + [BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151). + + + + + + + + + + FX-SCH-A-000211 + + + + + [BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000075 + + + + + [BR-17]-The Payee name (BT-59) shall be provided in the Invoice, if the Payee (BG-10) is different from the Seller (BG-4). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000076 + + + + + [BR-18]-The Seller tax representative name (BT-62) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). + + + + + + + + + + FX-SCH-A-000077 + + + + + [BR-19]-The Seller tax representative postal address (BG-12) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). + + + + + + + + + + FX-SCH-A-000078 + + + + + [BR-20]-The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11). + + + + + + + + + + FX-SCH-A-000079 + + + + + [BR-56]-Each Seller tax representative party (BG-11) shall have a Seller tax representative VAT identifier (BT-63). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000001 + + + + + [BR-CO-26]-In order for the buyer to automatically identify a supplier, the Seller identifier (BT-29), the Seller legal registration identifier (BT-30) and/or the Seller VAT identifier (BT-31) shall be present. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000212 + + + + + [BR-30]-If both Invoice line period start date (BT-134) and Invoice line period end date (BT-135) are given then the Invoice line period end date (BT-135) shall be later or equal to the Invoice line period start date (BT-134). + + + + + + + + + + FX-SCH-A-000213 + + + + + [BR-CO-20]-If Invoice line period (BG-26) is used, the Invoice line period start date (BT-134) or the Invoice line period end date (BT-135) shall be filled, or both. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000214 + + + + + [BR-42]-Each Invoice line allowance (BG-27) shall have an Invoice line allowance reason (BT-139) or an Invoice line allowance reason code (BT-140). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000215 + + + + + [BR-41]-Each Invoice line allowance (BG-27) shall have an Invoice line allowance amount (BT-136). + + + + + + + + + + FX-SCH-A-000216 + + + + + [BR-CO-07]-Invoice line allowance reason code (BT-140) and Invoice line allowance reason (BT-139) shall indicate the same type of allowance reason. + + + + + + + + + + FX-SCH-A-000217 + + + + + [BR-CO-23]-Each Invoice line allowance (BG-27) shall contain an Invoice line allowance reason (BT-139) or an Invoice line allowance reason code (BT-140), or both. + + + + + + + + + + FX-SCH-A-000218 + + + + + [BR-DEC-24]-The allowed maximum number of decimals for the Invoice line allowance amount (BT-136) is 2. + + + + + + + + + + FX-SCH-A-000219 + + + + + [BR-DEC-25]-The allowed maximum number of decimals for the Invoice line allowance base amount (BT-137) is 2. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000220 + + + + + [BR-43]-Each Invoice line charge (BG-28) shall have an Invoice line charge amount (BT-141). + + + + + + + + + + FX-SCH-A-000221 + + + + + [BR-44]-Each Invoice line charge (BG-28) shall have an Invoice line charge reason (BT-144) or an Invoice line charge reason code (BT-145). + + + + + + + + + + FX-SCH-A-000222 + + + + + [BR-CO-08]-Invoice line charge reason code (BT-145) and Invoice line charge reason (BT-144) shall indicate the same type of charge reason. + + + + + + + + + + FX-SCH-A-000223 + + + + + [BR-CO-24]-Each Invoice line charge (BG-28) shall contain an Invoice line charge reason (BT-144) or an Invoice line charge reason code (BT-145), or both. + + + + + + + + + + FX-SCH-A-000224 + + + + + [BR-DEC-27]-The allowed maximum number of decimals for the Invoice line charge amount (BT-141) is 2. + + + + + + + + + + FX-SCH-A-000225 + + + + + [BR-DEC-28]-The allowed maximum number of decimals for the Invoice line charge base amount (BT-142) is 2. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000002 + + + + + [BR-CO-09]-The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix ‘EL’. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000080 + + + + + [BR-66]-Each Specified Trade Allowance Charge (BG-20)(BG-21) shall contain a Charge Indicator. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000081 + + + + + [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). + + + + + + + + + + FX-SCH-A-000082 + + + + + [BR-AE-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Reverse charge" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000083 + + + + + [BR-E-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Exempt from VAT" 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). + + + + + + + + + + FX-SCH-A-000084 + + + + + [BR-E-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Exempt from VAT", the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000085 + + + + + [BR-G-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63). + + + + + + + + + + FX-SCH-A-000086 + + + + + [BR-G-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Export outside the EU" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000087 + + + + + [BR-IC-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48). + + + + + + + + + + FX-SCH-A-000088 + + + + + [BR-IC-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Intra-community supply" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000089 + + + + + [BR-AF-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" 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). + + + + + + + + + + FX-SCH-A-000090 + + + + + [BR-AF-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000091 + + + + + [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). + + + + + + + + + + FX-SCH-A-000092 + + + + + [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. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000093 + + + + + [BR-O-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Not subject to VAT" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-48). + + + + + + + + + + FX-SCH-A-000094 + + + + + [BR-O-06]-A Document level allowance (BG-20) where VAT category code (BT-95) is "Not subject to VAT" shall not contain a Document level allowance VAT rate (BT-96). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000095 + + + + + [BR-S-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Standard rated" 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). + + + + + + + + + + FX-SCH-A-000096 + + + + + [BR-S-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Standard rated" the Document level allowance VAT rate (BT-96) shall be greater than zero. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000097 + + + + + [BR-Z-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Zero rated" 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). + + + + + + + + + + FX-SCH-A-000098 + + + + + [BR-Z-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Zero rated" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000099 + + + + + [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). + + + + + + + + + + FX-SCH-A-000100 + + + + + [BR-AE-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Reverse charge" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000101 + + + + + [BR-E-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Exempt from VAT" 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). + + + + + + + + + + FX-SCH-A-000102 + + + + + [BR-E-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Exempt from VAT", the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000103 + + + + + [BR-G-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63). + + + + + + + + + + FX-SCH-A-000104 + + + + + [BR-G-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Export outside the EU" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000105 + + + + + [BR-IC-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48). + + + + + + + + + + FX-SCH-A-000106 + + + + + [BR-IC-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Intra-community supply" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000107 + + + + + [BR-AF-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" 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). + + + + + + + + + + FX-SCH-A-000108 + + + + + [BR-AF-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000109 + + + + + [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). + + + + + + + + + + FX-SCH-A-000110 + + + + + [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. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000111 + + + + + [BR-O-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Not subject to VAT" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-48). + + + + + + + + + + FX-SCH-A-000112 + + + + + [BR-O-07]-A Document level charge (BG-21) where the VAT category code (BT-102) is "Not subject to VAT" shall not contain a Document level charge VAT rate (BT-103). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000113 + + + + + [BR-S-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Standard rated" 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). + + + + + + + + + + FX-SCH-A-000114 + + + + + [BR-S-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Standard rated" the Document level charge VAT rate (BT-103) shall be greater than zero. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000115 + + + + + [BR-Z-04]-An Invoice that contains a Document level charge where the Document level charge VAT category code (BT-102) is "Zero rated" 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). + + + + + + + + + + FX-SCH-A-000116 + + + + + [BR-Z-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Zero rated" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000226 + + + + + [BR-CO-10]-Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131). + + + + + + + + + + FX-SCH-A-000117 + + + + + [BR-12]-An Invoice shall have the Sum of Invoice line net amount (BT-106). + + + + + + + + + + FX-SCH-A-000003 + + + + + [BR-13]-An Invoice shall have the Invoice total amount without VAT (BT-109). + + + + + + + + + + FX-SCH-A-000004 + + + + + [BR-14]-An Invoice shall have the Invoice total amount with VAT (BT-112). + + + + + + + + + + FX-SCH-A-000005 + + + + + [BR-15]-An Invoice shall have the Amount due for payment (BT-115). + + + + + + + + + + FX-SCH-A-000118 + + + + + [BR-CO-11]-Sum of allowances on document level (BT-107) = Σ Document level allowance amount (BT-92). + + + + + + + + + + FX-SCH-A-000119 + + + + + [BR-CO-12]-Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99). + + + + + + + + + + FX-SCH-A-000120 + + + + + [BR-CO-13]-Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108). + + + + + + + + + + FX-SCH-A-000121 + + + + + [BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110). + + + + + + + + + + FX-SCH-A-000122 + + + + + [BR-CO-16]-Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) +Rounding amount (BT-114). + + + + + + + + + + FX-SCH-A-000123 + + + + + [BR-DEC-09]-The allowed maximum number of decimals for the Sum of Invoice line net amount (BT-106) is 2. + + + + + + + + + + FX-SCH-A-000124 + + + + + [BR-DEC-10]-The allowed maximum number of decimals for the Sum of allowanced on document level (BT-107) is 2. + + + + + + + + + + FX-SCH-A-000125 + + + + + [BR-DEC-11]-The allowed maximum number of decimals for the Sum of charges on document level (BT-108) is 2. + + + + + + + + + + FX-SCH-A-000006 + + + + + [BR-DEC-12]-The allowed maximum number of decimals for the Invoice total amount without VAT (BT-109) is 2. + + + + + + + + + + FX-SCH-A-000007 + + + + + [BR-DEC-13]-The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2. + + + + + + + + + + FX-SCH-A-000008 + + + + + [BR-DEC-14]-The allowed maximum number of decimals for the Invoice total amount with VAT (BT-112) is 2. + + + + + + + + + + FX-SCH-A-000126 + + + + + [BR-DEC-15]-The allowed maximum number of decimals for the Invoice total VAT amount in accounting currency (BT-111) is 2. + + + + + + + + + + FX-SCH-A-000127 + + + + + [BR-DEC-16]-The allowed maximum number of decimals for the Paid amount (BT-113) is 2. + + + + + + + + + + FX-SCH-A-000128 + + + + + [BR-DEC-17]-The allowed maximum number of decimals for the Rounding amount (BT-114) is 2. + + + + + + + + + + FX-SCH-A-000009 + + + + + [BR-DEC-18]-The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2. + + + + + + + + + + FX-SCH-A-000129 + + + + + [BR-53]-If the VAT accounting currency code (BT-6) is present, then the Invoice total VAT amount in accounting currency (BT-111) shall be provided. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000130 + + + + + [BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000131 + + + + + [BR-49]-A Payment instruction (BG-16) shall specify the Payment means type code (BT-81). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000133 + + + + + [BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-16) information is provided in the Invoice. + + + + + + + + + + FX-SCH-A-000134 + + + + + [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. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000132 + + + + + [BR-CO-27]-Either the IBAN or a Proprietary ID (BT-84) shall be used. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000135 + + + + + [BR-CO-18]-An Invoice shall at least have one VAT breakdown group (BG-23). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000227 + + + + + [BR-AE-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Reverse charge" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Reverse charge". + + + + + + + + + + FX-SCH-A-000136 + + + + + [BR-AE-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Reverse charge" shall be 0 (zero). + + + + + + + + + + FX-SCH-A-000137 + + + + + [BR-AE-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Reverse charge" shall have a VAT exemption reason code (BT-121), meaning "Reverse charge" or the VAT exemption reason text (BT-120) "Reverse charge" (or the equivalent standard text in another language). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000228 + + + + + [BR-E-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Exempt from VAT" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Exempt from VAT". + + + + + + + + + + FX-SCH-A-000138 + + + + + [BR-E-09]-The VAT category tax amount (BT-117) In a VAT breakdown (BG-23) where the VAT category code (BT-118) equals "Exempt from VAT" shall equal 0 (zero). + + + + + + + + + + FX-SCH-A-000139 + + + + + [BR-E-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Exempt from VAT" shall have a VAT exemption reason code (BT-121) or a VAT exemption reason text (BT-120). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000229 + + + + + [BR-G-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Export outside the EU" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Export outside the EU". + + + + + + + + + + FX-SCH-A-000140 + + + + + [BR-G-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Export outside the EU" shall be 0 (zero). + + + + + + + + + + FX-SCH-A-000141 + + + + + [BR-G-10]-A VAT Breakdown (BG-23) with the VAT Category code (BT-118) "Export outside the EU" shall have a VAT exemption reason code (BT-121), meaning "Export outside the EU" or the VAT exemption reason text (BT-120) "Export outside the EU" (or the equivalent standard text in another language). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000230 + + + + + [BR-IC-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Intra-community supply". + + + + + + + + + + FX-SCH-A-000142 + + + + + [BR-IC-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" shall be 0 (zero). + + + + + + + + + + FX-SCH-A-000143 + + + + + [BR-IC-10]-A VAT Breakdown (BG-23) with the VAT Category code (BT-118) "Intra-community supply" shall have a VAT exemption reason code (BT-121), meaning "Intra-community supply" or the VAT exemption reason text (BT-120) "Intra-community supply" (or the equivalent standard text in another language). + + + + + + + + + + FX-SCH-A-000144 + + + + + [BR-IC-11]-In an Invoice with a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the Actual delivery date (BT-72) or the Invoicing period (BG-14) shall not be blank. + + + + + + + + + + FX-SCH-A-000145 + + + + + [BR-IC-12]-In an Invoice with a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the Deliver to country code (BT-80) shall not be blank. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000231 + + + + + [BR-AF-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IGIC", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IGIC" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). + + + + + + + + + + FX-SCH-A-000146 + + + + + [BR-AF-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IGIC" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). + + + + + + + + + + FX-SCH-A-000147 + + + + + [BR-AF-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "IGIC" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000232 + + + + + [BR-AG-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IPSI", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IPSI" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). + + + + + + + + + + FX-SCH-A-000148 + + + + + [BR-AG-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IPSI" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). + + + + + + + + + + FX-SCH-A-000149 + + + + + [BR-AG-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "IPSI" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000233 + + + + + [BR-O-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Not subject to VAT" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Not subject to VAT". + + + + + + + + + + FX-SCH-A-000150 + + + + + [BR-O-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Not subject to VAT" shall be 0 (zero). + + + + + + + + + + FX-SCH-A-000151 + + + + + [BR-O-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) " Not subject to VAT" shall have a VAT exemption reason code (BT-121), meaning " Not subject to VAT" or a VAT exemption reason text (BT-120) " Not subject to VAT" (or the equivalent standard text in another language). + + + + + + + + + + FX-SCH-A-000152 + + + + + [BR-O-11]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain other VAT breakdown groups (BG-23). + + + + + + + + + + FX-SCH-A-000234 + + + + + [BR-O-12]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is not "Not subject to VAT". + + + + + + + + + + FX-SCH-A-000153 + + + + + [BR-O-13]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain Document level allowances (BG-20) where Document level allowance VAT category code (BT-95) is not "Not subject to VAT". + + + + + + + + + + FX-SCH-A-000154 + + + + + [BR-O-14]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain Document level charges (BG-21) where Document level charge VAT category code (BT-102) is not "Not subject to VAT". + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000235 + + + + + [BR-AE-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) 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). + + + + + + + + + + FX-SCH-A-000236 + + + + + [BR-AE-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Reverse charge" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000237 + + + + + [BR-E-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Exempt from VAT" 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). + + + + + + + + + + FX-SCH-A-000238 + + + + + [BR-E-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Exempt from VAT", the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000239 + + + + + [BR-G-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63). + + + + + + + + + + FX-SCH-A-000240 + + + + + [BR-G-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Export outside the EU" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000241 + + + + + [BR-IC-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48). + + + + + + + + + + FX-SCH-A-000242 + + + + + [BR-IC-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Intracommunity supply" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000243 + + + + + [BR-AF-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" 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). + + + + + + + + + + FX-SCH-A-000244 + + + + + [BR-AF-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" the invoiced item VAT rate (BT-152) shall be greater than 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000245 + + + + + [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). + + + + + + + + + + FX-SCH-A-000246 + + + + + [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. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000247 + + + + + [BR-O-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Not subject to VAT" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-46). + + + + + + + + + + FX-SCH-A-000248 + + + + + [BR-O-05]-An Invoice line (BG-25) where the VAT category code (BT-151) is "Not subject to VAT" shall not contain an Invoiced item VAT rate (BT-152). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000249 + + + + + [BR-S-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Standard rated" 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). + + + + + + + + + + FX-SCH-A-000250 + + + + + [BR-S-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Standard rated" the Invoiced item VAT rate (BT-152) shall be greater than zero. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000251 + + + + + [BR-Z-02]-An Invoice that contains an Invoice line where the Invoiced item VAT category code (BT-151) is "Zero rated" 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). + + + + + + + + + + FX-SCH-A-000252 + + + + + [BR-Z-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Zero rated" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000253 + + + + + [BR-16]-An Invoice shall have at least one Invoice line (BG-25). + + + + + + + + + + FX-SCH-A-000155 + + + + + [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. + + + + + + + + + + FX-SCH-A-000010 + + + + + [BR-01]-An Invoice shall have a Specification identifier (BT-24). + + + + + + + + + + FX-SCH-A-000011 + + + + + [BR-02]-An Invoice shall have an Invoice number (BT-1). + + + + + + + + + + FX-SCH-A-000012 + + + + + [BR-03]-An Invoice shall have an Invoice issue date (BT-2). + + + + + + + + + + FX-SCH-A-000013 + + + + + [BR-04]-An Invoice shall have an Invoice type code (BT-3). + + + + + + + + + + FX-SCH-A-000014 + + + + + [BR-05]-An Invoice shall have an Invoice currency code (BT-5). + + + + + + + + + + FX-SCH-A-000015 + + + + + [BR-06]-An Invoice shall contain the Seller name (BT-27). + + + + + + + + + + FX-SCH-A-000016 + + + + + [BR-07]-An Invoice shall contain the Buyer name (BT-44). + + + + + + + + + + FX-SCH-A-000017 + + + + + [BR-08]-An Invoice shall contain the Seller postal address (BG-5). + + + + + + + + + + FX-SCH-A-000018 + + + + + [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). + + + + + + + + + + FX-SCH-A-000156 + + + + + [BR-10]-An Invoice shall contain the Buyer postal address (BG-8). + + + + + + + + + + FX-SCH-A-000157 + + + + + [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). + + + + + + + + + + FX-SCH-A-000158 + + + + + [BR-62]-The Seller electronic address (BT-34) shall have a Scheme identifier. + + + + + + + + + + FX-SCH-A-000159 + + + + + [BR-63]-The Buyer electronic address (BT-49) shall have a Scheme identifier. + + + + + + + + + + FX-SCH-A-000254 + + + + + [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". + + + + + + + + + + FX-SCH-A-000255 + + + + + [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". + + + + + + + + + + FX-SCH-A-000256 + + + + + [BR-E-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 “Exempt from VAT” shall contain exactly one VAT breakdown (BG-23) with the VAT category code (BT-118) equal to "Exempt from VAT". + + + + + + + + + + FX-SCH-A-000257 + + + + + [BR-AE-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 "Reverse charge" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "VAT reverse charge". + + + + + + + + + + FX-SCH-A-000258 + + + + + [BR-IC-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 "Intra-community supply" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Intra-community supply". + + + + + + + + + + FX-SCH-A-000259 + + + + + [BR-G-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 "Export outside the EU" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Export outside the EU". + + + + + + + + + + FX-SCH-A-000260 + + + + + [BR-O-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 "Not subject to VAT" shall contain exactly one VAT breakdown group (BG-23) with the VAT category code (BT-118) equal to "Not subject to VAT". + + + + + + + + + + FX-SCH-A-000261 + + + + + [BR-AF-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 "IGIC" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IGIC". + + + + + + + + + + FX-SCH-A-000262 + + + + + [BR-AG-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 "IPSI" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IPSI". + + + + + + + + + + FX-SCH-A-000263 + + + + + [BR-B-01]-An Invoice where the VAT category code (BT-151, BT-95 or BT-102) is “Split payment” shall be a domestic Italian invoice. + + + + + + + + + + FX-SCH-A-000264 + + + + + [BR-B-02]-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 “Split payment" shall not contain 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”. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000170 + + + + + [BR-57]-Each Deliver to address (BG-15) shall contain a Deliver to country code (BT-80). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000182 + + + + + [BR-55]-Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25). + + + + + + + + + + FX-SCH-A-000029 + + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000020 + + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000160 + + + + + Element 'ram:Content' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000161 + + + + + Element 'ram:SubjectCode' may occur at maximum 1 times. + + + + + + + + + + + + + + + + + FX-SCH-A-000162 + + + + + Value of 'ram:SubjectCode' is not allowed. + + + + + + + + + + + + Attribute @listID' marked as not used in the given context. + + + + + + + + + + + Attribute @listVersionID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000021 + + + + + Attribute '@format' is required in this context. + + + + + + + + + + + FX-SCH-A-000022 + + + + + Value of '@format' is not allowed. + + + + + + + + + + + + + + + + + FX-SCH-A-000023 + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000024 + + + + + Element 'ram:BusinessProcessSpecifiedDocumentContextParameter' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000025 + + + + + Element 'ram:GuidelineSpecifiedDocumentContextParameter' must occur exactly 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + FX-SCH-A-000026 + + + + + Value of 'ram:ID' is not allowed. + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000265 + + + + + Element 'ram:IncludedSupplyChainTradeLineItem' must occur at least 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000027 + + + + + Element 'ram:SellerTradeParty' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000028 + + + + + Element 'ram:BuyerTradeParty' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element variant 'ram:AdditionalReferencedDocument[ not(ram:TypeCode="916") and not(ram:TypeCode="50") and not(ram:TypeCode="130")]' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000029 + + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000020 + + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Name' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000282 + + + + + Value of 'ram:ReferenceTypeCode' is not allowed. + + + + + + + + + + + + + + + + + FX-SCH-A-000023 + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + + + + + + + + + + + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000029 + + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000020 + + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Name' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000023 + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + + + + + + + + + + + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000029 + + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000020 + + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000283 + + + + + Element 'ram:Name' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000284 + + + + + Element 'ram:AttachmentBinaryObject' may occur at maximum 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000285 + + + + + Attribute '@mimeCode' is required in this context. + + + + + + + + + + + FX-SCH-A-000287 + + + + + Value of '@mimeCode' is not allowed. + + + + + + + + + + FX-SCH-A-000286 + + + + + Attribute '@filename' is required in this context. + + + + + + + + + + + + + + + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000023 + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000029 + + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Name' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000163 + + + + + Element 'ram:ID' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000164 + + + + + Element 'ram:GlobalID' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000030 + + + + + Element 'ram:Name' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000288 + + + + + Element 'ram:DefinedTradeContact' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000032 + + + + + Element 'ram:PostalTradeAddress' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000165 + + + + + Element 'ram:URIUniversalCommunication' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000166 + + + + + Element 'ram:SpecifiedTaxRegistration' may occur at maximum 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000168 + + + + + Element 'ram:URIID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:CompleteNumber' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000289 + + + + + Element 'ram:CompleteNumber' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Description' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000035 + + + + + Element 'ram:CountryID' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000167 + + + + + Element 'ram:CountrySubDivisionName' may occur at maximum 1 times. + + + + + + + + + + + + + + + + + FX-SCH-A-000036 + + + + + Value of 'ram:CountryID' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @listID' marked as not used in the given context. + + + + + + + + + + + Attribute @listVersionID' marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000168 + + + + + Element 'ram:URIID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:CompleteNumber' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000029 + + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Name' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000029 + + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Name' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000030 + + + + + Element 'ram:Name' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000032 + + + + + Element 'ram:PostalTradeAddress' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000169 + + + + + Element 'ram:SpecifiedTaxRegistration' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:DefinedTradeContact' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Description' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:GlobalID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ID' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000035 + + + + + Element 'ram:CountryID' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000167 + + + + + Element 'ram:CountrySubDivisionName' may occur at maximum 1 times. + + + + + + + + + + + + + + + + + FX-SCH-A-000036 + + + + + Value of 'ram:CountryID' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @listID' marked as not used in the given context. + + + + + + + + + + + Attribute @listVersionID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:SpecifiedLegalOrganization' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + + + Element 'ram:URIUniversalCommunication' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000030 + + + + + Element 'ram:Name' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000187 + + + + + Element 'ram:Description' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000288 + + + + + Element 'ram:DefinedTradeContact' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000032 + + + + + Element 'ram:PostalTradeAddress' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000165 + + + + + Element 'ram:URIUniversalCommunication' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000033 + + + + + Element variant 'ram:SpecifiedTaxRegistration[ram:ID/@schemeID="VA"]' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000034 + + + + + Element variant 'ram:SpecifiedTaxRegistration[ram:ID/@schemeID="FC"]' may occur at maximum 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000168 + + + + + Element 'ram:URIID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:CompleteNumber' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000289 + + + + + Element 'ram:CompleteNumber' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000035 + + + + + Element 'ram:CountryID' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000167 + + + + + Element 'ram:CountrySubDivisionName' may occur at maximum 1 times. + + + + + + + + + + + + + + + + + FX-SCH-A-000036 + + + + + Value of 'ram:CountryID' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @listID' marked as not used in the given context. + + + + + + + + + + + Attribute @listVersionID' marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + + + Element variant 'ram:SpecifiedTaxRegistration[ not(ram:ID/@schemeID="VA") and not(ram:ID/@schemeID="FC")]' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + + + + + + FX-SCH-A-000168 + + + + + Element 'ram:URIID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:CompleteNumber' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000171 + + + + + Element 'ram:OccurrenceDateTime' must occur exactly 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000021 + + + + + Attribute '@format' is required in this context. + + + + + + + + + + + FX-SCH-A-000022 + + + + + Value of '@format' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000029 + + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Name' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000029 + + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Name' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000163 + + + + + Element 'ram:ID' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000164 + + + + + Element 'ram:GlobalID' may occur at maximum 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:DefinedTradeContact' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Description' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000035 + + + + + Element 'ram:CountryID' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000167 + + + + + Element 'ram:CountrySubDivisionName' may occur at maximum 1 times. + + + + + + + + + + + + + + + + + FX-SCH-A-000036 + + + + + Value of 'ram:CountryID' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @listID' marked as not used in the given context. + + + + + + + + + + + Attribute @listVersionID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:SpecifiedLegalOrganization' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:SpecifiedTaxRegistration' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:URIUniversalCommunication' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000172 + + + + + Element 'ram:PaymentReference' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000038 + + + + + Element 'ram:InvoiceCurrencyCode' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000173 + + + + + Element 'ram:ApplicableTradeTax' must occur at least 1 times. + + + + + + + + + + FX-SCH-A-000174 + + + + + Element 'ram:SpecifiedTradePaymentTerms' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000039 + + + + + Element 'ram:SpecifiedTradeSettlementHeaderMonetarySummation' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000175 + + + + + Element 'ram:ReceivableSpecifiedTradeAccountingAccount' may occur at maximum 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000176 + + + + + Element 'ram:CalculatedAmount' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000020 + + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000177 + + + + + Element 'ram:BasisAmount' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000178 + + + + + Element 'ram:CategoryCode' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000179 + + + + + Value of 'ram:CategoryCode' is not allowed. + + + + + + + + + + + + + + + + + FX-SCH-A-000180 + + + + + Value of 'ram:DueDateTypeCode' is not allowed. + + + + + + + + + + + + + + + + + FX-SCH-A-000181 + + + + + Value of 'ram:ExemptionReasonCode' is not allowed. + + + + + + + + + + + + Attribute @listID' marked as not used in the given context. + + + + + + + + + + + Attribute @listVersionID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000021 + + + + + Attribute '@format' is required in this context. + + + + + + + + + + + FX-SCH-A-000022 + + + + + Value of '@format' is not allowed. + + + + + + + + + + + + + + + + + FX-SCH-A-000023 + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000021 + + + + + Attribute '@format' is required in this context. + + + + + + + + + + + FX-SCH-A-000022 + + + + + Value of '@format' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000021 + + + + + Attribute '@format' is required in this context. + + + + + + + + + + + FX-SCH-A-000022 + + + + + Value of '@format' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000040 + + + + + Value of 'ram:InvoiceCurrencyCode' is not allowed. + + + + + + + + + + + + + + + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000021 + + + + + Attribute '@format' is required in this context. + + + + + + + + + + + FX-SCH-A-000022 + + + + + Value of '@format' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Name' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000163 + + + + + Element 'ram:ID' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000164 + + + + + Element 'ram:GlobalID' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000030 + + + + + Element 'ram:Name' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:DefinedTradeContact' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Description' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:PostalTradeAddress' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + + + Element 'ram:TradingBusinessName' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:SpecifiedTaxRegistration' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:URIUniversalCommunication' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element variant 'ram:SpecifiedTradeAllowanceCharge[ not(ram:ChargeIndicator/udt:Indicator="false") and not(ram:ChargeIndicator/udt:Indicator="true")]' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000183 + + + + + Element 'ram:ChargeIndicator' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000184 + + + + + Element 'ram:ActualAmount' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000185 + + + + + Element 'ram:CategoryTradeTax' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000020 + + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000178 + + + + + Element 'ram:CategoryCode' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:BasisAmount' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:CalculatedAmount' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000179 + + + + + Value of 'ram:CategoryCode' is not allowed. + + + + + + + + + + + + + + + + + + Element 'ram:DueDateTypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ExemptionReason' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ExemptionReasonCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:TaxPointDate' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000023 + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + + + + + + + + + + + + + FX-SCH-A-000186 + + + + + Value of 'ram:ReasonCode' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000183 + + + + + Element 'ram:ChargeIndicator' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000184 + + + + + Element 'ram:ActualAmount' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000185 + + + + + Element 'ram:CategoryTradeTax' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000020 + + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000178 + + + + + Element 'ram:CategoryCode' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:BasisAmount' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:CalculatedAmount' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000179 + + + + + Value of 'ram:CategoryCode' is not allowed. + + + + + + + + + + + + + + + + + + Element 'ram:DueDateTypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ExemptionReason' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ExemptionReasonCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:TaxPointDate' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000023 + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + + + + + + + + + + + + + FX-SCH-A-000186 + + + + + Value of 'ram:ReasonCode' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000187 + + + + + Element 'ram:Description' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000188 + + + + + Element 'ram:DirectDebitMandateID' may occur at maximum 1 times. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000021 + + + + + Attribute '@format' is required in this context. + + + + + + + + + + + FX-SCH-A-000022 + + + + + Value of '@format' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000189 + + + + + Element 'ram:LineTotalAmount' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000190 + + + + + Element 'ram:ChargeTotalAmount' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000191 + + + + + Element 'ram:AllowanceTotalAmount' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000041 + + + + + Element 'ram:TaxBasisTotalAmount' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000042 + + + + + Element variant 'ram:TaxTotalAmount[@currencyID=../../ram:InvoiceCurrencyCode]' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000192 + + + + + Element variant 'ram:TaxTotalAmount[@currencyID=../../ram:TaxCurrencyCode]' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000290 + + + + + Element 'ram:RoundingAmount' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000043 + + + + + Element 'ram:GrandTotalAmount' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000193 + + + + + Element 'ram:TotalPrepaidAmount' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000044 + + + + + Element 'ram:DuePayableAmount' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element variant 'ram:TaxTotalAmount[ not(@currencyID=../../ram:InvoiceCurrencyCode) and not(@currencyID=../../ram:TaxCurrencyCode)]' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000046 + + + + + Attribute '@currencyID' is required in this context. + + + + + + + + + + + FX-SCH-A-000045 + + + + + Value of '@currencyID' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000046 + + + + + Attribute '@currencyID' is required in this context. + + + + + + + + + + + FX-SCH-A-000045 + + + + + Value of '@currencyID' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000020 + + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000291 + + + + + Element 'ram:Information' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000194 + + + + + Element 'ram:PayeePartyCreditorFinancialAccount' may occur at maximum 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000292 + + + + + Element 'ram:BICID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000195 + + + + + Element 'ram:IBANID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000023 + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + + + + + + + + + + + + + FX-SCH-A-000196 + + + + + Value of 'ram:TaxCurrencyCode' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000266 + + + + + Element 'ram:AssociatedDocumentLineDocument' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000267 + + + + + Element 'ram:SpecifiedTradeProduct' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000268 + + + + + Element 'ram:SpecifiedLineTradeAgreement' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000269 + + + + + Element 'ram:SpecifiedLineTradeDelivery' must occur exactly 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000270 + + + + + Element 'ram:LineID' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000271 + + + + + Element 'ram:IncludedNote' may occur at maximum 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000160 + + + + + Element 'ram:Content' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:SubjectCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000272 + + + + + Element 'ram:NetPriceProductTradePrice' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:IssuerAssignedID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Name' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ReferenceTypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:TypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000273 + + + + + Element 'ram:ChargeAmount' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000274 + + + + + Element variant 'ram:AppliedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="false"]' may occur at maximum 1 times. + + + + + + + + + + + + + + + + + + Element variant 'ram:AppliedTradeAllowanceCharge[ not(ram:ChargeIndicator/udt:Indicator="false") and not(ram:ChargeIndicator/udt:Indicator="true")]' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000183 + + + + + Element 'ram:ChargeIndicator' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000184 + + + + + Element 'ram:ActualAmount' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:BasisAmount' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:CalculationPercent' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:CategoryTradeTax' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Reason' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ReasonCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000275 + + + + + Value of '@unitCode' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000273 + + + + + Element 'ram:ChargeAmount' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:AppliedTradeAllowanceCharge' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000275 + + + + + Value of '@unitCode' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000276 + + + + + Element 'ram:BilledQuantity' must occur exactly 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000277 + + + + + Attribute '@unitCode' is required in this context. + + + + + + + + + + + FX-SCH-A-000275 + + + + + Value of '@unitCode' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000278 + + + + + Element 'ram:ApplicableTradeTax' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000279 + + + + + Element 'ram:SpecifiedTradeSettlementLineMonetarySummation' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000293 + + + + + Element 'ram:AdditionalReferencedDocument' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000175 + + + + + Element 'ram:ReceivableSpecifiedTradeAccountingAccount' may occur at maximum 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000029 + + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000020 + + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:AttachmentBinaryObject' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:FormattedIssueDateTime' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:LineID' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:Name' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000282 + + + + + Value of 'ram:ReferenceTypeCode' is not allowed. + + + + + + + + + + + + + + + + + FX-SCH-A-000023 + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + + + + + + + + + + + + + + Element 'ram:URIID' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000020 + + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000178 + + + + + Element 'ram:CategoryCode' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Element 'ram:BasisAmount' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:CalculatedAmount' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000179 + + + + + Value of 'ram:CategoryCode' is not allowed. + + + + + + + + + + + + + + + + + + Element 'ram:DueDateTypeCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ExemptionReason' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:ExemptionReasonCode' is marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:TaxPointDate' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000023 + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000021 + + + + + Attribute '@format' is required in this context. + + + + + + + + + + + FX-SCH-A-000022 + + + + + Value of '@format' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000021 + + + + + Attribute '@format' is required in this context. + + + + + + + + + + + FX-SCH-A-000022 + + + + + Value of '@format' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element variant 'ram:SpecifiedTradeAllowanceCharge[ not(ram:ChargeIndicator/udt:Indicator="false") and not(ram:ChargeIndicator/udt:Indicator="true")]' is marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000183 + + + + + Element 'ram:ChargeIndicator' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000184 + + + + + Element 'ram:ActualAmount' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:CategoryTradeTax' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000186 + + + + + Value of 'ram:ReasonCode' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000183 + + + + + Element 'ram:ChargeIndicator' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000184 + + + + + Element 'ram:ActualAmount' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + Element 'ram:CategoryTradeTax' is marked as not used in the given context. + + + + + + + + + + + + + + + + FX-SCH-A-000186 + + + + + Value of 'ram:ReasonCode' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000189 + + + + + Element 'ram:LineTotalAmount' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000030 + + + + + Element 'ram:Name' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000187 + + + + + Element 'ram:Description' may occur at maximum 1 times. + + + + + + + + + + + + + + + + FX-SCH-A-000294 + + + + + Element 'ram:Description' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000295 + + + + + Element 'ram:Value' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + FX-SCH-A-000296 + + + + + Attribute '@listID' is required in this context. + + + + + + + + + + + FX-SCH-A-000297 + + + + + Value of '@listID' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + FX-SCH-A-000026 + + + + + Value of 'ram:ID' is not allowed. + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + diff --git a/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/_XSLT_EN16931/FACTUR-X_EN16931_codedb.xml b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/_XSLT_EN16931/FACTUR-X_EN16931_codedb.xml new file mode 100644 index 0000000..0963c68 --- /dev/null +++ b/src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/Schema/3. Factur-X_1.07.3_EN16931/_XSLT_EN16931/FACTUR-X_EN16931_codedb.xml @@ -0,0 +1,5872 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pax.XRechnung.NET/XmlInvoiceVlidator.Schematron.cs b/src/pax.XRechnung.NET/XmlInvoiceVlidator.Schematron.cs index b3413b0..dbb93eb 100644 --- a/src/pax.XRechnung.NET/XmlInvoiceVlidator.Schematron.cs +++ b/src/pax.XRechnung.NET/XmlInvoiceVlidator.Schematron.cs @@ -2,6 +2,7 @@ using pax.XRechnung.NET.KositValidator; using pax.XRechnung.NET.XmlModels; using System.Xml.Schema; +using System.Diagnostics.CodeAnalysis; namespace pax.XRechnung.NET; @@ -9,18 +10,17 @@ public static partial class XmlInvoiceValidator { /// /// Validate xml string against Schmatrons - /// Requires a running Kosit validation Server. See Readme for details. + /// Runs locally unless an explicit KoSIT server URI is supplied. /// /// XmlInvoice - /// optional uri to the kosit validator, default is http://localhost:8080 + /// Optional URI to an external KoSIT validator. + [SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "The existing result-based API reports serialization and validation failures through Error.")] public static async Task ValidateSchematron(XmlInvoice invoice, Uri? kositUri = null) { try { var xml = XmlInvoiceWriter.Serialize(invoice); - var validationResult = await InvoiceKositValidator.Validate(xml, kositUri) - .ConfigureAwait(false); - return MapToValidationResult(validationResult); + return await ValidateSchematron(xml, kositUri).ConfigureAwait(false); } catch (Exception ex) { @@ -29,19 +29,23 @@ public static async Task ValidateSchematron(XmlInvoice IsValid = false, Error = ex.Message }; - throw; } } /// /// Validate xml string against Schmatrons - /// Requires a running Kosit validation Server. See Readme for details. + /// Runs locally unless an explicit KoSIT server URI is supplied. /// /// xml text - /// optional uri to the kosit validator, default is http://localhost:8080 + /// Optional URI to an external KoSIT validator. + [SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "The existing result-based API reports validation failures through Error.")] public static async Task ValidateSchematron(string xml, Uri? kositUri = null) { try { + if (kositUri is null) + { + return InvoiceLocalValidator.Validate(xml); + } var validationResult = await InvoiceKositValidator.Validate(xml, kositUri) .ConfigureAwait(false); return MapToValidationResult(validationResult); @@ -53,7 +57,6 @@ public static async Task ValidateSchematron(string xml, IsValid = false, Error = ex.Message }; - throw; } } @@ -77,10 +80,21 @@ private static InvoiceValidationResult MapToValidationResult(SchematronValidatio } var exception = new XmlSchemaException(message); - validationEvents.Add(new(exception, message, severity)); + validationEvents.Add(new(exception, message, severity) + { + Code = msg.Code, + Path = msg.Path, + RuleSeverity = msg.Severity.ToUpperInvariant() switch + { + "INFORMATION" or "INFO" => "information", + "WARNING" => "warning", + _ => "error" + } + }); } - if (!string.IsNullOrEmpty(kositResult.Error) || !kositResult.IsValid) + if (!string.IsNullOrEmpty(kositResult.Error) || + (!kositResult.IsValid && !validationEvents.Any(m => m.Severity == XmlSeverityType.Error))) { validationEvents.Add(new(new XmlSchemaException("unknown"), kositResult.Error ?? kositResult.HttpStatusCode.ToString(), XmlSeverityType.Error)); } @@ -89,7 +103,9 @@ private static InvoiceValidationResult MapToValidationResult(SchematronValidatio { HttpStatusCode = kositResult.HttpStatusCode.ToString(), Evaluation = kositResult.Evaluation, - Conformity = kositResult.Conformity + Conformity = kositResult.Conformity, + Error = kositResult.Error, + IsValid = kositResult.IsValid && string.IsNullOrEmpty(kositResult.Error) }; return result; } diff --git a/src/pax.XRechnung.NET/XmlInvoiceWriter.cs b/src/pax.XRechnung.NET/XmlInvoiceWriter.cs index 7dc850c..08d8378 100644 --- a/src/pax.XRechnung.NET/XmlInvoiceWriter.cs +++ b/src/pax.XRechnung.NET/XmlInvoiceWriter.cs @@ -52,7 +52,7 @@ public static XmlSchemaSet GetSchemaSet() return xmlSchemaSet; } var schemaRoute = "pax.XRechnung.NET.Resources.XmlSchemas.ubl._2._1.xsd"; - var schemaSet = new XmlSchemaSet(); + var schemaSet = new XmlSchemaSet { XmlResolver = null }; AddSchema(InvoiceSchema, schemaRoute + ".maindoc." + "UBL-Invoice-2.1.xsd", schemaSet); AddSchema(CommonAggregateComponents, schemaRoute + ".common." + "UBL-CommonAggregateComponents-2.1.xsd", schemaSet); AddSchema(CommonBasicComponents, schemaRoute + ".common." + "UBL-CommonBasicComponents-2.1.xsd", schemaSet); @@ -61,6 +61,7 @@ public static XmlSchemaSet GetSchemaSet() AddSchema("urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2", schemaRoute + ".common." + "UBL-UnqualifiedDataTypes-2.1.xsd", schemaSet); AddSchema("urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2", schemaRoute + ".common." + "CCTS_CCT_SchemaModule-2.1.xsd", schemaSet); AddSchema("urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2", schemaRoute + ".common." + "UBL-ExtensionContentDataType-2.1.xsd", schemaSet); + schemaSet.Compile(); xmlSchemaSet = schemaSet; return xmlSchemaSet; } diff --git a/src/pax.XRechnung.NET/ZugferdXmlValidator.cs b/src/pax.XRechnung.NET/ZugferdXmlValidator.cs new file mode 100644 index 0000000..42f2738 --- /dev/null +++ b/src/pax.XRechnung.NET/ZugferdXmlValidator.cs @@ -0,0 +1,142 @@ +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Xml; +using System.Xml.Linq; +using System.Xml.Schema; +using Saxon.Api; + +namespace pax.XRechnung.NET; + +/// Local XML validation for ZUGFeRD 2.3.3 / Factur-X 1.07.3 EN16931 (Comfort). +public static class ZugferdXmlValidator +{ + private const string ResourcePrefix = "pax.XRechnung.NET.Resources.Zugferd.2.3.3."; + private const string SchemaDirectory = "Schema/3. Factur-X_1.07.3_EN16931/"; + private const string StylesheetDirectory = SchemaDirectory + "_XSLT_EN16931/"; + private const string ResourceUri = "https://pax.invalid/zugferd/2.3.3/"; + private const string GuidelineId = "urn:cen.eu:en16931:2017"; + private const string Conformity = "ZUGFeRD 2.3.3; Factur-X 1.07.3; EN16931 (Comfort)"; + private static readonly XNamespace Rsm = "urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"; + private static readonly XNamespace Ram = "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"; + private static readonly XNamespace Svrl = "http://purl.oclc.org/dsdl/svrl"; + private static readonly Lazy Schemas = new(CompileSchemas); + private static readonly Lazy Rules = new(CompileRules); + + /// Checks the XML schema and pinned profile business rules without network access. + /// The exact CII XML to validate. + /// Findings with original rule IDs, locations, and severity. Warnings do not invalidate XML. + [SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Parser, schema, and engine failures are reported through the result-based API.")] + public static InvoiceValidationResult Validate(string xmlText) + { + try + { + ArgumentException.ThrowIfNullOrWhiteSpace(xmlText); + using var reader = CreateReader(XmlInvoiceValidator.GetRawXmlText(xmlText), ResourceUri + "invoice.xml"); + var document = new XmlDocument { XmlResolver = null }; + document.Load(reader); + var root = document.DocumentElement; + if (root?.LocalName != "CrossIndustryInvoice" || root.NamespaceURI != Rsm.NamespaceName || + root["ExchangedDocumentContext", Rsm.NamespaceName]?["GuidelineSpecifiedDocumentContextParameter", Ram.NamespaceName]? + ["ID", Ram.NamespaceName]?.InnerText != GuidelineId) + { + return new InvoiceValidationResult + { + Error = "Local ZUGFeRD validation supports only CII EN16931 (Comfort) with guideline ID " + GuidelineId + "." + }; + } + + var messages = new List(); + document.Schemas = Schemas.Value; + document.Validate((_, e) => messages.Add(new ValidationMessage(e))); + if (!messages.Any(m => m.Severity == XmlSeverityType.Error)) + { + var rules = Rules.Value; + var transformer = rules.Executable.Load(); + transformer.InitialContextNode = rules.Processor.NewDocumentBuilder().Build(document); + using var output = new StringWriter(CultureInfo.InvariantCulture); + transformer.Run(rules.Processor.NewSerializer(output)); + using var reportReader = CreateReader(output.ToString(), ResourceUri + "report.xml"); + var report = XDocument.Load(reportReader); + foreach (var finding in report.Descendants().Where(e => + e.Name == Svrl + "failed-assert" || e.Name == Svrl + "successful-report")) + { + var level = GetSeverity(finding); + var text = finding.Element(Svrl + "text")?.Value.Trim() ?? string.Empty; + messages.Add(new ValidationMessage(new XmlSchemaException(text), text, + level == "error" ? XmlSeverityType.Error : XmlSeverityType.Warning) + { + Code = (string?)finding.Attribute("id"), + Path = (string?)finding.Attribute("location"), + RuleSeverity = level + }); + } + } + + var result = new InvoiceValidationResult(messages) { Conformity = Conformity }; + result.Evaluation = result.IsValid ? "The XML conforms to the supported ZUGFeRD profile." : "The XML contains validation errors."; + return result; + } + catch (Exception ex) + { + return new InvoiceValidationResult { Error = ex.Message, IsValid = false }; + } + } + + private static string GetSeverity(XElement finding) => + ((string?)finding.Attribute("flag") ?? (string?)finding.Attribute("role"))?.ToUpperInvariant() switch + { + "WARNING" => "warning", + "INFORMATION" or "INFO" => "information", + "ERROR" or "FATAL" => "error", + _ => finding.Name == Svrl + "failed-assert" ? "error" : "warning" + }; + + private static XmlReader CreateReader(string text, string uri) => XmlReader.Create(new StringReader(text), + new XmlReaderSettings { DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null }, uri); + + private static Stream OpenResource(string name) => typeof(ZugferdXmlValidator).Assembly.GetManifestResourceStream(ResourcePrefix + name) + ?? throw new InvalidOperationException($"Missing ZUGFeRD validation resource: {name}"); + + private static XmlSchemaSet CompileSchemas() + { + var schemas = new XmlSchemaSet { XmlResolver = null }; + // Dependencies are added before their importers; schemaLocation never accesses a file or URL. + foreach (var suffix in new[] + { + "_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100", + "_urn_un_unece_uncefact_data_standard_QualifiedDataType_100", + "_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100", "" + }) + { + var name = SchemaDirectory + "Factur-X_1.07.3_EN16931" + suffix + ".xsd"; + using var stream = OpenResource(name); + using var reader = XmlReader.Create(stream, + new XmlReaderSettings { DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null }, ResourceUri + name); + schemas.Add(null, reader); + } + schemas.Compile(); + return schemas; + } + + private static CompiledRules CompileRules() + { + var processor = new Processor(); + processor.SetProperty("http://saxon.sf.net/feature/allow-external-functions", "false"); + processor.SetProperty("http://saxon.sf.net/feature/allowedProtocols", ""); + const string codeDbName = StylesheetDirectory + "FACTUR-X_EN16931_codedb.xml"; + using var codesStream = OpenResource(codeDbName); + using var codesReader = XmlReader.Create(codesStream, + new XmlReaderSettings { DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null }, ResourceUri + codeDbName); + var codes = processor.NewDocumentBuilder().Build(codesReader); + processor.SetResourceResolver(request => request.Uri == new Uri(ResourceUri + codeDbName) + ? new NodeResource(codes) + : throw new XmlException($"External resource access is disabled: {request.Uri}"), false); + const string name = StylesheetDirectory + "FACTUR-X_EN16931.xslt"; + using var stream = OpenResource(name); + using var reader = XmlReader.Create(stream, + new XmlReaderSettings { DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null }, ResourceUri + name); + return new CompiledRules(processor, processor.NewXsltCompiler().Compile(reader)); + } + + private sealed record CompiledRules(Processor Processor, XsltExecutable Executable); +} diff --git a/src/pax.XRechnung.NET/pax.XRechnung.NET.csproj b/src/pax.XRechnung.NET/pax.XRechnung.NET.csproj index 9cd1a52..9f992a5 100644 --- a/src/pax.XRechnung.NET/pax.XRechnung.NET.csproj +++ b/src/pax.XRechnung.NET/pax.XRechnung.NET.csproj @@ -1,4 +1,4 @@ - + net10.0 @@ -9,17 +9,17 @@ README.md https://github.com/ipax77/pax.XRechnung.NET dotnet;XRechnung;import;export;validate - 0.3.2 + 0.3.3 Philipp Hetzner Philipp Hetzner - 0.3.2 - 0.3.2.0 - 0.3.2 + 0.3.3 + 0.3.3.0 + 0.3.3 MIT true true All - latest + 10 true true false @@ -27,7 +27,7 @@ true enable nullable - latest + 14 CA2227,CA1002 @@ -93,6 +93,9 @@ + + + @@ -105,5 +108,14 @@ + + + + + + + + + diff --git a/tools/Validator.WasmProbe/App.razor b/tools/Validator.WasmProbe/App.razor new file mode 100644 index 0000000..07189bb --- /dev/null +++ b/tools/Validator.WasmProbe/App.razor @@ -0,0 +1,106 @@ +@using Microsoft.AspNetCore.Components.Web +@using System.Diagnostics +@using System.Reflection +@using System.Xml.Linq +@using System.Text.Json +@using pax.XRechnung.NET + +

XRechnung and ZUGFeRD WASM validation

+

Runs embedded fixtures through the library's public API. Disconnect networking after loading to check offline validation.

+ +
@result
+ +@code { + private string result = "Ready"; + + private async Task Run() + { + result = "Running"; + await Task.Yield(); + var cbc = XNamespace.Get(XmlInvoiceWriter.CommonBasicComponents); + var cac = XNamespace.Get(XmlInvoiceWriter.CommonAggregateComponents); + using var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("invoice.xml")!; + var xml = XDocument.Load(stream); + var valid = xml.ToString(); + var totals = new XDocument(xml); + totals.Descendants(cac + "TaxTotal").First().Element(cbc + "TaxAmount")!.Value = "18.00"; + var reference = new XDocument(xml); + reference.Descendants(cbc + "BuyerReference").Remove(); + var code = new XDocument(xml); + code.Descendants(cbc + "DocumentCurrencyCode").Single().Value = "ZZZ"; + var warning = new XDocument(xml); + warning.Descendants(cbc + "InvoicedQuantity").First().SetAttributeValue("unitCode", "ZZZ"); + var schema = new XDocument(xml); + schema.Descendants(cbc + "IssueDate").Single().Value = "invalid"; + var inputs = new[] { + ("valid", valid, true, (string?)null), + ("repeat", valid, true, (string?)null), + ("badTotals", totals.ToString(), false, "BR-CO-15"), + ("missingReference", reference.ToString(), false, "BR-DE-15"), + ("badCode", code.ToString(), false, "BR-CL-04"), + ("warning", warning.ToString(), true, "BR-CL-23"), + ("schemaError", schema.ToString(), false, (string?)null), + ("malformed", "", false, (string?)null), + ("unsupported", "", false, (string?)null), + ("dtd", "]>&test;", false, (string?)null) + }; + var outputs = new List(); + var passed = true; + foreach (var (name, input, expectedValid, expectedCode) in inputs) + { + var timer = Stopwatch.StartNew(); + var validation = await XmlInvoiceValidator.ValidateSchematron(input); + var ok = validation.IsValid == expectedValid && (expectedCode is null || validation.Validations.Any(m => m.Code == expectedCode)); + passed &= ok; + outputs.Add(new { + name, passed = ok, ms = timer.ElapsedMilliseconds, + validation.IsValid, validation.Error, validation.HttpStatusCode, + findings = validation.Validations.Select(m => new { m.Code, m.RuleSeverity, m.Path, m.Message }).ToArray() + }); + } + using var ciiStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("zugferd-invoice.xml")!; + var cii = XDocument.Load(ciiStream); + XNamespace ram = "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"; + var badCiiTotal = new XDocument(cii); + badCiiTotal.Descendants(ram + "DuePayableAmount").Single().Value = "1.00"; + var badCiiCode = new XDocument(cii); + badCiiCode.Descendants(ram + "InvoiceCurrencyCode").Single().Value = "ZZZ"; + var missingCiiName = new XDocument(cii); + missingCiiName.Descendants(ram + "SellerTradeParty").Single().Element(ram + "Name")!.Remove(); + var badCiiSchema = new XDocument(cii); + badCiiSchema.Descendants(ram + "InvoiceCurrencyCode").Single().AddBeforeSelf(new XElement(ram + "Unexpected")); + var ciiWarning = new XDocument(cii); + ciiWarning.Root!.Elements().Single(e => e.Name.LocalName == "ExchangedDocument").Element(ram + "ID")!.SetAttributeValue("schemeID", "unused"); + var ciiProfile = new XDocument(cii); + ciiProfile.Descendants(ram + "GuidelineSpecifiedDocumentContextParameter").Single().Element(ram + "ID")!.Value = "urn:factur-x.eu:1p0:basic"; + var ciiInputs = new[] { + ("ciiValid", cii.ToString(), true), + ("ciiRepeat", cii.ToString(), true), + ("ciiBadTotals", badCiiTotal.ToString(), false), + ("ciiBadCode", badCiiCode.ToString(), false), + ("ciiMissingName", missingCiiName.ToString(), false), + ("ciiSchemaError", badCiiSchema.ToString(), false), + ("ciiWarning", ciiWarning.ToString(), true), + ("ciiUnsupportedProfile", ciiProfile.ToString(), false), + ("ciiMalformed", "", false), + ("ciiDtd", "]>&test;", false) + }; + foreach (var (name, input, expectedValid) in ciiInputs) + { + var timer = Stopwatch.StartNew(); + var validation = ZugferdXmlValidator.Validate(input); + var ok = validation.IsValid == expectedValid; + if (name == "ciiBadTotals") ok &= validation.Validations.Any(m => m.Message.Contains("BR-CO-16")); + if (name == "ciiBadCode") ok &= validation.Error is null && validation.Validations.Any(m => m.Message.Contains("not allowed")); + if (name == "ciiMissingName") ok &= validation.Validations.Any(m => m.Message.Contains("BR-06")); + if (name == "ciiWarning") ok &= validation.Validations.Any(m => m.RuleSeverity == "warning"); + passed &= ok; + outputs.Add(new { + name, passed = ok, ms = timer.ElapsedMilliseconds, + validation.IsValid, validation.Error, validation.HttpStatusCode, + findings = validation.Validations.Select(m => new { m.Code, m.RuleSeverity, m.Path, m.Message }).ToArray() + }); + } + result = JsonSerializer.Serialize(new { passed, outputs }, new JsonSerializerOptions { WriteIndented = true }); + } +} diff --git a/tools/Validator.WasmProbe/Program.cs b/tools/Validator.WasmProbe/Program.cs new file mode 100644 index 0000000..c87bd1e --- /dev/null +++ b/tools/Validator.WasmProbe/Program.cs @@ -0,0 +1,8 @@ +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using Validator.WasmProbe; + +var builder = WebAssemblyHostBuilder.CreateDefault(args); +builder.RootComponents.Add("#app"); +builder.RootComponents.Add("head::after"); +await builder.Build().RunAsync(); diff --git a/tools/Validator.WasmProbe/README.md b/tools/Validator.WasmProbe/README.md new file mode 100644 index 0000000..d22c182 --- /dev/null +++ b/tools/Validator.WasmProbe/README.md @@ -0,0 +1,75 @@ +# Browser acceptance probe + +## Official ZUGFeRD acceptance, 2026-10-10 + +The probe additionally uses the unchanged FeRD `EN16931_Einfach.xml` example +and `ZugferdXmlValidator.Validate` with the official ZUGFeRD 2.3.3 / Factur-X +1.07.3 resources. See the library's +[resource provenance](../../src/pax.XRechnung.NET/Resources/Zugferd/2.3.3/PROVENANCE.md). + +Ten CII cases cover valid/repeated invoices, bad payable totals (`BR-CO-16`), +invalid currency (embedded code-list lookup), missing seller name (`BR-06`), +schema-invalid XML, warning-only XML, unsupported profiles, malformed XML, and DTDs. + +Release-trimmed .NET 10.0.400, Chromium: all twenty UBL/CII cases passed in an +isolated browser context with networking disabled **before the first validation**. +Cold and repeated offline runs produced identical findings and **zero requests**. +The UBL first call took 4,557 ms; the CII first call took 1,745 ms after the UBL +engine had warmed. CII repeat took 68 ms; subsequent full-validation cases took +60-62 ms. On the second run, CII valid/repeat took 57/56 ms. These are probe +measurements on this machine, not latency guarantees for BeInX. + +Published framework assets total 53,454,457 raw bytes (excluding .br/.gz files) +and 13,765,842 Brotli bytes, including culture resources. The earlier UBL-only +probe recorded 13,408,722 Brotli bytes; the measured increase is 357,120 bytes. +Compilation still runs on the calling browser thread. + +This small .NET 10 Blazor WebAssembly app calls the actual library API with valid, +repeated, incorrect-total, missing-reference, invalid-currency, warning-only, +schema-invalid, malformed, unsupported, and DTD-containing inputs. It embeds a +public fixture; invoices and rules are not fetched at runtime. + +From the repository root, publish and serve the resulting static files: + +```powershell +dotnet publish tools/Validator.WasmProbe -c Release -o artifacts/wasm-probe +python -m http.server 5190 --directory artifacts/wasm-probe/wwwroot +``` + +Open http://localhost:5190 and click **Run validation**. The JSON must contain +`passed: true`; every case reports its elapsed time and structured findings. +After the app loads, disable networking in browser developer tools and run it +again. All cases must still pass with the same findings. Disabling networking +after load verifies local validation, not installation or offline page reload. + +The app loads all globalization data, matching BeInX. Publish uses trimming and +the default interpreter; AOT is not enabled. It is kept outside the main solution +so normal library builds do not require the WASM workload. + +## Recorded results, 2026-10-10 + +- .NET SDK 10.0.400, browser runtime 10.0.11, Release trimming, Chromium. +- All ten cases passed through the public API, online and offline. Warm-run + findings were identical; local HTTP status fields were empty. +- Cold first validation: 10,663 ms; repeated validation: 120 ms; subsequent + business-rule cases: 95–110 ms. Warm offline calls: 99–102 ms. +- Final rerun after compiling the shared schema cache under its initialization + lock: all ten cases still passed online and offline with identical findings; + cold validation 10,473 ms, repeat 104 ms, warm offline validation 90 ms. +- Framework assets: 48,606,989 bytes raw / 13,408,722 bytes Brotli. Matching + minimal Blazor template with full globalization: 8,216,145 bytes raw / + 2,493,999 bytes Brotli. Approximate incremental compressed size: 10.9 MB. +- The isolated initial engine probe produced the same codes, severities, text, + and paths on desktop .NET and WASM. The production tests additionally cover + 33 standard fixtures, DTOs, all three severity overrides, and concurrent calls. +- Using the exact 2025-03-24 rules read from the running WSL KoSIT installation, + five cases matched Java 1.5.0 in acceptance, codes, severity, and normalized + paths: valid, repeated valid, incorrect payable total (`BR-CO-16`), missing + buyer reference (`BR-DE-15`), and invalid currency (`BR-CL-04`, `BR-CO-15`). + Those historical rules were used only in the isolated comparison workspace. +- The 2026 rules additionally report informational `BR-DE-TMP-32` on the + original fixture. This does not invalidate the invoice. + +The timings and asset sizes are measurements of this probe, not a performance +guarantee for BeInX. Cold compilation executes synchronously on the browser +thread. No BeInX source, Docker configuration, or running service was changed. diff --git a/tools/Validator.WasmProbe/Validator.WasmProbe.csproj b/tools/Validator.WasmProbe/Validator.WasmProbe.csproj new file mode 100644 index 0000000..07f7982 --- /dev/null +++ b/tools/Validator.WasmProbe/Validator.WasmProbe.csproj @@ -0,0 +1,16 @@ + + + net10.0 + enable + enable + true + true + + + + + + + + + diff --git a/tools/Validator.WasmProbe/wwwroot/index.html b/tools/Validator.WasmProbe/wwwroot/index.html new file mode 100644 index 0000000..bb5224d --- /dev/null +++ b/tools/Validator.WasmProbe/wwwroot/index.html @@ -0,0 +1,15 @@ + + + + + + + XRechnung and ZUGFeRD WASM probe + + + +
Loading…
+ + + + diff --git a/tools/Verify-ZugferdArtifacts.ps1 b/tools/Verify-ZugferdArtifacts.ps1 new file mode 100644 index 0000000..5bed726 --- /dev/null +++ b/tools/Verify-ZugferdArtifacts.ps1 @@ -0,0 +1,50 @@ +param( + [string] $ZipPath = (Join-Path $PSScriptRoot '../artifacts/provenance/ZF233_EN_01.zip') +) +$ErrorActionPreference = 'Stop' +Add-Type -AssemblyName System.IO.Compression.FileSystem +$expectedZipHash = 'cca2ac49a5012ad82c2c42342968486f012d49b1d9f027119c03158c83dfe659' +if ((Get-FileHash -LiteralPath $ZipPath -Algorithm SHA256).Hash.ToLowerInvariant() -ne $expectedZipHash) { + throw 'The official ZIP does not match the pinned SHA-256.' +} +$resourceDirectory = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '../src/pax.XRechnung.NET/Resources/Zugferd/2.3.3')) +$schemaPrefix = 'Schema/3. Factur-X_1.07.3_EN16931/' +$zip = [IO.Compression.ZipFile]::OpenRead([IO.Path]::GetFullPath($ZipPath)) +try { + $entries = @($zip.Entries | Where-Object { + $_.FullName.StartsWith($schemaPrefix, [StringComparison]::Ordinal) -and + $_.FullName -match '\.(xsd|xslt|xml|sch)$' + } | Sort-Object FullName) + foreach ($entry in $entries) { + $stream = $entry.Open() + try { $officialHash = [Convert]::ToHexString([Security.Cryptography.SHA256]::HashData($stream)).ToLowerInvariant() } + finally { $stream.Dispose() } + $file = Join-Path $resourceDirectory $entry.FullName + $copiedHash = (Get-FileHash -LiteralPath $file -Algorithm SHA256).Hash.ToLowerInvariant() + if ($officialHash -ne $copiedHash) { throw "Official artifact mismatch: $($entry.FullName)" } + [pscustomobject]@{ Path = $entry.FullName; SHA256 = $officialHash; Match = $true } + } + # Walk import/include/redefine paths from the official root, rather than assuming a dependency count. + $seen = [Collections.Generic.HashSet[string]]::new([StringComparer]::Ordinal) + $pending = [Collections.Generic.Queue[string]]::new() + $pending.Enqueue($schemaPrefix + 'Factur-X_1.07.3_EN16931.xsd') + while ($pending.Count -gt 0) { + $name = $pending.Dequeue() + if (!$seen.Add($name)) { continue } + if ($null -eq $zip.GetEntry($name)) { throw "Missing official XSD dependency: $name" } + [xml] $schema = Get-Content -Raw -LiteralPath (Join-Path $resourceDirectory $name) + $ns = [Xml.XmlNamespaceManager]::new($schema.NameTable) + $ns.AddNamespace('xs', 'http://www.w3.org/2001/XMLSchema') + foreach ($dependency in $schema.SelectNodes('/xs:schema/xs:import[@schemaLocation] | /xs:schema/xs:include[@schemaLocation] | /xs:schema/xs:redefine[@schemaLocation]', $ns)) { + $baseUri = [Uri]::new('https://pax.invalid/' + $name) + $uri = [Uri]::new($baseUri, $dependency.schemaLocation) + if ($uri.Host -ne 'pax.invalid') { throw 'Unexpected external schema dependency' } + $pending.Enqueue([Uri]::UnescapeDataString($uri.AbsolutePath.TrimStart('/'))) + } + } + if ($seen.Count -ne @($entries | Where-Object FullName -Like '*.xsd').Count) { + throw 'The extracted XSD set differs from the complete dependency closure.' + } + Write-Output "Verified $($entries.Count) untouched files, including all $($seen.Count) XSDs in the official root's dependency closure." +} +finally { $zip.Dispose() }