fatalEN 16931EN 16931 business ruleCIIUBLBG-23BT-118
Each VAT breakdown (BG-23) shall be defined through a VAT category code (BT-118).
A VAT breakdown group (BG-23) has no VAT category code (BT-118).
Add BT-118 (UBL TaxSubtotal/cac:TaxCategory/cbc:ID) from UNTDID 5305: S, Z, E, AE, K, G, O, L or M. The TaxScheme ID inside the same group must be VAT.
CII — context $VAT_breakdown
(.[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)
UBL — context $VAT_breakdown
exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID)