I have a discount code on a Magento store that reduces the cost of the purchase by 10%. All works ok in that respect, except for the tax calculation.
Total value of the order is £34.18 Discount to be applied is 10% - £3.42
Therefore the new subtotal is £30.76
If we divide 30.76/1.2 and minus this figure from 30.76, i get the tax amount, which is £5.13.
That is exactly what i want. However, the options in the back of Magento change things dramatically, to the point where the tax is no longer correct, or the total is no longer correct.
If my settings are:
Apply Customer Tax: After Discount Apply Discount On Prices: Including Tax
My figures are: Total value of the order is £34.18 Discount: 10% = £3.42 (Correct) (New subtotal is £30.76) Tax: £5.01 (Incorrect) Total: £30.07 (Incorrect) (Difference of 69p, which is 20% of the discount amount).
What it appears it is doing is taking tax off of the total order and the tax off of the discount also. (Tax calculation is set to be based on the total).
Apply Customer Tax: After Discount Apply Discount On Prices: Excluding Tax
This is the only setting where the tax is calculated properly and correct, however, the discount on the front end is shown incorrect (showing excluding tax).
Apply Customer Tax: Before Discount Apply Discount On Prices: Including Tax
Tax is incorrect and displays as £5.70
So, am i missing something really simply, or is it a lot harder than this and certain files will need to be edited to get what i want? Magento 126.96.36.199 is my version, and i have been back and forth through the settings time and time again.