Message

Each Document level charge (BG-21) shall have a Document level charge VAT category code (BT-102).

Context
/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = true()]
Test
exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID)
Usage
/ ubl:Invoice / cac:AllowanceCharge / cac:TaxCategory / cbc:ID
/ ubl:CreditNote / cac:AllowanceCharge / cac:TaxCategory / cbc:ID