SchemaGuard by Ironbark Digital · EN 16931 / Peppol / XRechnung Reference
← All 294 EN 16931 / Peppol Rules & Live Validator
FATAL ATW Library Diagnostic BT/BG Fields: BT-131, BT-115

ATW-AMOUNT-OUT-OF-RANGE — E-Invoice Validation Rule & Fix

Fixture ID: amountOutOfRange · XPath: N/A (Computed / Semantic Rule)

1. Why This Rule Triggers (Diagnostic Message)

An amount on this invoice, or a total computed from its amounts, is 1000000000000, beyond the 999,999,999,999.99 this library can compute with exactly. This is not a rule of the regulation — EN 16931 sets no maximum — but past that size a JavaScript number cannot hold every cent, so the totals would be silently wrong. The usual cause is not a genuinely huge invoice but a unit slip: a price in cents where euros were meant, a quantity multiplied twice, or an amount parsed from a string with its decimal separator dropped.

2. How to Fix ATW-AMOUNT-OUT-OF-RANGE

Check the line quantities (BT-129), prices (BT-146) and allowance or charge amounts for a value in the wrong unit. If the invoice really is this large, split it: no single amount or total may exceed 999,999,999,999.99 in absolute value.

3. Valid Code / Payload Example

"lines": [{ "quantity": 3, "unitPrice": 1250.00 }]
Test & Validate XML / JSON in Live SchemaGuard Validator →