Wrong calculation on items discount
-
Hi
I’m using your plugin version 4.0.4 and it is very easy to setup and configure. But I’m having an error when an order is placed with more than one item. The error context is:
- Configure different “quantity based discount” for product categories. Discounts are for +50 units per item.
- Add two or more items to cart with +50 units to apply for discount.
- Go to cart with items and see that unit price is correctly calculated based on discount for that product.
- Place the order.
- At the backend, look at the order details and see that the total discount it’s OK, but unit prices are wrong calculated.
Take a look at the screenshots:
After review the calculations, I notice that the total discount (that it is ok) is divided by the total units at the order (adding each line units) and the line discount (and final unit price) is calculated substracting that value (“discount per unit”) to each base unit price.
Example:
ITEM 1
Unite price: $ 120.00, Qty: 10, Discount: 5%
Real unit price: $ 114.00
Real total discount: $ 60.00
Calculated unit price: $ 90.37
Calculated total discount: $ 296.25ITEM 2
Unite price: $ 150.00, Qty: 30, Discount: 25%
Real unit price: $ 112.50
Real total discount: $ 1125.00
Calculated unit price: 120.37
Calculated total discount: $ 888.75TOTALS
Total Discount: $ 1185,00
Total Units: 40
Calculated discount per unit (for all items): $ 29.625I appreciate your help to solve this issue.`
The page I need help with: [log in to see the link]
- The topic ‘Wrong calculation on items discount’ is closed to new replies.