Rounding VAT
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!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Rounding VAT
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
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
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
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, give us a star
If you like Aimeos, give us a star
Re: Rounding VAT
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.