Fehlercodes · EN 16931
Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131)
So lautet die Ablehnung wörtlich: „[BR-CO-10] BR-CO-10 fires when the document-level sum of line net amounts does not equal the arithmetic sum of the individual line net amounts. It is a pure totals check: BT-106 in cac:LegalMonetaryTotal must equal the sum of every cbc:LineExtensionAmount across all invoice lines, rounded to two decimals. Almost every occurrence traces back to rounding applied at the wrong point in the calculation, or to a total that was overridden manually after the lines were built.“
The EN 16931 Schematron rule BR-CO-10 has context cac:LegalMonetaryTotal and asserts xs:decimal(cbc:LineExtensionAmount) = xs:decimal(round(sum(//(cac:InvoiceLine|cac:CreditNoteLine)/xs:decimal(cbc:LineExtensionAmount)) * 10 * 10) div 100). XPath: /Invoice/cac:LegalMonetaryTotal/cbc:LineExtensionAmount versus the sum over /Invoice/cac:InvoiceLine/cbc:LineExtensionAmount. Two consequences of the exact expression matter in practice. First, the sum is computed over already-rounded line values, then rounded again — so the correct algorithm is round each line to 2 decimals first, then sum, never sum unrounded values and round once. Second, the comparison is on xs:decimal, so 100.00 and 100.000 compare equal but a one-cent difference does not. Note that BR-CO-10 concerns line net amounts only; per-VAT-category taxable amounts are covered by BR-CO-14 and BR-S-08.
<cac:InvoiceLine> <cbc:LineExtensionAmount currencyID="EUR">450.25</cbc:LineExtensionAmount> </cac:InvoiceLine> <cac:InvoiceLine> <cbc:LineExtensionAmount currencyID="EUR">120.10</cbc:LineExtensionAmount> </cac:InvoiceLine> <cac:LegalMonetaryTotal> <!-- 450.25 + 120.10 = 570.35, but header says 570.34 --> <cbc:LineExtensionAmount currencyID="EUR">570.34</cbc:LineExtensionAmount> </cac:LegalMonetaryTotal>
<cac:InvoiceLine> <cbc:LineExtensionAmount currencyID="EUR">450.25</cbc:LineExtensionAmount> </cac:InvoiceLine> <cac:InvoiceLine> <cbc:LineExtensionAmount currencyID="EUR">120.10</cbc:LineExtensionAmount> </cac:InvoiceLine> <cac:LegalMonetaryTotal> <cbc:LineExtensionAmount currencyID="EUR">570.35</cbc:LineExtensionAmount> </cac:LegalMonetaryTotal>