VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: nickson on November 23, 2012, 01:36:24 AM

Title: Tax calculation on multiple items.
Post by: nickson on November 23, 2012, 01:36:24 AM
Hi All,

I am getting really frustrated trying to figure out what is wrong with the taxes.
Im currently using VM 2.0.12 and tried various templates.

The thing is, everything works fine when u add a single product to the cart. For instance I have a product witch I sell for 3,50 including tax (21%)
Im using the setup with tax per product.

In the cart and order confirmation you can see this product with 0,61 tax. How its supposed to be. Without rounding this would be 0,6074380165289256.

So far so good.

But when I add this product 100 times there something goes wrong. It simply multiplies that single (rounded) tax so my total order amount is 350 with a tax of 61.
The tax should actually be 60,74 and not the rounded 61.


What to do? ive searched troufh the forums ut cant seem to find a sollution.
So all help is welcome.
Title: Re: Tax calculation on multiple items.
Post by: bytelord on November 23, 2012, 01:59:23 AM
Hello,

Please read the following thread, not a solution as you want but why this is happen: http://forum.virtuemart.net/index.php?topic=108809 specific post: http://forum.virtuemart.net/index.php?topic=108809.msg367089#msg367089

Also please upgrade to 2.0.14, there are small changes on the layouts.

Regards
Title: Re: Tax calculation on multiple items.
Post by: nickson on November 23, 2012, 22:57:15 PM
Thanks for your reply. I get what he is saying but I dont get it haha.

Why so difficult.  ???

I want to do the following witch doesnt seem all that hard but I cant configure it can someone please help on this matter.?
I dont actually care about the taxes per produt that much. I think the best for me would be to just input all the prices with tax included. And then only at the very end of the basket / invoice state the total tax amount.
So lets say a product has a price with tax included of 3,50 euro's. I order 100 of them so I would have to pay 350 euro's.

All I want the is for virtuemart to state "total tax amount (21%): €60,74"

Is this even possible?

If this simple thing isnt possible then im afraid ill have to move over to another platform (after many years of loyal virtuemart use) since my administrator isnt accepting these weird tax calculations. So isnt the government over here.

Thanks again for your input.
Title: Re: Tax calculation on multiple items.
Post by: bytelord on November 24, 2012, 00:05:58 AM
Hello,

The Tax Per Product and VatTax per Product will calculate each tax separately, if is the same product, the same will happen. You could Use Tax Per Bill under your calculation rules and apply tax 21% to the final amount.
You are not the only and it is not the only software that users and developers try to figure out which is the best practice to calculate vat on rounded prices ...


Regards
Title: Re: Tax calculation on multiple items.
Post by: nickson on November 26, 2012, 13:07:50 PM
Ok I think I solved this issue.

For me it was all in the rounding of the prices.
In the prices configuration Ive set all the tax prices to 4 decimals. This way there would still be some rounding issues but then only on the 4th decimal (witch no one would see)

Now all taxes are calculated as supposed to.
Title: Re: Tax calculation on multiple items.
Post by: bytelord on November 26, 2012, 13:11:04 PM
Nice :)