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-18.
Five checks a month on the Free plan. The file is checked in memory and is never stored.
The message ZATCA prints
[BR-KSA-18]-VAT category code must contain one of the values (S, Z, E, O).
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 category code is not S, Z, E or O
Reported asnot_s_z_e_onot S, Z, E or O
What is wrong
A VAT category code - in the VAT breakdown, in a line's own tax subtotal, on a document-level allowance or charge, or on a line item's cac:ClassifiedTaxCategory - is not one of S, Z, E or O. ZATCA rejects the document under BR-KSA-18. The EN 16931 code list (UNCL 5305) has other categories, such as AE for reverse charge or K for intra-community supply, but ZATCA accepts these four only.
What to check in your ERP
Map every VAT code in your system to one of the four: S standard rated, Z zero rated, E exempt, O not subject to VAT. A European category code, or an internal tax code written into cbc:ID, is the usual cause.
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( contains( ' S Z E O ',(.)) )
Reported test
not( contains('S Z E O',/ubl:Invoice/cac:InvoiceLine/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID) )
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.