Rounding VAT

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
ivofrie
Posts: 5
Joined: 03 Jul 2016, 16:21

Rounding VAT

Post by ivofrie » 03 Jul 2016, 16:45

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

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Rounding VAT

Post by aimeos » 03 Jul 2016, 20:23

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

nos3
Posts: 86
Joined: 01 Sep 2015, 13:26

Re: Rounding VAT

Post by nos3 » 04 Jul 2016, 15:56

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.

Post Reply