XRechnung 2.0.2 · UBL

BR-DEX-13

XRechnung 2.0.2 · UBL

fatalcountry

Original rule text

[BR-DEX-13] Die maximale Anzahl zulässiger Nachkommastellen für das Element "Third party payment amount" (BT-DEX-002) ist 2.

Stored validation assertion
string-length(substring-after(cbc:PaidAmount, '.')) <= 2

What this rule requires

The rule requires that cbc:PaidAmount in cac:PrepaidPayment — the "Third party payment amount" (BT-DEX-002) — has no more than two digits after the decimal separator (.). The test checks the length of the string after the first period; if it exceeds 2, the invoice fails this fatal rule. The rule applies only to prepayment extension elements identified by the customization ID.

How to fix

Ensure the value of cbc:PaidAmount in the relevant cac:PrepaidPayment uses at most two decimal places, e.g. 100.00, 12.5, or 7. If the source system outputs more than two decimals (e.g. 19.999), round or format the amount accordingly before sending.

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