BR-O-12: An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118)…
Peppol BIS Billing 3.0.20 · UBL
Original rule text
[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: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 is a fatal rule in the business layer of Peppol BIS Billing 3.0.20 · UBL. An invoice that breaks it is rejected. It refers to BG-23, BT-118, BG-25, BT-151.
What this rule requires
The rule is fatal: if the invoice has a header VAT breakdown with VAT category code O ("Not subject to VAT"), then every invoice line's VAT category code must also be O. In UBL, that means if cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID is O under cac:TaxScheme/cbc:ID VAT, the document must not contain any cac:ClassifiedTaxCategory with cbc:ID not equal to O under a VAT scheme. In CII, if ram:ApplicableTradeTax/ram:CategoryCode is O with ram:TypeCode VAT in the header, the test requires that no ram:ApplicableTradeTax anywhere has ram:CategoryCode not equal to O; note the CII test does not limit that check to VAT type codes, so it is broader than the rule message.
How to fix
Make the line-level VAT category codes consistent with the header: in UBL, set every cac:ClassifiedTaxCategory/cbc:ID under the VAT scheme to O; in CII, set every ram:ApplicableTradeTax/ram:CategoryCode that currently has a non-O value to O. If the lines should not all be O, remove or change the header VAT breakdown with O instead, so the invoice no longer has a header O VAT category. In CII specifically, because the test checks all ram:ApplicableTradeTax regardless of ram:TypeCode, also ensure no non-VAT tax has a category code other than O when the header O VAT breakdown is present.
Guidance on this rule. The original text above is authoritative.
Where to go next
No published Peppol BIS Billing UBL release comparison lists a change to BR-O-12.
Validate an invoice against these rules · All release changes