fatalEN 16931EN 16931 business ruleCIIUBLBG-23BT-118
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).
The invoice has a VAT breakdown group with category O (not subject to VAT) and also other VAT breakdown groups. Category O cannot be mixed with taxed categories on one invoice.
Split the document: put the out-of-scope items on their own invoice and the taxable items on another. If the items really are taxable, category O is the wrong code - reconsider it.
CII — context $VATO
not(//ram:ApplicableTradeTax[ram:CategoryCode != 'O'])
UBL — context /ubl:Invoice | /cn:CreditNote
(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'])