XRechnung 2.2.0 · CII

BR-DEC-05

XRechnung 2.2.0 · CII

fatalcountry

Original rule text

[BR-DEC-05]-The allowed maximum number of decimals for the Document level charge amount (BT-99) is 2.

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

What this rule requires

The rule requires that the document level charge amount (BT-99), as given in the allowance/charge element where ChargeIndicator is true, must not have more than two decimal places. The test checks the number of characters after the decimal point in the amount value; if there are more than two, the invoice fails validation as a fatal error.

How to fix

Change the document level charge amount (cbc:Amount in UBL or ram:ActualAmount in CII) to a value with at most two decimal places, for example 10.99 instead of 10.999. Ensure the system that produces this amount rounds or truncates it to two decimals for document level charges.

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