Jump to content

Invoice: VAT calculation FAIL


Recommended Posts

The current (but also any previous) version of PrestaShop calculates VAT on the invoice like this:

It calculates and rounds VAT for each product on invoice separately and then it sums up these partial VATs to get the total VAT. This creates a mistake in calculation, while the only mathematically correct way is to sum all produts_prices_tax_excl, then calculate VAT from the whole sum and only then round.

 

To prevent any rounding mistakes, rounding can only be done at the very end of calculation.

The calculation procedure by PrestaShop creates a mistake. If you look at the invoice tax table, the sum of all VATs will give you a different number than the one displayed under the prodcts...

(not everytime - only if the calculation requires more than 2 decimal digits)

 

VAT calculation by Prestashop is not only confusing, but also contrary to tax laws in many coutries. :(

 

 

ps: many have already reported this as PS bug, but there is no response...

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...