Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041097Retail ModulesDiscounts by Totalpublic2019-06-17 11:162019-08-08 10:18
jorgewederago 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
pi 
RR19Q4 
jorge-garcia
No
0041097: When adding multiple discounts the override functionality is not working as expected under certain conditions
When adding multiple discounts the override functionality is not working as expected under certain conditions
In PI with modules environment

Backend:

    Deactivate the 10% discount on GPS

WebPOS:

    Add Avalanche Transceiver (must be done in this order)
    Add GPS Handheld
    Add the following discount disc_5_var_eur to the GPS
    Add the following discount Variable Percentage Discount by Total 50%
    Add the discount disc_5_var_eur with a value of 10 to the GPS
        This case will not working since is part of the previous fix
    Add the previous discount again but with override checked
        The variable discount of 5 will disappear
        In the Avalanche Transceiver the % discount by total will be duplicated
No tags attached.
caused by defect 0040666 closed ranjith_qualiantech_com Several discounts do not apply to all lines 
related to defect 0041266 closed ranjith_qualiantech_com Variable Discount per Total Amount is duplicated for grouped products if non grouped products are mixed in the ticket 
patch issue 41097 source test.patch (8,181) 2019-07-23 11:34
https://issues.openbravo.com/file_download.php?file_id=13167&type=bug
Issue History
2019-06-17 11:16jorgewederagoNew Issue
2019-06-17 11:16jorgewederagoAssigned To => Retail
2019-06-17 11:16jorgewederagoResolution time => 1562536800
2019-06-17 11:16jorgewederagoTriggers an Emergency Pack => No
2019-06-21 12:47ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-06-21 12:49ranjith_qualiantech_comStatusnew => scheduled
2019-06-24 11:15ranjith_qualiantech_comRelationship addedcaused by 0040666
2019-07-03 17:13ngarciaIssue Monitored: ngarcia
2019-07-03 18:32ngarciaRelationship addedrelated to 0041266
2019-07-12 11:14hgbotCheckin
2019-07-12 11:14hgbotNote Added: 0113323
2019-07-12 11:14hgbotStatusscheduled => resolved
2019-07-12 11:14hgbotResolutionopen => fixed
2019-07-12 11:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6feb61e3aced9b0d972f16ca4978bd220d46011b [^]
2019-07-16 09:25ranjith_qualiantech_comNote Added: 0113393
2019-07-16 09:25ranjith_qualiantech_comStatusresolved => new
2019-07-16 09:25ranjith_qualiantech_comResolutionfixed => open
2019-07-16 09:25ranjith_qualiantech_comStatusnew => scheduled
2019-07-16 09:39hgbotCheckin
2019-07-16 09:39hgbotNote Added: 0113396
2019-07-23 11:34ranjith_qualiantech_comFile Added: issue 41097 source test.patch
2019-08-02 14:02hgbotCheckin
2019-08-02 14:02hgbotNote Added: 0113783
2019-08-05 08:23hgbotCheckin
2019-08-05 08:23hgbotNote Added: 0113804
2019-08-05 08:23hgbotStatusscheduled => resolved
2019-08-05 08:23hgbotResolutionopen => fixed
2019-08-05 08:23hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6feb61e3aced9b0d972f16ca4978bd220d46011b [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f1324d50d9e54bac4a88f05673333ac56a7b278f [^]
2019-08-05 08:23hgbotCheckin
2019-08-05 08:23hgbotNote Added: 0113805
2019-08-08 10:18jorge-garciaReview Assigned To => jorge-garcia
2019-08-08 10:18jorge-garciaNote Added: 0113898
2019-08-08 10:18jorge-garciaStatusresolved => closed
2019-08-08 10:18jorge-garciaFixed in Version => RR19Q4

Notes
(0113323)
hgbot   
2019-07-12 11:14   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 6feb61e3aced9b0d972f16ca4978bd220d46011b
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jul 12 14:44:21 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6feb61e3aced9b0d972f16ca4978bd220d46011b [^]

Fixed issue 41097 : Manual discounts should not be removed when removing discounts with qtyOffer

* After calculating discounts, Manual discounts should not be removed from auxReceipt because
  manual discounts doesn't consume units of the lines

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0113393)
ranjith_qualiantech_com   
2019-07-16 09:25   
Test failing in modules suite
(0113396)
hgbot   
2019-07-16 09:39   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d2d967a08405061dba48f4ed478a0375e99f9774
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jul 16 13:08:22 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d2d967a08405061dba48f4ed478a0375e99f9774 [^]

Related to issue 41097 : Backed out changeset: 6feb61e3aced

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0113783)
hgbot   
2019-08-02 14:02   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 3f8891c8351b58b1ac0cd7c6bebd28824094fbf1
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Aug 02 17:31:41 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/3f8891c8351b58b1ac0cd7c6bebd28824094fbf1 [^]

Related to issue 41097 : Total discounts should be recalculated for Nongrouped Products

* If receipt contains both grouped and nonprouped products, then
  line orderManualPromotionsAlreadyApplied will be updated as false for nonprouped product line
* While calculating discounts for nonprouped product line, other receipt lines
  total discounts promotions should be prevented

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-by-total-utils.js
---
(0113804)
hgbot   
2019-08-05 08:23   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: f1324d50d9e54bac4a88f05673333ac56a7b278f
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Aug 05 11:52:45 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f1324d50d9e54bac4a88f05673333ac56a7b278f [^]

Fixed issue 41097 : Discounts should be replaced in fillpromotions

* While applying manual discount, discount property will be always true, since
  manual discounts doesn't consume units of the lines
* While overriding manual discount, discount property forceReplace will be set as true,
  So it will remove the replace the existing discount with new applied discount
* In fillPromotiionStandard, if the line has Same Promotion for mutiple times,
  all the promotions will be removed and one promotions will be added wit chunks.
  Instead of adding promotion at last of the array,
  promotion should be added at the first index of the respective promotion.
  So Promotion order will not be changed

---
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/ticketdiscount.js
---
(0113805)
hgbot   
2019-08-05 08:23   
Repository: tools/automation/pi-mobile
Changeset: dbb9cf6241b34d7bf79dab4d3ac519a2ad6eb14f
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Aug 05 11:53:21 2019 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/dbb9cf6241b34d7bf79dab4d3ac519a2ad6eb14f [^]

Verifies issue 41097 : Added automated test 'I41097_VerifyManualAndTotalDiscounts'

* Modified Test 'I33201_VerifyPackCombinedWithManualPromotions'

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I33201_VerifyPackCombinedWithManualPromotions.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bytotal/I41097_VerifyManualAndTotalDiscounts.java
---
(0113898)
jorge-garcia   
2019-08-08 10:18   
Code reviewed and tested