BR-DEC-12
XRechnung 2.0.1 · CII
Original rule text
[BR-DEC-12]-The allowed maximum number of decimals for the Invoice total amount without VAT (BT-109) is 2.
string-length(substring-after(ram:TaxBasisTotalAmount,'.'))<=2What this rule requires
The rule requires that the invoice total amount without VAT (BT-109), given in cbc:TaxExclusiveAmount (UBL) or ram:TaxBasisTotalAmount (CII), has no more than two digits after the decimal point. The test checks the length of the part after . and fails if it is longer than 2, for example 123.456 fails while 123.45 passes.
How to fix
Change the invoice total amount without VAT to have at most two decimal places, e.g. round or truncate 123.456 to 123.45 or 123.46. In UBL this is cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount; in CII it is //ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxBasisTotalAmount.
Guidance on this rule. The original text above is authoritative.