Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.8.0-b1
-
Component/s: None
-
Labels:None
Description
To reproduce:
- Create a coupon for 100%
- Start ordering an item in the order form
- Apply 100% coupon
- Finish order and see negative invoice is created
If some line items are not taxable (e.g. setup fees), then this will still result in a negative invoice. Additionally, any proration that occurs may also cause a positive or negative value on a 100% coupon because the sum of the rounded line item prices may be slightly above or below the rounded coupon amount.
I don't see a suitable way to avoid this behavior without integrating updates to the way invoice data is stored. That is, tax rules would need to be stored for each line item and the amounts would have to rounded to the currency's precision prior to storage.