Beleq / Validator / KoSIT Error Codes / BR-CO-16
FATAL · BR-CO-16 EN 16931 (v1.3.16) Verified with KoSIT v1.6.3 (0-Error Fix) BT-112BT-113BT-114BT-115

How to Fix KoSIT Error BR-CO-16: DuePayableAmount Mismatch in Header Summation

KoSIT 1.6.3 rejects invoices where DuePayableAmount (BT-115) does not match the formula: GrandTotalAmount (BT-112) - TotalPrepaidAmount (BT-113) + RoundingAmount (BT-114). Fix by recalculating BT-115 to match this formula.

Official KoSIT v1.6.3 Schematron Message (EN16931 (CII))
[BR-CO-16]-Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) +Rounding amount (BT-114).

1. Why KoSIT Validator v1.6.3 Rejects This Invoice

BR-CO-16 enforces that the amount due for payment (BT-115) must be calculated correctly from the invoice total with VAT (BT-112), minus any prepaid amount (BT-113), plus rounding (BT-114). The official XPath test ensures this formula is applied in both CII and UBL contexts. If the values do not align, the invoice is rejected as non-compliant with EN 16931.

CII Context: //ram:SpecifiedTradeSettlementHeaderMonetarySummation
CII Schematron Test: (xs:decimal(ram:DuePayableAmount[1]) = xs:decimal(ram:GrandTotalAmount[1]) - xs:decimal(ram:TotalPrepaidAmount[1]) + xs:decimal(ram:RoundingAmount[1])) or ((xs:decimal(ram:DuePayableAmount[1]) = xs:decimal(ram:GrandTotalAmount[1]) + xs:decimal(ram:RoundingAmount[1])) and not(ram:TotalPrepaidAmount)) or ((xs:decimal(ram:DuePayableAmount[1]) = xs:decimal(ram:GrandTotalAmount[1]) - xs:decimal(ram:TotalPrepaidAmount[1])) and not(ram:RoundingAmount)) or ((xs:decimal(ram:DuePayableAmount[1]) = xs:decimal(ram:GrandTotalAmount[1])) and not(ram:TotalPrepaidAmount) and not(ram:RoundingAmount))
UBL Context: cac:LegalMonetaryTotal

2. KoSIT-Verified XML Example: Broken vs. Fixed

✕ Invalid CII XML — Rejected by KoSIT 1.6.3 (BR-CO-16)
  <ram:SpecifiedTradeSettlementHeaderMonetarySummation>
    <ram:LineTotalAmount>200.00</ram:LineTotalAmount>
    <ram:TaxBasisTotalAmount>200.00</ram:TaxBasisTotalAmount>
    <ram:TaxTotalAmount currencyID="EUR">38.00</ram:TaxTotalAmount>
    <ram:GrandTotalAmount>238.00</ram:GrandTotalAmount>
    <ram:TotalPrepaidAmount>100.00</ram:TotalPrepaidAmount>
    <ram:DuePayableAmount>238.00</ram:DuePayableAmount>
  </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
✓ Fixed CII XML — Passed KoSIT 1.6.3 (0 Errors)
  <ram:SpecifiedTradeSettlementHeaderMonetarySummation>
    <ram:LineTotalAmount>200.00</ram:LineTotalAmount>
    <ram:TaxBasisTotalAmount>200.00</ram:TaxBasisTotalAmount>
    <ram:TaxTotalAmount currencyID="EUR">38.00</ram:TaxTotalAmount>
    <ram:GrandTotalAmount>238.00</ram:GrandTotalAmount>
    <ram:TotalPrepaidAmount>100.00</ram:TotalPrepaidAmount>
    <ram:DuePayableAmount>138.00</ram:DuePayableAmount>
  </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>

The broken XML has a DuePayableAmount of 238.00, but with a TotalPrepaidAmount of 100.00, the correct value should be 138.00. The fixed XML correctly sets DuePayableAmount to 138.00, aligning with the formula BT-115 = BT-112 - BT-113 + BT-114, and passes KoSIT validation.

3. Step-by-Step Fix Checklist

  1. Step 1: Inspect the <ram:DuePayableAmount> element in <ram:SpecifiedTradeSettlementHeaderMonetarySummation>.
  2. Step 2: Recalculate BT-115 using the formula: GrandTotalAmount (BT-112) - TotalPrepaidAmount (BT-113) + RoundingAmount (BT-114).
  3. Step 3: Re-validate the invoice with Beleq's free KoSIT v1.6.3 validator to confirm BR-CO-16 compliance.

4. Common Shopify Store & DATEV Workflow Trigger

In a German Shopify B2B context, applying Store Credit as a discount instead of mapping it to TotalPrepaidAmount (BT-113) causes BR-CO-16 errors. Beleq helps by ensuring that Shopify Store Credit is correctly mapped to BT-113 and that DuePayableAmount is recalculated accordingly, preventing DATEV import errors and ensuring EN 16931 compliance.

Guide (DE): Partial Refunds & TypeCode 381 Credit Notes →

5. Frequently Asked Questions

Can I ignore BR-CO-16 if the invoice looks correct visually?

No. KoSIT validation is mandatory for legal compliance in Germany. Even if the invoice appears correct visually, BR-CO-16 errors will cause rejection by DATEV and tax authorities.

Does this rule apply to ZUGFeRD 2.3 and XRechnung 3.0 the same way?

Yes. BR-CO-16 applies to both ZUGFeRD 2.3 (Factur-X) and XRechnung 3.0. The formula and XPath test are identical across both profiles.

Related KoSIT Error Codes

Validate your ZUGFeRD PDF or XRechnung XML free online

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