How to Fix KoSIT Error BR-S-08: VAT BasisAmount Mismatch in Tax Groups
KoSIT 1.6.3 rejects invoices when the VAT BasisAmount (BT-116) for CategoryCode 'S' does not match the sum of line items, charges, and allowances with the same VAT rate. Fix by recalculating BT-116 using the XPath formula in the rule. Validate with Beleq’s free KoSIT validator.
1. Why KoSIT Validator v1.6.3 Rejects This Invoice
EN 16931 mandates that the VAT category taxable amount (BT-116) must equal the sum of line net amounts (BT-131) plus document-level charges (BT-99) minus allowances (BT-92) for the same VAT rate and category. The XPath test ensures this by comparing the BasisAmount with the calculated sum. If the values differ, the invoice fails BR-S-08. This applies to both CII and UBL profiles. The error is fatal and must be resolved before submission.
//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode[.='S']every $rate in ../ram:RateApplicablePercent/xs:decimal(.) satisfies (../ram:BasisAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'S' and ram:ApplicableTradeTax/xs:decimal(ram:RateApplicablePercent) =$rate]/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount)) * 10 * 10) div 100 + round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='S' and ram:CategoryTradeTax/xs:decimal(ram:RateApplicablePercent)=$rate]/xs:decimal(ram:ActualAmount[1])) * 10 * 10) div 100 - round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='S' and ram:CategoryTradeTax/xs:decimal(ram:RateApplicablePercent)=$rate]/xs:decimal(ram:ActualAmount[1])) * 10 * 10) div 100))/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']2. KoSIT-Verified XML Example: Broken vs. Fixed
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>39.46</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>206.69</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:ApplicableTradeTax>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>39.46</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>207.69</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:ApplicableTradeTax>
The broken XML has a BasisAmount of 206.69, but the correct sum of line items and charges is 207.69. The fixed XML updates BT-116 to 207.69, aligning with the XPath calculation and passing KoSIT validation.
3. Step-by-Step Fix Checklist
- Step 1: Inspect the VAT category (BG-23) with CategoryCode 'S' and check the BasisAmount (BT-116).
- Step 2: Recalculate BT-116 using the XPath formula: sum of line net amounts (BT-131) + charges (BT-99) - allowances (BT-92) for the same VAT rate.
- Step 3: Re-validate with Beleq’s free KoSIT v1.6.3 validator to confirm BR-S-08 compliance.
4. Common Shopify Store & DATEV Workflow Trigger
In a German Shopify B2B store with mixed 19%/7% VAT items and prorated shipping, the tax breakdown must correctly aggregate line items and charges. If the BasisAmount for the standard-rated tax group (CategoryCode 'S') is off by even 0.01, DATEV will reject the EXTF import. Beleq ensures this calculation is correct by aligning BT-116 with the XPath rule in real time.
5. Frequently Asked Questions
Can BR-S-08 errors be ignored if the total VAT is correct?
No. KoSIT requires exact matching of BasisAmount per tax group. Even if the total VAT is correct, a mismatch in BT-116 will fail the invoice.
Does this rule apply to ZUGFeRD 2.3 and XRechnung 3.0 equally?
Yes. BR-S-08 is part of EN 16931 and applies to both ZUGFeRD 2.3 and XRechnung 3.0 profiles. The XPath expressions differ slightly for CII and UBL, but the logic 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