Line amount with VAT is written with more than two decimal places
Reported asmore_than_two_decimalsmore than two decimal places
What is wrong
The cbc:RoundingAmount inside a line's cac:TaxTotal - KSA-12, the line's amount including VAT - carries more than two characters after its first full stop, and ZATCA flags it under its rule BR-KSA-DEC-04 as a warning, which does not by itself reject the document. The element name is the trap here and is worth stating plainly: at line level cbc:RoundingAmount does not hold a rounding adjustment, it holds the line net amount plus the line's VAT, which is the figure a customer recognises. 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 this rule, though a simplified invoice must carry the element for a different reason, under BR-KSA-51. This is a ZATCA rule rather than an EN 16931 one, and no EN rule reads this element, so unlike most of the two-decimal findings it can arrive on its own with the rest of the document clean. It shares a template with the line VAT amount check under BR-KSA-DEC-03, and both are evaluated for every line, so one badly formatted line can draw both; under rule packs before 2.0.0 the item net price check under BR-KSA-DEC-05, which SDK 3.4.8 removed, shared that template too.
What to check in your ERP
This figure is the line net plus the line VAT, so it inherits the precision of both: round each of those to two decimals and add the rounded values rather than adding first and rounding the sum, which is also what BR-KSA-51 needs, since that rule compares this element against those same two. Because the element is not what its name suggests, check the mapping before the formatting: an ERP that writes a genuine rounding difference into it is writing the wrong number entirely, and the place for a rounding difference on what the customer pays is cbc:PayableRoundingAmount in the document totals block. Removing the element is not a way out on a simplified invoice, where it is required. 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.