XRechnung 2.4.0 · UBL

BR-DEC-11

XRechnung 2.4.0 · UBL

fatalcountry

Original rule text

[BR-DEC-11]-The allowed maximum number of decimals for the Sum of charges on document level (BT-108) is 2.

Stored validation assertion
string-length(substring-after(cbc:ChargeTotalAmount,'.'))<=2

What this rule requires

The rule requires that the document-level sum of charges, BT-108, given in cac:LegalMonetaryTotal/cbc:ChargeTotalAmount (UBL) or ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount (CII), has no more than two decimal places. The test counts the characters after the .; if there are more than two, the document fails. This is a fatal rule, so such an invoice is rejected by validation.

How to fix

Reduce the number of decimal places in the charge total amount to at most two. For example, change 1.234 to 1.23 or 1.2; 1.20 is also acceptable. Ensure the value in the XML uses . as the decimal separator and not more than two digits after it.

Guidance on this rule. The original text above is authoritative.