BR-DEC-06
XRechnung 2.2.0 · CII
Original rule text
[BR-DEC-06]-The allowed maximum number of decimals for the Document level charge base amount (BT-100) is 2.
string-length(substring-after(../ram:BasisAmount,'.'))<=2What this rule requires
For a document level charge (BT-100), the base amount in the UBL element cbc:BaseAmount or the CII element ram:BasisAmount must have no more than two decimal places. The test checks the digits after the decimal point; if there are more than two digits after the decimal point, e.g. 12.345, the rule fails. This is a fatal rule, so such a document fails validation.
How to fix
Ensure the document level charge base amount (BT-100) has at most two decimal places. In UBL, set cbc:BaseAmount to a value with no more than two digits after the decimal point, such as 12.34; in CII, set ram:BasisAmount accordingly. If the value is generated automatically, adjust the precision or rounding to two decimals.
Guidance on this rule. The original text above is authoritative.