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-KSA-CL-02.
Five checks a month on the Free plan. The file is checked in memory and is never stored.
The message ZATCA prints
[BR-KSA-CL-02]-All currencyID attributes (BT-5) must have the same value as the invoice currency code (BT-5), except for the invoice total VAT amount in accounting currency (BT-111).
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.
An amount has no currency
Reported ascurrency_id_missingno currency on the amount
What is wrong
An amount element - a line, allowance, charge, total or VAT breakdown amount - has no currencyID attribute. ZATCA rejects the document under BR-KSA-CL-02, which requires every amount's currencyID to be the invoice currency. The schema check reports the same element, because UBL requires the attribute.
What to check in your ERP
Write currencyID on every amount element, with the same code as cbc:DocumentCurrencyCode. An amount written by a different part of the export - often the allowances, charges or line VAT - is where it is usually missing.
An amount's currency is not the invoice currency
Reported ascurrency_id_not_invoice_currencythe amount's currency is not the invoice currency
What is wrong
An amount element carries a currencyID that differs from cbc:DocumentCurrencyCode. ZATCA rejects the document under BR-KSA-CL-02: every amount must be in the invoice currency except the cbc:TaxAmount directly under each cac:TaxTotal, which is where the invoice total VAT amount in accounting currency (BT-111) goes.
What to check in your ERP
For an invoice in SAR every currencyID is SAR. For an invoice in another currency the line, allowance, charge, breakdown and total amounts are in that currency, and only the VAT total in accounting currency is in SAR. The usual cause is an export that writes SAR on some amounts whatever the document currency, or the document currency on all of them.
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(@currencyID) and matches(normalize-space(//cbc:DocumentCurrencyCode), @currencyID) and (@currencyID !='') )
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.