BR-KSA-DEC-03Line VAT amount is written with more than two decimal places

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-DEC-03.

Validate 5 invoices free

Five checks a month on the Free plan. The file is checked in memory and is never stored.

The message ZATCA prints

[BR-KSA-DEC-03]-VAT amount at line level (KSA-11) must have a maximum two decimals.

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.

Line VAT amount is written with more than two decimal places

Reported asmore_than_two_decimalsmore than two decimal places

What is wrong

A cac:TaxTotal/cbc:TaxAmount on an invoice line has more than two characters after its first full stop, and ZATCA flags it under BR-KSA-DEC-03 as a warning, which does not by itself reject the document. The rule counts characters as they are written rather than judging the value, and nothing in it is normalised: a value with a trailing space after two decimals is three characters and fails, a value carrying two full stops fails, and a value with no full stop at all passes however large it is. An absent line VAT amount passes this rule too; its absence is a different rule's subject. Where you are likely to be reading this from is worth saying, because it will save you looking in the wrong place. EN 16931 applies the same two-decimal test to a tax amount whose currency attribute is the document currency or the tax currency, and those checks run in an earlier phase, so on an ordinary invoice they are raised first and this rule is never reached. What is left for it is a line VAT amount tagged with a currency that is neither of those two, which means the document you are holding is an unusual one. This rule is not gated by invoice type: a standard invoice is judged by it exactly as a simplified one is. Under rule packs before 2.0.0, on a simplified invoice, this rule and BR-KSA-50, which required the line VAT amount to equal the net amount times the rate, could be jointly impossible to satisfy for some line net amounts; SDK 3.4.8 removed BR-KSA-50.

What to check in your ERP

Start with the currency attribute on the line's cbc:TaxAmount, because a line VAT amount tagged in a currency other than the invoice's is what makes this rule reachable, and it is nearly always wrong on its own account - look for a currency taken from the item, the price list or the customer record instead of from the document. Then treat the decimals as a formatting setting rather than a calculation one: a decimal field serialised at its full stored precision prints every digit it holds unless the export formats it, and a locale or template fixing every number in the file to three places does the same. Format the amount to at most two decimals on the way out. Check as well that your XML writer is not indenting inside the element, because a line break and the spaces after it are characters in the element's text and count toward the limit.

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(string-length(substring-after(cac:TaxTotal/cbc:TaxAmount,'.'))<=2)

Reported test

string-length(substring-after(cac:TaxTotal/cbc:TaxAmount,'.'))<=2
Evaluated against
cac:InvoiceLine
Source
vendor/zatca/schematron/20210819_ZATCA_E-invoice_Validation_Rules.xsl:2392

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:LineExtensionAmount currencyID="SAR">100.00</cbc:LineExtensionAmount><cac:TaxTotal>This example:   <cbc:TaxAmount currencyID="USD">15.000</cbc:TaxAmount>A document that passed:   <cbc:TaxAmount currencyID="SAR">15.000</cbc:TaxAmount>  <cbc:RoundingAmount currencyID="SAR">115.00</cbc:RoundingAmount></cac:TaxTotal>
Document
bad-76-line-vat-three-decimals.xml
Mutabiq's verdict
Not passed
Reported as
more_than_two_decimalsmore than two decimal places

Download this example (.xml)Check it in Mutabiq

This page's example, checked by the same rules your own upload goes through. No upload and no sign-in.

Rules evaluated against the same part of the document. One wrong value often reports several of them at once.

Check an invoice

Check your own invoice

© 2026 Hayatiq AI Solutions F.Z.E. All rights reserved.