Openbravo Issue Tracking System - Retail Modules
View Issue Details
0047265Retail Modules[POS2] POSpublic2021-06-28 16:282021-07-12 16:10
migueldejuana 
migueldejuana 
normalmajoralways
closedfixed 
5
 
 
guilleaer
No
0047265: Combos with higher discount than line amount, generate negative lines
Applying a Combo, if one of the families have an discount and that discount is higher than the total gross of the line, we get a negative line.
In that case, we should apply the maximum amount and the line will have a 100% of discount.
- Create or modify a combo adding a fixed discount 0f 1000€ to one of the families.
- Go to web POS, add the combo to the ticket (the product of the family with the discount must be less than 1000€)
- We will a combo discount higher that the line amount and we get a negative line
- ERROR! We cannot have negative lines due to a discount applied
When applying the combo discount, ensure that the discount amount is not more than the line amount
NOR
related to defect 0045405 closed ranjith_qualiantech_com Error applying coupon. The last line is negative. 
related to defect 0047365 closed migueldejuana Coupons with higher discount than line amount, generate negative lines 
Issue History
2021-06-28 16:28migueldejuanaNew Issue
2021-06-28 16:28migueldejuanaAssigned To => migueldejuana
2021-06-28 16:28migueldejuanaTriggers an Emergency Pack => No
2021-06-28 16:28migueldejuanaRelationship addedrelated to 0045405
2021-06-28 17:18rafarodaTag Attached: NOR
2021-06-29 16:46hgbotNote Added: 0129956
2021-06-29 16:48hgbotResolutionopen => fixed
2021-06-29 16:48hgbotStatusnew => resolved
2021-06-29 16:48hgbotNote Added: 0129957
2021-06-29 16:48hgbotNote Added: 0129958
2021-07-08 14:35migueldejuanaRelationship addedrelated to 0047365
2021-07-12 08:49migueldejuanaProjectPOS2 => Retail Modules
2021-07-12 16:10guilleaerReview Assigned To => guilleaer
2021-07-12 16:10guilleaerStatusresolved => closed

Notes
(0129956)
hgbot   
2021-06-29 16:46   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.combo/-/merge_requests/12 [^]
(0129957)
hgbot   
2021-06-29 16:48   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.combo [^]
Changeset: 84172c2a8837333c8f073b03f3279d309cd3456a
Author: Miguel de Juana <miguel.dejuana@openbravo.com>
Date: 2021-06-29T13:37:34+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.combo/-/commit/84172c2a8837333c8f073b03f3279d309cd3456a [^]

Fixed ISSUE-0047265: Combos with higher discount than line amount, generate negative lines

- Set discount amount to line amount when discount amount is higher

---
M web/org.openbravo.retail.discounts.combo/app/model/business-logic/discounts-engine/engine/rules/combo-discount.js
---
(0129958)
hgbot   
2021-06-29 16:48   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.combo/-/merge_requests/12 [^]