Hi Aleksey & Andrew,
Aleksey, on 21 February 2012 - 02:59 PM, said:
There are some threads on this forum where we discuss the rounding problem. Taxes are calculated on sub-totals of products and then rounded. You can read the discussion here:
http://forum.lemonst...-in-lemonstand/
For tax inclusive environment the catalog price is also effectively being rounded (since the db only holds 2 decimal places) as well so that will bugger the maths up.
i.e.
8.33 * 1.2 = 9.996 (which rounds to $10)
2 * (8.33 * 1.2) = 19.99 (doh!)
10 * (8.33 * 1.2) = 99.96 (doh!)
I haven't tried this (since I'm fudging it with no tax and calculating it manually) but would having higher prescission for the catalog price fix this?
If the catalog price is 8.3333333 you'd get
8.3333333 * 1.2 = 9.99999996 (which rounds to $10)
2 * (8.33333333 * 1.2) = 19.9999999 (which rounds to $20)
10 * (8.33333333 * 1.2) = 99.9999996 (which rounds to $100)
100 * (8.33333333 * 1.2) = 999.999996 (which rounds to $1000)
I've got no idea if this would break other things though (i.e. does the rest of LS assume the catalog prices don't need rounding). I saw a thread elsewhere about updating the schema to do this but can't find it again.
Quote
We believe that the current implementation is correct and it satisfies most of our customers. We can extend the tax engine with API so that you would be able to alter the tax calculation process to fit your needs. Please let me know if you want we to do it.
Does this mean that the roadmap task to make LS work in tax inclusive environments will still have these kinds of rounding errors?
Thanks & cheers
Andrew