BR-DEC-13
XRechnung 2.2.0 · UBL
Original rule text
[BR-DEC-13]-The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2.
(//cac:TaxTotal/cbc:TaxAmount[@currencyID = cbc:DocumentCurrencyCode] and (string-length(substring-after(//cac:TaxTotal/cbc:TaxAmount[@currencyID = cbc:DocumentCurrencyCode],'.'))<=2)) or (not(//cac:TaxTotal/cbc:TaxAmount[@currencyID = cbc:DocumentCurrencyCode]))What this rule requires
The rule limits the Invoice total VAT amount (BT-110) to a maximum of two decimal places when it is reported in the document currency. In UBL, this is cac:TaxTotal/cbc:TaxAmount with @currencyID equal to cbc:DocumentCurrencyCode; in CII, it is ram:TaxTotalAmount with @currencyID equal to the invoice currency. If such an amount is present and has more than two decimal places, the invoice fails validation. If the amount is absent or is in a different currency, the rule passes.
How to fix
For UBL, ensure the cac:TaxTotal/cbc:TaxAmount whose @currencyID matches cbc:DocumentCurrencyCode has at most two decimal places (e.g., 123.45, not 123.456). For CII, do the same for ram:TaxTotalAmount whose @currencyID matches ram:InvoiceCurrencyCode. Adjust the value in the XML or configure the system to output BT-110 with two decimals.
Guidance on this rule. The original text above is authoritative.