13 Aug 2007
22 Jul 2011
Link to this post
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 :)