- SDK members
- AddProduct_Comfort() AddTradeAllowanceCharge() AddTradeTax() WriteTotals()
- Business terms
- BT-116 VAT category taxable amount BT-117 VAT category tax amount BT-92 Document level allowance amount BT-106 Sum of Invoice line net amount BT-107 Sum of allowances on document level BT-109 Invoice total amount without VAT BT-110 Invoice total VAT amount BT-112 Invoice total amount with VAT
- Published
In short: Together, the three rules BR-S-08, BR-S-09 and BR-CO-17 almost always report the same mistake: the VAT breakdown (BG-23) contains the sum of the invoice lines as the taxable amount (BT-116) instead of the net amount after the allowance. Correct is: sum of the lines with this VAT rate − allowances + charges with this VAT rate. The tax (BT-117) is calculated on that.
The three rules
- BR-S-08: The taxable amount per VAT rate (BT-116) must equal the sum of the line net amounts with this rate minus the allowances (BT-92) plus the charges (BT-99) with this rate.
- BR-S-09: The VAT category tax amount (BT-117) must be taxable amount × VAT rate (BT-119), rounded commercially to 2 decimals.
- BR-CO-17: the same calculation (basis × rate = tax) as a general rule for all VAT categories.
If the basis is the sum of the lines, the basis does not match the allowance (BR-S-08) – and the actually correct tax amount no longer matches the wrong basis (BR-S-09, BR-CO-17). That is why the three messages always appear together.
Example: 20 % allowance on two of three lines
| Field | Wrong | Correct |
|---|---|---|
| Sum of invoice line net amounts (BT-106) | 105.05 | 105.05 (67.23 + 16.81 + 21.01) |
| Allowance (BT-92 / BT-107) | 16.81 | 16.81 (20 % of 84.04) |
| Total without VAT (BT-109) | 88.24 | 88.24 |
| Taxable amount of the breakdown (BT-116) | 105.05 | 88.24 |
| Tax (BT-117 / BT-110) | 16.77 | 16.77 (88.24 × 19 %) |
| Total with VAT (BT-112) | 105.01 | 105.01 |
| Rounding amount (BT-114) | -0.01 | -0.01 |
| Amount due for payment (BT-115) | 105.00 | 105.00 |
Only one single value is wrong – and exactly that value produces all three messages. With only one VAT rate, the taxable amount of the breakdown always equals the total without VAT (BT-109).
In the Aloaha ZUGFeRD SDK
' lines (line net amounts already rounded to 2 decimals)
alo.AddProduct_Comfort("1", "", "A-1", "1", "H87", "Device rental", "", "", "EUR", "", "H87", _
False, "", "", "", "67.23", "EUR", "1", "H87", "VAT", "S", "19.00", "", "67.23", "EUR", "", "")
alo.AddProduct_Comfort("2", "", "A-2", "1", "H87", "Monitor rental", "", "", "EUR", "", "H87", _
False, "", "", "", "16.81", "EUR", "1", "H87", "VAT", "S", "19.00", "", "16.81", "EUR", "", "")
alo.AddProduct_Comfort("3", "not discountable", "A-3", "1", "H87", "Add-on module", "", "", "EUR", "", "H87", _
False, "", "", "", "21.01", "EUR", "1", "H87", "VAT", "S", "19.00", "", "21.01", "EUR", "", "")
' 20 % allowance on lines 1 and 2 (basis 84.04) – BG-20
alo.AddTradeAllowanceCharge(False, "84.04", "EUR", "16.81", "EUR", "VAT", "S", "19.00", "Discount", "20", "95")
' VAT breakdown: basis = 105.05 - 16.81 = 88.24 (NOT 105.05)
alo.AddTradeTax("16.77", "EUR", "88.24", "EUR", "VAT", "S", "19.00")
' totals: lines, gross, amount due, net, tax, allowances, paid, rounding, charges
alo.WriteTotals("105.05", "105.01", "105.00", "88.24", "16.77", "16.81", "0.00", "-0.01", "0.00")
The third parameter of AddTradeTax is the taxable amount (BT-116), the first is the tax amount (BT-117). We created both variants with the SDK and checked them with the KoSIT validator (XRechnung configuration 3.0.2): with 105.05 as the basis it reports exactly BR-CO-17, BR-S-08 and BR-S-09; with 88.24 the invoice is accepted without errors or warnings (as of 15 October 2026).
Several VAT rates
The rule applies per VAT rate: one AddTradeTax call for each rate, basis = lines with this rate − allowances with this rate + charges with this rate. A document-level allowance or charge must therefore always have a VAT category and a VAT rate (see allowances and charges with percentage and reason code, German). The sum of all taxable amounts gives the total without VAT (BT-109), the sum of all tax amounts the total VAT amount (BT-110).
Related errors
- BR-CO-10: The sum of the lines (BT-106) must be built from the rounded line net amounts – not from unrounded prices.
- BR-CO-15 / BR-CO-16: rounding only on the amount due, never on the total with VAT: BR-CO-15 and BR-CO-16 for the rounding amount.
- Discounts belong in a document-level allowance (BG-20), not in the rounding amount.
Check your invoice: How do I validate my XRechnung before sending it?
Frequently asked questions
What does BR-S-08 mean?
The taxable amount of VAT category S (BT-116) must equal the sum of the line net amounts with this VAT rate minus allowances plus charges with this VAT rate.
What do BR-S-09 and BR-CO-17 mean?
The tax amount of the breakdown (BT-117) must be the taxable amount (BT-116) × VAT rate, rounded to 2 decimals. If the basis is wrong, the tax no longer matches – that is why these messages usually appear together with BR-S-08.
Is the tax basis the sum of the lines or the amount after the allowance?
The amount after allowances (and after charges). With only one VAT rate it equals the invoice total without VAT (BT-109).
Which parameter of AddTradeTax is the tax basis?
The third parameter (BasisAmount, BT-116). The first parameter is the tax amount (CalculatedAmount, BT-117).
Business terms in this article: BT-116 BT-117 BT-92 BT-106 BT-107 BT-109 BT-110 BT-112 BT-114 BT-115 BT-119 BG-20 BG-23