Openbravo Issue Tracking System - Retail Modules
View Issue Details
0047408Retail ModulesDiscounts and Promotionspublic2021-07-16 21:572021-07-27 11:11
lbressan 
ranjith_qualiantech_com 
highmajorhave not tried
closedfixed 
5
 
RR21Q4 
No
0047408: Discount and Promotions error in version 21Q2. Discount is not applied correctly
Discount and Promotions error in version 21Q2. Discount is not applied correctly
Step to reproduce:
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 in the wrong way

It is discounting 100% of the value of the second unit of the product instead of discounting 50% of the value of the second unit.
This reproduced in livebuilds 21Q2 and in livebuilds 19Q3.3 it works correctly.
We add a video for more detail on how to reproduce the error. https://youtu.be/8nglLRRO5-8 [^]
No tags attached.
Issue History
2021-07-16 21:57lbressanNew Issue
2021-07-16 21:57lbressanAssigned To => Retail
2021-07-16 21:57lbressanResolution time => 1628200800
2021-07-16 21:57lbressanTriggers an Emergency Pack => No
2021-07-16 22:08PracticsIssue Monitored: Practics
2021-07-19 11:27guilleaerAssigned ToRetail => ranjith_qualiantech_com
2021-07-19 11:27guilleaerStatusnew => acknowledged
2021-07-27 10:53hgbotNote Added: 0130774
2021-07-27 11:11hgbotNote Added: 0130777
2021-07-27 11:11hgbotResolutionopen => fixed
2021-07-27 11:11hgbotStatusacknowledged => closed
2021-07-27 11:11hgbotFixed in Version => RR21Q4
2021-07-27 11:11hgbotNote Added: 0130778

Notes
(0130774)
hgbot   
2021-07-27 10:53   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/31 [^]
(0130777)
hgbot   
2021-07-27 11:11   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/31 [^]
(0130778)
hgbot   
2021-07-27 11:11   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: e0c497cd9ebb842a98428be3c1bbdce1b3cfbaa4
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-07-27T09:37:51+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/e0c497cd9ebb842a98428be3c1bbdce1b3cfbaa4 [^]

Fixed ISSUE-47408: UnitPrice should be used for discount if units per package is configured

---
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
---