VAT is one of the things that ABRA Flexi can calculate automatically. However, there are several calculation methods (so-called top-down and bottom-up) and rounding also affects the result. That's why ABRA Flexi has several methods for influencing VAT.
It always holds that the VAT on a line-item document is the sum of the VAT of individual items, with rounding applied to the result.
Whether VAT is calculated top-down or bottom-up depends on which parameters you provide (e.g., base → VAT and the total are calculated). You can also provide all the parameters and ABRA Flexi will check them.
💡 Usually it's enough to enter only the bases and let ABRA Flexi calculate everything else.
Verification calculations
When performing calculations, ABRA Flexi checks the relationships between items. The following rules must hold (they may differ due to rounding):
sumDphCelkem = sumDphSniz + sumDphSniz2 + sumDphZakl
sumZklCelkem = sumOsv + sumZklSniz + sumZklSniz2 + sumZklZakl
sumCelkSniz = sumZklSniz + sumDphSniz
sumCelkZakl = sumZklZakl + sumDphZakl
sumCelkem = sumZklCelkem + sumDphCelkem
The same applies to currency, where the values between the base currency and the foreign currency must also match. In these cases, ABRA Flexi slightly adjusts the exchange rate to prevent a rounding error.
sumDphCelkemMen = sumDphSnizMen + sumDphSniz2Men + sumDphZaklMen
sumZklCelkemMen = sumOsvMen + sumZklSnizMen + sumZklSniz2Men + sumZklZaklMen
sumCelkSnizMen = sumZklSnizMen + sumDphSnizMen
sumCelkZaklMen = sumZklZaklMen + sumDphZaklMen
sumCelkemMen = sumZklCelkemMen + sumDphCelkemMen
⚠️ Don't forget about the second reduced rate (sumZklSniz2, sumDphSniz2). If you leave it out of the calculation, the check will fail for documents that use it.
VAT rate: number vs. reference
A document carries the VAT rate in two forms, and only one of them can be used in totals:
Property | Type | Meaning |
|
| The rate as a percentage figure (e.g., |
|
| A reference to a record in the |
When the check fails
If ABRA Flexi displays an error:
Zadaná hodnota [9999.99] vlastnosti [sumCelkem] se liší od vypočtené hodnoty [9999.99]
it means that these verification mechanisms have not been complied with. This usually indicates an incorrect VAT calculation or an error in the input data.
ℹ️ The fastest way to identify the cause is to send the document with ?dry-run=true and compare your own figures with what ABRA Flexi calculated in the <content /> tag. See test save (dry run).
