A Sub Invoice Line (BG-DEX-01) shall contain exactly one "SUB INVOICE LINE VAT INFORMATION" (BG-DEX-06).
When a cac:SubInvoiceLine contains a cac:Item, that element does not have exactly one cac:ClassifiedTaxCategory element. VAT information is therefore either missing or present more than once.
Each cac:Item present on a sub invoice line must contain exactly one VAT category. This makes the related VAT information unambiguous.
The item on a sub invoice line is missing its VAT category, or the category appears more than once. You can set the number of cac:ClassifiedTaxCategory elements to exactly one.
- Find the
cac:Itemof the affectedcac:SubInvoiceLine. - Check the number of associated
cac:ClassifiedTaxCategoryelements. - Make sure exactly one such element is present.
- Regenerate the invoice and validate it again.
<cac:SubInvoiceLine> <cac:Item/> </cac:SubInvoiceLine>
<cac:SubInvoiceLine> <cac:Item> <cac:ClassifiedTaxCategory/> </cac:Item> </cac:SubInvoiceLine>
Technical details
The test selects cac:Item elements under cac:SubInvoiceLine and fails when such an element does not have exactly one direct cac:ClassifiedTaxCategory child. A missing cac:Item is not detected by this test.
The rule applies to cac:Item within each cac:SubInvoiceLine in an extended UBL invoice.
rule/@context)assert/@test)