Message

Document level allowances and charges details MUST have allowance and charge VAT category if the invoice has a VAT total amount

Context
/ubl:Invoice/cac:AllowanceCharge
Test
((/ubl:Invoice/cac:TaxTotal/*/*/*/cbc:ID = 'VAT') and (cac:TaxCategory/cbc:ID)) or not(/ubl:Invoice/cac:TaxTotal)
Usage
/ ubl:Invoice / cac:AllowanceCharge / cac:TaxCategory / cbc:ID