SchemaGuard by Ironbark Digital · EN 16931 / Peppol / XRechnung Reference
← All 294 EN 16931 / Peppol Rules & Live Validator
FATAL Official EN 16931 / Peppol / CIUS Rule BT/BG Fields: BT-131

BR-DEC-23 — E-Invoice Validation Rule & Fix

Fixture ID: documentOverPreciseBreakdownAndLine · XPath: /ubl:Invoice/cac:InvoiceLine[1]/cbc:LineExtensionAmount

1. Why This Rule Triggers (Diagnostic Message)

The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2, but the document writes on line 1 "1500.000", which has 3. BR-DEC rules are measured on the serialised value, not on the number behind it: trailing zeros count, so "1500.000" fails even though it is arithmetically identical to a two-decimal amount and every total in the document still balances. A line amount is exactly where decimals accumulate, because it is a quantity multiplied by a price and then adjusted by allowances and charges. EN 16931 requires the line to be rounded once, at the end, to two decimals.

2. How to Fix BR-DEC-23

Serialise the amount with exactly two decimal places. This is almost always a formatting setting rather than a data problem — a records or ORM emitting its native decimal scale (six places is the usual default) straight into the XML. Fixing it at the point of serialisation fixes every amount in the document at once.

3. Valid Code / Payload Example

<cbc:LineExtensionAmount>1500.00</cbc:LineExtensionAmount>
Test & Validate XML / JSON in Live SchemaGuard Validator →