BR-DEC-28
XRechnung 2.6.0 · UBL
Original rule text
[BR-DEC-28]-The allowed maximum number of decimals for the Invoice line charge base amount (BT-142) is 2.
string-length(substring-after(cbc:BaseAmount,'.'))<=2What this rule requires
The rule requires the invoice line charge base amount (BT-142) to have at most two decimal places. In UBL it checks cbc:BaseAmount of a line-level cac:AllowanceCharge with cbc:ChargeIndicator = true(); in CII it checks ram:BasisAmount for a corresponding ram:ChargeIndicator with value true. A value such as 1.234 fails because there are three digits after the decimal point.
How to fix
Set the affected charge base amount to a value with no more than two decimal places. In UBL, change cbc:BaseAmount in the line allowance charge; in CII, change ram:BasisAmount in the corresponding allowance charge. For example, round or format the amount to two decimals before output, e.g. 1.23 instead of 1.234.
Guidance on this rule. The original text above is authoritative.