How do coupons impact tax calculations?
Coupons are applied to the product price before tax is calculated. To make sure taxes are then calculated correctly due to rounding, we need to split the discount across all items in the cart rather than simply remove an amount from the total.
When you split a discount across the cart, naturally, half values could occur which in turn can cause rounding issues once everything is summed up.
To help mitigate this we only deal with cent values. Once split between items, any remainder is applied one line item at a time until exhausted. The final total will then equal the applied discount total. This is most important for fixed cart discounts.