Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040082Retail ModulesDiscounts Combopublic2019-01-31 10:172019-02-25 09:56
anderaranguren 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
pi 
RR19Q2 
jorge-garcia
No
0040082: The Discount per Unit is wrong calculated in Discount and Promotions line of orderline when doing a order with a Combo
If a combo is selected in the web POS and an extra product contained on the combo is added to the order, discount per unit is calculated with the quantity of the orderline insted of the quantity of the discount line.
Go to the web POS https://livebuilds.openbravo.com/retail_modules_pgsql_pi/web/org.openbravo.retail.posterminal/?terminal=VBS-1#retail.pointofsale [^]
Go to Browse tab and add Torch and Backpack combo.
Select Backpack CB1 25l (from backpack family)
Select 2x Torch CB1 (from torches family)
Apply the combo.
Go to search tab and add another Torch CB1 to the order.
Pay the order.
Go to Sales Order window in BackOffice
Select the order and Torch CB1 line
Realize that in Discounts and Promotions Line the combo quantity is 2 and the total Amount is 10.00
while the discount per unit is 3.33 (as if it was calculating with the orderline quantity)
No tags attached.
related to defect 0039831 closed rqueralta Combo discount is not applied to a line if the family is configured as Fixed Price with the same price of the product to be ap. 
png comboError.png (133,381) 2019-01-31 10:17
https://issues.openbravo.com/file_download.php?file_id=12585&type=bug
png
Issue History
2019-01-31 10:17anderarangurenNew Issue
2019-01-31 10:17anderarangurenAssigned To => Retail
2019-01-31 10:17anderarangurenFile Added: comboError.png
2019-01-31 10:17anderarangurenTriggers an Emergency Pack => No
2019-02-04 07:34ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-02-04 07:34ranjith_qualiantech_comStatusnew => scheduled
2019-02-04 16:35anderarangurenRelationship addedrelated to 0039831
2019-02-05 14:51hgbotCheckin
2019-02-05 14:51hgbotNote Added: 0109586
2019-02-05 14:51hgbotStatusscheduled => resolved
2019-02-05 14:51hgbotResolutionopen => fixed
2019-02-05 14:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/925e5fe4a2c459b2f1211ef218377a2504181779 [^]
2019-02-05 14:52hgbotCheckin
2019-02-05 14:52hgbotNote Added: 0109587
2019-02-12 10:54hgbotCheckin
2019-02-12 10:54hgbotNote Added: 0109684
2019-02-25 09:56jorge-garciaReview Assigned To => jorge-garcia
2019-02-25 09:56jorge-garciaNote Added: 0110047
2019-02-25 09:56jorge-garciaStatusresolved => closed
2019-02-25 09:56jorge-garciaFixed in Version => RR19Q2

Notes
(0109586)
hgbot   
2019-02-05 14:51   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 925e5fe4a2c459b2f1211ef218377a2504181779
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Feb 05 19:21:15 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/925e5fe4a2c459b2f1211ef218377a2504181779 [^]

Fixed issue 40082 : Line Discount Unit price should be calculated based on discount qty instead of line qty

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0109587)
hgbot   
2019-02-05 14:52   
Repository: tools/automation/pi-mobile
Changeset: cbb360f811c94ead96be7cd12c7b0acb98c54936
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Feb 05 19:21:36 2019 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/cbb360f811c94ead96be7cd12c7b0acb98c54936 [^]

Verifies issue 40082 : Added Automated Test 'I40082_VerifyDiscountAmtInOrderLine'

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/Communit6783_BuyXPayYDifferentProductCheapestDistributed.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I22425_Communit6789_BuyXGetYGift.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I40082_VerifyDiscountAmtInOrderLine.java
---
(0109684)
hgbot   
2019-02-12 10:54   
Repository: tools/automation/pi-mobile
Changeset: f83bd6e8e78bf0c1ffc446036a70a20a07cdb5c8
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Feb 12 15:23:55 2019 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/f83bd6e8e78bf0c1ffc446036a70a20a07cdb5c8 [^]

Verifies issue 40082 : Modified Automated Test 'Communit6781_BuyXPayYSameProduct'

* Communit6781_BuyXPayYSameProduct
* Communit6782_BuyXPayYDifferentProductCheapest_I

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/Communit6781_BuyXPayYSameProduct.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/Communit6782_BuyXPayYDifferentProductCheapest_I.java
---
(0110047)
jorge-garcia   
2019-02-25 09:56   
Code reviewed and tested