VRBL-INV-AE-1p0-22

Basic Info

Rule In every Charge Group where the Charge Tax ID is "O", the Charge Tax Percent should not exist.
Context /ubl:Invoice/cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'true']
Pattern vrbl-invoice-AE-1p0
Severity fatal

Implementation

not(boolean(cac:TaxCategory[cbc:ID='O'][cac:TaxScheme/cbc:ID='VAT']))
or
not(cac:TaxCategory[cbc:ID='O'][cac:TaxScheme/cbc:ID='VAT']/cbc:Percent)