How to Fix KoSIT Error BR-CO-13: TaxBasisTotalAmount Mismatch
KoSIK 1.6.3 rejects invoices where BT-109 (TaxBasisTotalAmount) does not equal BT-131 (LineTotalAmount) minus BT-107 (AllowanceTotalAmount) plus BT-108 (ChargeTotalAmount). This is a fatal error. Fix by recalculating BT-109 using the correct formula.
1. Why KoSIT Validator v1.6.3 Rejects This Invoice
EN 16931 mandates that the invoice total without VAT (BT-109) must equal the sum of line net amounts (BT-131) minus document-level allowances (BT-107) plus document-level charges (BT-108). The XPath test in KoSIT v1.6.3 checks this formula in both CII and UBL contexts. If the values do not align, the invoice is rejected as non-conformant. This ensures financial consistency and prevents errors in downstream accounting systems.
//ram:SpecifiedTradeSettlementHeaderMonetarySummation(xs:decimal(ram:TaxBasisTotalAmount[1]) = round((xs:decimal(ram:LineTotalAmount[1]) - xs:decimal(ram:AllowanceTotalAmount[1]) + xs:decimal(ram:ChargeTotalAmount[1])) * 10 * 10) div 100) or ((xs:decimal(ram:TaxBasisTotalAmount[1]) = round((xs:decimal(ram:LineTotalAmount[1]) - xs:decimal(ram:AllowanceTotalAmount[1])) * 10 * 10) div 100) and not(ram:ChargeTotalAmount)) or ((xs:decimal(ram:TaxBasisTotalAmount[1]) = round((xs:decimal(ram:LineTotalAmount[1]) + xs:decimal(ram:ChargeTotalAmount[1])) * 10 * 10) div 100) and not(ram:AllowanceTotalAmount)) or ((xs:decimal(ram:TaxBasisTotalAmount[1]) = round((xs:decimal(ram:LineTotalAmount[1])) * 10 * 10) div 100) and not(ram:ChargeTotalAmount) and not(ram:AllowanceTotalAmount))cac:LegalMonetaryTotal2. KoSIT-Verified XML Example: Broken vs. Fixed
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>140.00</ram:LineTotalAmount>
<ram:AllowanceTotalAmount>8.67</ram:AllowanceTotalAmount>
<ram:TaxBasisTotalAmount>140.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">20.47</ram:TaxTotalAmount>
<ram:GrandTotalAmount>151.80</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>151.80</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>0.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>140.00</ram:LineTotalAmount>
<ram:AllowanceTotalAmount>8.67</ram:AllowanceTotalAmount>
<ram:TaxBasisTotalAmount>131.33</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">20.47</ram:TaxTotalAmount>
<ram:GrandTotalAmount>151.80</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>151.80</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>0.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
In the broken XML, TaxBasisTotalAmount (140.00) does not match the calculated value (140.00 - 8.67 = 131.33). The fixed XML sets TaxBasisTotalAmount to 131.33, aligning with the formula. This passes the KoSIT 1.6.3 validation with no errors.
3. Step-by-Step Fix Checklist
- Step 1: Inspect the TaxBasisTotalAmount (BT-109) in the XML header monetary summation.
- Step 2: Recalculate BT-109 using the formula: LineTotalAmount - AllowanceTotalAmount + ChargeTotalAmount.
- Step 3: Re-validate with Beleq's free KoSIT v1.6.3 validator to confirm compliance.
4. Common Shopify Store & DATEV Workflow Trigger
Shopify B2B orders with order-level discounts (AllowanceTotalAmount) or surcharges (ChargeTotalAmount) may trigger BR-CO-13 if the TaxBasisTotalAmount is not recalculated correctly. Beleq ensures that the TaxBasisTotalAmount is dynamically updated to match the formula, preventing rejections during DATEV import or KoSIT validation.
5. Frequently Asked Questions
Can BR-CO-13 be ignored if the invoice is manually reviewed by the recipient?
No. BR-CO-13 is a fatal error in KoSIT 1.6.3 and must be fixed for technical EN 16931 compliance. Recipients using automated systems will reject the invoice.
Does this rule apply to both ZUGFeRD and XRechnung formats?
Yes. BR-CO-13 applies to both ZUGFeRD 2.3 and XRechnung 3.0 as they both implement EN 16931. The XPath context differs slightly, but the formula is the same.
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