Page 1 of 1

Rounding VAT

Posted: 03 Jul 2016, 16:45
by ivofrie
Hi guys!

Here is another question after my first post within the TYPO3 section.

As I live in Switzerland, we do have Swiss Francs as currency. Swiss Francs has as smallest item a 5 cent piece, so we should also have rounded prices in our webshops (if you have eg 0.97 cents, it should be 0.95 or 1.00).

Where and how could I adjust the tax calculation?

As we have a shop with some design articles that were sold with a massive percent discount, we calculate that discount on the net prices and calculate the VAT on that net price. So to have prices with VAT is not really an option.

Thanks for any help & kind regards, Ivo

Re: Rounding VAT

Posted: 03 Jul 2016, 20:23
by aimeos
Tax calculation is done in the price item:
https://github.com/aimeos/aimeos-core/b ... d.php#L385

If you want to overwrite it, you have to create a new price item and manager implementation extending from the "Standard" item/manager and overwriting the createItemBase() method in your new manager:
https://github.com/aimeos/aimeos-core/b ... d.php#L699

The prices items are then used in the detail summery template:
https://github.com/aimeos/ai-client-htm ... efault.php

Re: Rounding VAT

Posted: 04 Jul 2016, 15:56
by nos3
If you are not in B2B business, I would suggest to use gross prices for products nevertheless for regularity reasons. If your customers get rebates/discounts for products dynamically, you can round the values after calculating the new price in the basket plugin for example.