- SDK members
- WriteTotals()
- Business terms
- BT-112 Invoice total amount with VAT BT-114 Rounding amount BT-115 Amount due for payment BT-109 Invoice total amount without VAT BT-110 Invoice total VAT amount BT-113 Paid amount BG-22 Document totals
- Published
In short: The rounding amount (BT-114) may only change the amount due for payment (BT-115), never the invoice total with VAT (BT-112). If you set the total with VAT to a "round" value and declare the difference as rounding, you break two calculation rules of EN 16931 – the invoice is rejected.
The two rules
- BR-CO-15: Invoice total with VAT (BT-112) = invoice total without VAT (BT-109) + invoice total VAT amount (BT-110).
- BR-CO-16: Amount due for payment (BT-115) = invoice total with VAT (BT-112) − paid amount (BT-113) + rounding amount (BT-114).
The total with VAT is therefore always exactly net plus tax. Rounding is only added in the last step.
Example
Net EUR 84.04, 19 % VAT = EUR 15.97. That is EUR 100.01 gross – but a round EUR 100.00 is to be charged.
| Field | Wrong | Correct |
|---|---|---|
| Total without VAT (BT-109) | 84.04 | 84.04 |
| VAT amount (BT-110) | 15.97 | 15.97 |
| Total with VAT (BT-112) | 100.00 | 100.01 |
| Rounding amount (BT-114) | 0.01 | -0.01 |
| Amount due for payment (BT-115) | 100.00 | 100.00 |
In the wrong variant, BT-112 does not equal net + tax (BR-CO-15), and 100.00 + 0.01 does not give the amount due (BR-CO-16). Also note the sign: when rounding down, the rounding amount is negative.
In the Aloaha ZUGFeRD SDK
WriteTotals expects the totals in this order: sum of line net amounts, total with VAT, amount due, total without VAT, tax, allowances, paid amount, rounding amount, charges.
alo.WriteTotals("84.04", "100.01", "100.00", "84.04", "15.97", "0.00", "0.00", "-0.01", "0.00")
If you pass 0 or an empty value for the amount due, the SDK calculates it itself as total with VAT − paid amount + rounding amount.
A round amount without rounding
If the invoice should reach a round amount without a rounding amount, adjust the net price of a line. In the example, EUR 84.03 net gives EUR 15.97 tax and therefore exactly EUR 100.00 gross.
More on the document totals: setting the document totals (BG-22) individually (German) and RoundingAmount (German).
If the validator also reports BR-S-08, BR-S-09 or BR-CO-17, the tax basis is usually wrong when an allowance is applied: BR-S-08, BR-S-09 and BR-CO-17 with allowances.
Frequently asked questions
What does BR-CO-15 mean?
The invoice total with VAT (BT-112) must equal the invoice total without VAT (BT-109) plus the total VAT amount (BT-110). It must not be rounded to a round value.
What does BR-CO-16 mean?
The amount due for payment (BT-115) must equal the total with VAT (BT-112) minus the paid amount (BT-113) plus the rounding amount (BT-114).
Is a rounding amount negative when rounding down?
Yes. If EUR 100.01 is rounded down to EUR 100.00, the rounding amount (BT-114) is -0.01.
Business terms in this article: BT-112 BT-114 BT-115 BT-109 BT-110 BT-113 BG-22