Openbravo Issue Tracking System - Retail Modules
View Issue Details
0051189Retail ModulesWeb POSpublic2022-12-17 08:572024-08-16 09:20
ranjith_qualiantech_com 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
 
No
0051189: Discount amount is more than Line amount when applying Two Families Discount
Discount amount is more than Line amount when applying Two Families Discount
Livebuilds modules
Backoffice
1) Enable discount "Cooking Set - 50% discount in second unit"
   Update Fixed Discount as "15.00" for Family 1
   Make Product "Cooking Set" as inactive in Family 1

POS
1) Add Product "Cooking Set"
2) Add Product "Plastic fly swatter"
3) Confirm discount "Cooking Set - 50% discount in second unit" is applied for all lines
4) For Line "Plastic fly swatter", discount amount "15" is more than line gross amount "2.50" <-- KO

No tags attached.
related to defect 0052829 closed radhakrishnan TwoFamiliesCombo junit tests are not included in ci 
png TwoFamilyDiscount.png (104,930) 2023-02-07 10:13
https://issues.openbravo.com/file_download.php?file_id=18101&type=bug
png
Issue History
2022-12-17 08:57ranjith_qualiantech_comNew Issue
2022-12-17 08:57ranjith_qualiantech_comAssigned To => Retail
2022-12-17 08:57ranjith_qualiantech_comFile Added: TwoFamilyDiscount.png
2022-12-17 08:57ranjith_qualiantech_comTriggers an Emergency Pack => No
2023-02-07 07:23ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2023-02-07 07:23ranjith_qualiantech_comStatusnew => scheduled
2023-02-07 10:10ranjith_qualiantech_comSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25502#r25502
2023-02-07 10:13ranjith_qualiantech_comFile Deleted: TwoFamilyDiscount.png
2023-02-07 10:13ranjith_qualiantech_comFile Added: TwoFamilyDiscount.png
2023-02-08 10:23hgbotNote Added: 0146286
2023-06-22 12:16aferrazRelationship addedrelated to 0052829
2024-08-16 09:20hgbotNote Added: 0168119
2024-08-16 09:20hgbotResolutionopen => fixed
2024-08-16 09:20hgbotStatusscheduled => closed
2024-08-16 09:20hgbotNote Added: 0168120

Notes
(0146286)
hgbot   
2023-02-08 10:23   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discount.twofamiliescombo/-/merge_requests/3 [^]
(0168119)
hgbot   
2024-08-16 09:20   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discount.twofamiliescombo/-/merge_requests/3 [^]
(0168120)
hgbot   
2024-08-16 09:20   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discount.twofamiliescombo [^]
Changeset: 6b6f34de2c726d4983ff75ea9745602117f2c0fc
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 14-08-2024 09:36:59
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discount.twofamiliescombo/-/commit/6b6f34de2c726d4983ff75ea9745602117f2c0fc [^]

Fixed ISSUE-51189: Fixed Discount amount should not exceed the line unit price
* When family is defined with fixed discount, then discount amount for family
  should be minimum value from line unit price and fixed discount amount

---
M src-test/org/openbravo/discount/twofamiliescombo/test/unittests/DiscountTwoFamiliesComboTest.java
M web/org.openbravo.retail.discount.twofamiliescombo/app/model/business-logic/discounts-engine/engine/rules/two-families-combo-discount.js
---