A VAT amount in the document currency is written with more than two decimal places
Reported asmore_than_two_decimalsmore than two decimal places
What is wrong
A cbc:TaxAmount whose parent is a cac:TaxTotal block, and whose currencyID attribute matches the document's currency code, carries more than two characters after its first full stop, and ZATCA flags it under EN 16931 rule BR-DEC-13 as a warning, which does not by itself reject the document. The rule's own message names BT-110, the invoice total VAT amount, and that is usually what it means - but the pattern it matches with is not anchored to the top of the document. It selects a tax amount by its parent alone, so a cac:TaxTotal that sits inside a cac:InvoiceLine is matched exactly as the document's own is, and a line's VAT amount with three decimals is reported under this rule, and under BR-DEC-15 as well. That is measured rather than assumed: a line VAT amount of 15.000 on an invoice in Saudi riyals draws both. So look at the lines before concluding that the header total is at fault. The rule counts the characters after the first full stop in the element's text rather than judging the value, so a third digit fails even when it is a nought, and a value written with no full stop at all passes however large it is. An absent or empty element passes as well. One element it does not reach is the VAT breakdown's own tax amount in cac:TaxSubtotal, whose parent is the breakdown rather than the total; that one belongs to BR-DEC-20.
What to check in your ERP
VAT is a rate applied to a base, and fifteen per cent of an ordinary amount is very often not a two-decimal figure, so this is a rounding policy question rather than a formatting one. Decide where the rounding happens and do it once: round each line's VAT amount to two decimals, then sum the rounded values into the VAT breakdown and into the header total, which is also the order BR-CO-14 needs. If the header total looks right on screen, the defect is on a line - go through the cac:TaxTotal inside each cac:InvoiceLine, because that copy is written directly by the tax engine and is the one least likely to pass through the totals routine that formats the header. 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.