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-110

ATW-DECLARED-TOTAL-NOT-FINITE — E-Invoice Validation Rule & Fix

Fixture ID: nonFiniteTotals · XPath: /ubl:Invoice/cac:TaxTotal/cbc:TaxAmount

1. Why This Rule Triggers (Diagnostic Message)

declaredTotals.taxAmount (BT-110, Invoice total VAT amount) is NaN, which is not a finite number. This is not a rule of the regulation — no invoice can express it, because the XML type behind every monetary amount is xs:decimal and has no NaN or infinity. It is almost always the residue of an arithmetic slip upstream: dividing by a zero quantity, summing an array containing undefined, or parsing a total out of a string that was not one. Reported as a finding rather than thrown, so you get the rest of the findings for this document at the same time.

2. How to Fix ATW-DECLARED-TOTAL-NOT-FINITE

Trace where declaredTotals.taxAmount is computed and guard the inputs — Number.isFinite() on the result before assigning it is usually enough. If you only wanted the library's own totals, drop declaredTotals entirely: generation always emits computed values regardless of what you declare.

3. Valid Code / Payload Example

"declaredTotals": { "taxAmount": 1785.00 }
Test & Validate XML / JSON in Live SchemaGuard Validator →