Openbravo Issue Tracking System - Retail Modules
View Issue Details
0051424Retail ModulesWeb POSpublic2023-01-20 08:432023-01-20 08:43
pniam 
Retail 
highminoralways
newopen 
5
 
 
No
0051424: Percentage wrong calculated on WebPOS for 20Q3
(WebPOS) When you create an order and apply more than one discount everything is ok, but when the order is finished and you open it again from "Open Receipt" the way is now calculating the percentage applied in each discount is allways doing:
OB.DEC.mul(OB.DEC.div(promotion.amt, iter.lineGrossAmount), new BigDecimal('100'));
Which is wrong because the second discount must be calculated from iter.lineGrossAmount - firstPromotion.amt
- Log in into Web POS
- Select a product with amount of 100€
- Add a discount of 10%
- Add a discount of 5€
- Add a discount of 5%
- Pay the receipt
- Go to "Open Receipt" and open it
- If you check the array of promotions from OB.MobileApp.model.receipt.get('lines').at(0).get('promotions') the third promotion will have an userAmt of 4% instead of 5%
No tags attached.
Issue History
2023-01-20 08:43pniamNew Issue
2023-01-20 08:43pniamAssigned To => Retail
2023-01-20 08:43pniamTriggers an Emergency Pack => No

There are no notes attached to this issue.