I know this has been asked multiple times but I still don't understand how Magento calculates the total amount when a discount is applied.
I want all prices to be shown including tax but I want the discount to be calculated before tax is calculated.
Currently i have this situation. Suppose
Settings: Apply Customer Tax : After Discount Apply Discount On Prices : Including Tax (as recommended in the User Guide for EU based shops) Apply Tax On : Custom Price If available
Display Prices: Including Tax Display Subtotal : Excluding Tax
Order: Product price = 40.20 (tax 21% included)
Cart shows: Subtotal: €33.22 (excl tax) Discount: €6.03- (incl tax) Tax: €5.93 (tax=(subtotal-discount(excl tax))*0.21) Total incl tax: 34.17 (total=(33,22-4,98)*1,21
The total amount and the tax calculation is correct but I want the discount to be shown excluding tax and not including tax as it is now.
When I change the setting Apply Discount On Prices to Excluding Tax, it messes up the calculation of the total and tax amount.
Cart shows: Subtotal: €33.22 (excl tax) CORRECT Discount: €4.98- (excl tax) CORRECT Tax: €6.11 INCORRECT (33.22-4.98)*0.21=5.93 Total incl tax: 35.22 INCORRECT
Tax should be calculated as Subtotal - Discount x 0.21