bug: creative tax calculations
I have 2 products A & B, both priced at €50, both are checked VAT+Taxes.
Product A has a rate of 10% and shows price including. Product B has a rate of 10% shows price excluding.
When placing an order for these products, they get stored differently in the sf_order table inside the db.
Product B has a tax amount of 5 and a sub_total_display of 50.
Product A has a tax amount of -7,1054273576010019E-15 and a sub_total_display of 55,000000000000007
Either someone was creative in avoiding a divide-by-zero on some calculations or there's a perfect explanation that eludes me, but I hope we round numbers to say 3-4 digits or so before storing in the db no?
I'm sure the IRS won't mind if we didn't specify taxes into 15 digits :)
Hi Jochem,
Thank you for reporting this one. I have discussed this with the team and it is going to be resolved for the upcoming official release.
Best wishes,
Radoslav Georgiev
the Telerik team
Hello Jochem,
Thanks. We have logged it for fixing. I think the fix will make it in the 4.2 release.
Your account has been updated.
Hey Radoslav & Georgi,
Thanks that would be awesome cause it's not only weird but it kinda screws up if you'd do filtering or calculation to see if products had taxes = 0 or discount rates with price > 50 etc :)
Jochem.