BR-DEC-10
XRechnung 2.1.0 · UBL
Original rule text
[BR-DEC-10]-The allowed maximum number of decimals for the Sum of allowanced on document level (BT-107) is 2.
string-length(substring-after(cbc:AllowanceTotalAmount,'.'))<=2What this rule requires
The rule requires that the document level allowance total amount (BT-107) in cbc:AllowanceTotalAmount under cac:LegalMonetaryTotal (UBL) or ram:AllowanceTotalAmount under ram:SpecifiedTradeSettlementHeaderMonetarySummation (CII) has at most two digits after the decimal point. A document fails validation when the value contains a decimal separator followed by three or more digits, for example 1.234. Values with no decimal places or with one or two decimal places are allowed.
How to fix
Set the document level allowance total amount (cbc:AllowanceTotalAmount in UBL or ram:AllowanceTotalAmount in CII) to a value that contains no more than two digits after the decimal point, such as by rounding or formatting the amount to a maximum of two decimal places.
Guidance on this rule. The original text above is authoritative.