Openbravo Issue Tracking System - Retail Modules
View Issue Details
0047179Retail ModulesDiscounts and Promotionspublic2021-06-17 20:142021-07-07 07:38
lbressan 
rqueralta 
highmajoralways
closedfixed 
5
pi 
RR21Q4 
No
0047179: Incorrect promotion amount calculated
1. We have 2 price adjustment promotions applicable for a product.
2. If you buy 200 get 800 as off. Next if you buy 400 you get 2000 off.
3. Now when we bill 200 qty, the buy 200 get 800 as off is getting applied,
4. When we bill 399 qty that time 2x of buy 200 get 800 as off is getting applied
5. but when 400 is billed then buy 400 you get 2000 off gets applied.
Issue is with point 4. Why is 2x of the promotion applied when qty is only 399. It should still deduct 800 from bill value,
1. We have 2 price adjustment promotions applicable for a product.
2. If you buy 200 get 800 as off. Next if you buy 400 you get 2000 off.
3. Now when we bill 200 qty, the buy 200 get 800 as off is getting applied,
4. When we bill 399 qty that time 2x of buy 200 get 800 as off is getting applied
5. but when 400 is billed then buy 400 you get 2000 off gets applied.
Issue is with point 4. Why is 2x of the promotion applied when qty is only 399. It should still deduct 800 from bill value.

Attached video.
No tags attached.
? screen-recording-15-06-2021-12-25-15-1_TpFanSjO.avi (1,806,122) 2021-06-17 20:17
https://issues.openbravo.com/file_download.php?file_id=15939&type=bug
? Screen Recording (15-06-2021 12-25-15) (1) - converted with Clipchamp.mp4 (3,662,435) 2021-06-17 20:24
https://issues.openbravo.com/file_download.php?file_id=15940&type=bug
Issue History
2021-06-17 20:14lbressanNew Issue
2021-06-17 20:14lbressanAssigned To => Retail
2021-06-17 20:14lbressanResolution time => 1625090400
2021-06-17 20:14lbressanTriggers an Emergency Pack => No
2021-06-17 20:17lbressanFile Added: screen-recording-15-06-2021-12-25-15-1_TpFanSjO.avi
2021-06-17 20:24lbressanFile Added: Screen Recording (15-06-2021 12-25-15) (1) - converted with Clipchamp.mp4
2021-06-22 17:28rqueraltaAssigned ToRetail => rqueralta
2021-06-22 17:29rqueraltaStatusnew => scheduled
2021-06-26 15:03hgbotNote Added: 0129804
2021-07-05 15:10lbressanNote Added: 0130136
2021-07-06 15:21hgbotNote Added: 0130185
2021-07-07 05:33hgbotNote Added: 0130207
2021-07-07 07:38hgbotResolutionopen => fixed
2021-07-07 07:38hgbotStatusscheduled => closed
2021-07-07 07:38hgbotFixed in Version => RR21Q4
2021-07-07 07:38hgbotNote Added: 0130209
2021-07-07 07:38hgbotNote Added: 0130210

Notes
(0129804)
hgbot   
2021-06-26 15:03   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/28 [^]
(0130136)
lbressan   
2021-07-05 15:10   
any update?
(0130185)
hgbot   
2021-07-06 15:21   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/28 [^]
(0130207)
hgbot   
2021-07-07 05:33   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/30 [^]
(0130209)
hgbot   
2021-07-07 07:38   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 05b5786d0a55da4942be60538df55a0a74f095f8
Author: Rafael Queralta <rafaelcuba81@gmail.com>
Date: 2021-07-06T14:11:04-04:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/05b5786d0a55da4942be60538df55a0a74f095f8 [^]

Fixed BUG-47179: Added rounding mode to calculate totalChunk of discount

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/price-adjustment-discount.js
---
(0130210)
hgbot   
2021-07-07 07:38   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/30 [^]