I've been looking on the other post but couldn't find a clear answer about how should we calculate the tax for order with discount amount.
Our calculation for order with discount percentage is correct, however if the discount is not percentage, it is off by $0.01 for some orders.
Our current method for discount with amount is:
1. Calculate order tax (tax A) from (subtotal - discount amount). Rounded up
2. Calculate discount tax (tax B). Rounded up
3. Total tax amount = tax A - tax B
Any guide would be very appreciated.