BR-53: With a tax currency (BT-6), give the VAT total in it (BT-111)
Applies only when cbc:TaxCurrencyCode is present. As executed, it fails if any cac:TaxTotal that has no cac:TaxSubtotal lacks cbc:TaxAmount, or has a cbc:TaxAmount whose @currencyID differs from cbc:TaxCurrencyCode. The displayed test is the failure condition (not a pass condition) and considers every cac:TaxTotal; the executed check looks only at cac:TaxTotal elements without subtotals and does not fail when none exists.
How to fix it
When you set cbc:TaxCurrencyCode, add a cac:TaxTotal without subtotals whose amount uses that currency, e.g. with SAR: <cac:TaxTotal><cbc:TaxAmount currencyID="SAR">15.00</cbc:TaxAmount></cac:TaxTotal>.
ZATCA's official text
[BR-53]-If the VAT accounting currency code (BT-6) is present, then the Invoice total VAT amount in accounting currency (BT-111) shall be provided.
Source: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules
Fails when (the condition ZATCA's SDK runs)
(exists(cbc:TaxCurrencyCode) and not(every $taxcurrency in ./cac:TaxTotal[not(cac:TaxSubtotal)]/cbc:TaxAmount/@currencyID satisfies $taxcurrency = cbc:TaxCurrencyCode)) or (exists(cbc:TaxCurrencyCode) and not(every $taxamount in ./cac:TaxTotal[not(cac:TaxSubtotal)] satisfies exists($taxamount/cbc:TaxAmount)))
Related rules
- BR-KSA-68 · Every invoice needs a tax currency code (BT-6)
- BR-KSA-89 · Exchange-rate target currency must equal the tax currency
- BR-KSA-97 · Non-SAR invoice: SAR VAT total must differ from the VAT total
- BR-KSA-CL-02 · Every amount's currencyID must match the invoice currency
- BR-KSA-EN16931-02 · VAT accounting currency (TaxCurrencyCode) must be SAR
Validate your invoice against ZATCA's rules
Paste the XML and see every error and warning. It runs in your browser; the invoice goes nowhere.
Validate an invoice or try Matheel