Openbravo Issue Tracking System - Retail Modules
View Issue Details
0042194Retail ModulesDiscounts and Promotionspublic2019-11-05 12:152020-02-14 19:49
lorenzofidalgo 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
main 
RR20Q2 
guilleaer
No
0042194: [RR19Q4] Several packs amount is not properly calculated when products overlap
In case Packs share products in different packs, the discount amount is wrongly calculated.
0-Log in POS backend, in Discounts and Promotions window, add the following record:
--
Organization: The White Valley Group
Discount/Promotion Type: Pack
Name: Test1 Pack
Starting Date: 01-01-2012
Included Products: only those defined
Discount/Promotion Price: 100
--
Save the record.
In Products tab, add:
--
Adhesive body warmers Qty:1
Down sleeping bag 500 Qty:1
--
Save the record.

1-Log in POS as vallblanca.
2-Go to Search and type "Pack". Realise "Camping Pack" and "Test1 Pack" are shown there.
3-To add them, click in both aforemetioned packs: "Camping Pack" and "Test1 Pack" (385.00€ and 100€. Total amount must be 485.00€). DEFECT: Total Amount is not calculating properly both packs separately.
No tags attached.
png WrongAmounts.png (175,727) 2019-11-05 12:15
https://issues.openbravo.com/file_download.php?file_id=13481&type=bug
png
Issue History
2019-11-05 12:15lorenzofidalgoNew Issue
2019-11-05 12:15lorenzofidalgoAssigned To => Retail
2019-11-05 12:15lorenzofidalgoFile Added: WrongAmounts.png
2019-11-05 12:15lorenzofidalgoTriggers an Emergency Pack => No
2019-11-05 12:43lorenzofidalgoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19602#r19602
2019-11-19 11:59ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-01-07 15:15ranjith_qualiantech_comStatusnew => scheduled
2020-02-14 12:20hgbotCheckin
2020-02-14 12:20hgbotNote Added: 0117802
2020-02-14 12:20hgbotStatusscheduled => resolved
2020-02-14 12:20hgbotResolutionopen => fixed
2020-02-14 12:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/4d46adbf2b047c8d3a835b0a1929bbc965081f02 [^]
2020-02-14 19:49guilleaerReview Assigned To => guilleaer
2020-02-14 19:49guilleaerStatusresolved => closed
2020-02-14 19:49guilleaerFixed in Version => RR20Q2

Notes
(0117802)
hgbot   
2020-02-14 12:20   
Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: 4d46adbf2b047c8d3a835b0a1929bbc965081f02
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Feb 14 16:49:53 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/4d46adbf2b047c8d3a835b0a1929bbc965081f02 [^]

Fixed issue 42194 : Updated Pack Discount Calculation

* Pack discount should be applied on Original Line price instead of Calculated Line Price

---
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountPackTest.java
M web/org.openbravo.retail.discounts/js/discountsengine/common/rules/pack-discount.js
---