XRechnung 2.5.0 · CII

BR-DEC-27

XRechnung 2.5.0 · CII

fatalcountry

Original rule text

[BR-DEC-27]-The allowed maximum number of decimals for the Invoice line charge amount (BT-141) is 2.

Stored validation assertion
string-length(substring-after(../ram:ActualAmount,'.'))<=2

What this rule requires

The rule requires that the Invoice line charge amount (BT-141), as given in cbc:Amount for UBL or ram:ActualAmount for CII, has at most two decimal places. The test counts the characters after the decimal point; if there are more than two, the document fails validation.

How to fix

Set the amount in cbc:Amount (UBL) or ram:ActualAmount (CII) to a value with no more than two digits after the decimal point, e.g. 10.50 or 10.5. If the original amount has more decimals, round or truncate it to two decimals before sending.

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