Mutabiq checks Saudi ZATCA Phase 2 e-invoice XML before you submit it: pre-validation against published ZATCA requirements, not an approval by the authority. This page explains one rule, BR-45.
Five checks a month on the Free plan. The file is checked in memory and is never stored.
The message ZATCA prints
[BR-45]-Each VAT breakdown (BG-23) shall have a VAT category taxable amount (BT-116).
Also cited in this report
BR-CO-17
[BR-CO-17]-VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.
BR-E-08
[BR-E-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Exempt from VAT" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Exempt from VAT".
BR-Z-08
[BR-Z-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Zero rated" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Zero Rated".
What Mutabiq reports
One entry for each way this rule can be reported.
Reported as
What kind of value was found — empty, not_15_digits and the like — never the value itself.
VAT breakdown states no taxable amount
Reported astaxable_amount_missingthe taxable amount is missing
What is wrong
A cac:TaxSubtotal directly under the invoice's own cac:TaxTotal - a VAT breakdown entry - carries no cbc:TaxableAmount, the VAT category taxable amount (BT-116). EN 16931 rule BR-45, which ZATCA's checker runs, requires the element on every document-level breakdown entry, and ZATCA rejects the document under it: the rule is flagged as an error in ZATCA's rule files and ZATCA's own tool returns a failed result on a document in this state. The check is for presence only - an empty or non-numeric amount is a different note - and the XML schema does not require the element, so an export that leaves it off produces a well-formed document that ZATCA refuses. A tax subtotal inside an invoice line is outside this rule. Expect the rules that compare the taxable amount with the lines (BR-O-08, BR-S-08, BR-Z-08, BR-E-08) and with the VAT amount (BR-CO-17) to report the same breakdown, because an absent amount equals nothing.
What to check in your ERP
Write cbc:TaxableAmount on every cac:TaxSubtotal of the document's VAT breakdown, including the zero-rated, exempt and out-of-scope groups, formatted to two decimals with the same currencyID attribute as the other amounts. The usual cause is an export that suppresses amount elements whose value is nought, which is exactly where a zero-rated or exempt group lands; fix the suppression once and every group gains the element.
The clause that runs
Quoted from the validation-rule stylesheet ZATCA publishes, at the file and line named below. The executed guard is what the check runs; the reported test is what it prints when it fails, and the two are not always the same.
Executed guard
not(exists(cbc:TaxableAmount))
Reported test
exists(cbc:TaxableAmount)
Evaluated against
/ubl:Invoice/cac:TaxTotal/cac:TaxSubtotal
Source
vendor/zatca/schematron/CEN-EN16931-UBL.xsl:1207
As shipped in ZATCA SDK 3.4.8: the copy quoted here is, byte for byte, the file that release ships. The date in the file name is the name ZATCA gives the file; the rules in it are those of SDK 3.4.8.
A worked example
A synthetic document from the measured test corpus that trips this rule, shown where it differs from one that passed. Mutabiq's report names the class of the value, never the value itself.
Where it differs from a document that passed
− This example
+ A document that passed
<cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount><cac:TaxSubtotal>+A document that passed: <cbc:TaxableAmount currencyID="SAR">100.01</cbc:TaxableAmount> <cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount> <cac:TaxCategory>
Document
bad-119-z-taxable-amount-missing.xml
Mutabiq's verdict
Not passed
Reported as
taxable_amount_missingthe taxable amount is missing