Openbravo Issue Tracking System - Retail Modules
View Issue Details
0047537Retail ModulesDiscounts and Promotionspublic2021-08-11 20:112021-08-25 07:46
lbressan 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
pi 
RR21Q4 
No
0047537: Discount is not applied correctly in version 21Q2.
After applying the patch https://issues.openbravo.com/view.php?id=47408 [^] the discount just is applying one time.
I let a video to see the error:
https://www.youtube.com/watch?v=9RHUSwzpy_g [^]
First of all: It's needed to apply the patch https://issues.openbravo.com/view.php?id=47408 [^]

After applying the patch, the steps are:
1. In the "Discount and Promotion" window, create a new discount.
2. Fill the Starting Date field with the current date.
3. We set the Priority field equal to 7.
4. We put the "Apply Next Discount Promotion" field in FALSE.
5. We put the fields "Included Products" and "Included Price List" in "Only those defined".
6. We put the field "Discount%" with the value 50.
7. We put the field "Min Quantity" with the value 2.
8. We put the field "Is Multiple" with the value TRUE.
9. We put the field "Units per packages" with the value 2.
10. In the "Product" tab, add the product to which the discount will be applied. Example "Adhesive body warmers".
11. In the "Price List" tab, add the price list for the product to which the discount will be applied. Example "The White Valley Group Sale Price List".
12. Login in WebPOS.
13. We add 2 units of the product "Adhesive body warmers". And we see that the discount is applied just one time.
No tags attached.
Issue History
2021-08-11 20:11lbressanNew Issue
2021-08-11 20:11lbressanAssigned To => Retail
2021-08-11 20:11lbressanResolution time => 1629928800
2021-08-11 20:11lbressanTriggers an Emergency Pack => No
2021-08-11 20:13PracticsIssue Monitored: Practics
2021-08-12 14:34gsuarezPrioritynormal => urgent
2021-08-17 15:15ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-08-24 15:34ranjith_qualiantech_comStatusnew => scheduled
2021-08-24 16:37hgbotNote Added: 0131328
2021-08-25 07:46hgbotResolutionopen => fixed
2021-08-25 07:46hgbotStatusscheduled => closed
2021-08-25 07:46hgbotNote Added: 0131336
2021-08-25 07:46hgbotFixed in Version => RR21Q4
2021-08-25 07:46hgbotNote Added: 0131337

Notes
(0131328)
hgbot   
2021-08-24 16:37   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/34 [^]
(0131336)
hgbot   
2021-08-25 07:46   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/34 [^]
(0131337)
hgbot   
2021-08-25 07:46   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 1996937add1f99c5f38ee86bd38c969f7b312dec
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-08-24T19:08:26+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/1996937add1f99c5f38ee86bd38c969f7b312dec [^]

Fixed ISSUE-47537: Discount Amount should be updated based on chunks of discount
* If discount is configured with multiple unit per package, then discount amount should be updated with number of packages applied

---
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountPriceAdjusmentTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/combined/I35637_VerifyPriceAdjWithIsMultiple.java
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/price-adjustment-discount.js
---