Message

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

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