BR-CO-10: Sum of line net amounts (BT-106) is wrong
BT-106 must equal the exact sum of all invoice line net amounts (BT-131).
Fiche
- Règle
BR-CO-10- Gravité
- Erreur – la facture est invalide
- Référentiel
- EN 16931 – s’applique à XRechnung et à Factur-X/ZUGFeRD
- Champs concernés
- BT-106, BT-131
- Syntaxe
- CII & UBL
Vérifier votre facture
Déposez un PDF ou un XML – gratuit, sans inscription, selon les référentiels officiels.
Ouvrir le validateur en ligneLibellé officiel
[BR-CO-10] Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131).
Source : Schematron officiel de l’EN 16931 (CEN), également appliqué à XRechnung et à Factur-X/ZUGFeRD.
What the rule requires
The sum of invoice line net amounts (BT-106) must equal the sum of all invoice line net amounts (BT-131) exactly – to the cent, with no tolerance. The rule is part of EN 16931 and therefore applies to XRechnung as well as to ZUGFeRD and Factur-X.
Document-level allowances and charges (BG-20, BG-21) do not belong in BT-106; they only enter the invoice total without VAT (BT-109). Line-level discounts, on the other hand, are already included in the line net amount.
Common causes
- Rounding: BT-106 is computed from unrounded values (quantity × price) while the lines are written rounded.
- A discount on the whole invoice was already subtracted in BT-106.
- Lines were removed or added later, but the sum was not recalculated.
- Credit lines with negative amounts are missing from the sum.
What it looks like in XML
<ram:IncludedSupplyChainTradeLineItem> <!-- line 1 -->
… <ram:LineTotalAmount>300.00</ram:LineTotalAmount> …
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem> <!-- line 2 -->
… <ram:LineTotalAmount>49.99</ram:LineTotalAmount> …
</ram:IncludedSupplyChainTradeLineItem>
…
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>350.00</ram:LineTotalAmount> <!-- BT-106: 300.00 + 49.99 = 349.99 -->
…
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>349.99</ram:LineTotalAmount>
…
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
In UBL, BT-106 is cac:LegalMonetaryTotal/cbc:LineExtensionAmount.
Fix in C#
Round each line net amount to two decimals before setting it, then build the sum from exactly these values. With the Facturexa Creator:
// Compute BT-106 from the lines instead of keeping it separately
invoice.LineTotalAmount = invoice.TradeLineItems.Sum(l => l.LineTotalAmount);
Tip: check generated invoices with the Facturexa Validator before sending them – it reports BR-CO-10 offline inside your own application.