How to Fix KoSIT Error BR-CO-10: Header LineTotalAmount ≠ Sum of Line LineTotalAmount
KoSIT 1.6.3 rejects invoices where the header LineTotalAmount (BT-106) does not match the sum of all line LineTotalAmounts (BT-131). Fix by recalculating the header total to match the sum of all line items.
1. Why KoSIT Validator v1.6.3 Rejects This Invoice
EN 16931 mandates that the invoice header's LineTotalAmount (BT-106) must exactly equal the sum of all line items' LineTotalAmount (BT-131). The official XPath test compares the header value against the sum of all line-level values, rounding to two decimal places. In CII, the XPath context is //ram:SpecifiedTradeSettlementHeaderMonetarySummation, and the test ensures that the header LineTotalAmount equals the sum of all line LineTotalAmounts. UBL follows a similar logic with cac:LegalMonetaryTotal.
//ram:SpecifiedTradeSettlementHeaderMonetarySummationxs:decimal(ram:LineTotalAmount) = round(xs:decimal(sum(../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)) * xs:decimal(100)) div xs:decimal(100)cac:LegalMonetaryTotal2. KoSIT-Verified XML Example: Broken vs. Fixed
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>1999.99</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>2000.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">380.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>2380.00</ram:GrandTotalAmount>
<ram:DuePayableAmount>2380.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>2000.00</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>2000.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">380.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>2380.00</ram:GrandTotalAmount>
<ram:DuePayableAmount>2380.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
In the broken XML, the header LineTotalAmount is 1999.99, but the sum of line LineTotalAmounts is 2000.00. This discrepancy causes the BR-CO-10 error. The fixed XML corrects the header LineTotalAmount to 2000.00, aligning it with the sum of all line items and passing the KoSIT v1.6.3 validation.
3. Step-by-Step Fix Checklist
- Step 1: Inspect the <ram:LineTotalAmount> at the header level (BT-106) and compare it with the sum of all line <ram:LineTotalAmount> (BT-131).
- Step 2: Recalculate the header <ram:LineTotalAmount> to exactly match the sum of all line items, ensuring rounding to two decimal places.
- Step 3: Re-validate the invoice using Beleq's free online validator, which runs the official KoSIT v1.6.3 test suite.
4. Common Shopify Store & DATEV Workflow Trigger
In Shopify B2B stores, this error commonly occurs when line-level discounts or shipping lines are not correctly accounted for in the header LineTotalAmount. DATEV EXTF expects strict alignment between header and line totals for bookkeeping. Beleq ensures that the header LineTotalAmount is recalculated automatically to match the sum of all line items, preventing this error before sending the invoice to DATEV.
5. Frequently Asked Questions
Can this error affect ZUGFeRD and XRechnung differently?
No, both ZUGFeRD 2.3 and XRechnung 3.0 are governed by EN 16931 and must pass the same BR-CO-10 rule. The XPath context differs slightly between CII and UBL, but the validation logic is the same.
Does this error impact tax compliance with the German BMF?
Yes, the BMF requires strict EN 16931 compliance for e-invoicing. A mismatch in LineTotalAmounts may lead to rejection by the recipient or during tax audits.
Related KoSIT Error Codes
Check your hybrid ZUGFeRD PDF or XRechnung XML in under 1 second against the official German KoSIT Validator v1.6.3 — 100% RAM-based on Frankfurt servers with zero retention and no registration.
Open Free KoSIT v1.6.3 Validator → See Beleq for Shopify