Magento – Magento 1.7 wrong tax for product when discount is active

magento-1.7theme

I have a fixed discount amount of 30 for the whole cart.
My product price is 189, and product tax is 5% = 9.

When I apply fixed discount of 30, my prodcuct tax should be caluclated for 159, and it should be 7,95. For some reason Magento returns me 7,57 for the tax and 151,43 for the subtotal.

Any ideas?

Best Answer

I have a 'deja vu' feeling. See this question. The tax is calculated correctly: price with tax 189 means...price without tax = 189 / 1.05 = 180 and tax = 189-180 = 9.

For price with tax = 159...price without tax = 159 / 1.05 = 151.4285 (almost 151.43) and tax = 159 - 151.43 = 7.57