BR-CO-10 BT-106 = Σ BT-131 EN 16931-1

BR-CO-10: Sum of Invoice Line Net Amounts Mismatch (BT-106)

Header LineTotalAmount (BT-106) MUST strictly equal the exact cent sum of all Invoice Line Net Amounts (Σ BT-131).

Why This Error Happens

Summing unrounded floating-point line totals (e.g. IEEE-754 binary floats in JavaScript/Python) and rounding only at the end produces a €0.01 discrepancy against the sum of rounded BT-131 values.

German 2025–2028 § 14 UStG Regulatory Context

EN 16931 enforces strict cent-level mathematical identities with zero tolerance for rounding drift. Every compliant German B2B invoice must compute BT-106 by summing already-rounded integer-cent BT-131 line values.

Invalid XML (Rejected)

FAIL
<!-- Line 1 BT-131 = 100.00, Line 2 BT-131 = 49.99 -> Sum = 149.99 -->
<ram:LineTotalAmount>150.00</ram:LineTotalAmount> <!-- ERROR: off by +0.01! -->

Fixed EN 16931 XML (Compliant)

PASS
<!-- Exact BigInt cent sum: 10000 + 4999 = 14999 cents -->
<ram:LineTotalAmount>149.99</ram:LineTotalAmount>

Step-by-Step Fix Checklist

  1. Round each line net amount (BT-131) to 2 decimal places (integer cents) using HALF_UP.
  2. Compute BT-106 strictly as the integer-cent sum of all BT-131 values.
  3. Never use native IEEE-754 floating-point addition for invoice totals.

Frequently Asked Questions

Does EN 16931 allow a 1-cent rounding tolerance on BT-106?

No. BR-CO-10 is an exact equality rule: BT-106 must equal Σ BT-131 down to the exact cent.