Openbravo Issue Tracking System - Retail Modules
View Issue Details
0032217Retail ModulesDiscounts and Promotionspublic2016-02-12 12:132016-03-07 17:27
malsasua 
jorge-garcia 
highmajoralways
closedfixed 
20Community Appliance
 
RR16Q1 
marvintm
No
0032217: [RR15Q4] [Multipricelist] discretionary discounts are removed when business partner is changed (with multiprice list)
with multiprice list activated, when the business partner is changed, the discretionary discounts are removed in ticket
in webpos: store MPL1
. business partner: Arturo Montoro
. add "adhesive body warmers"
. apply discretionary discount "disc 5%"
. change the business partner to Bryan Raymond
the discretionary discount has been removed
No tags attached.
related to defect 0032115 closed jorge-garcia [Multipricelist] multiprice is not working when pricelist is not selected in the store 
depends on backport 0032225RR16Q1 closed guilleaer [RR15Q4] [Multipricelist] discretionary discounts are removed when business partner is changed (with multiprice list) 
depends on backport 0032226RR15Q4.5 closed jorge-garcia [RR15Q4] [Multipricelist] discretionary discounts are removed when business partner is changed (with multiprice list) 
Issue History
2016-02-12 12:13malsasuaNew Issue
2016-02-12 12:13malsasuaAssigned To => Retail
2016-02-12 12:13malsasuaResolution time => 1456614000
2016-02-12 12:13malsasuaTriggers an Emergency Pack => No
2016-02-12 12:55OrekariaSummarydiscretionary discounts are removed when business partner is changed (with multiprice list) => [RR15Q4] [Multipricelist] discretionary discounts are removed when business partner is changed (with multiprice list)
2016-02-12 12:56OrekariaStatusnew => acknowledged
2016-02-12 13:32OrekariaStatusacknowledged => scheduled
2016-02-12 18:03OrekariaRelationship addedrelated to 0032115
2016-02-15 17:24jorge-garciaAssigned ToRetail => jorge-garcia
2016-02-23 10:33hgbotCheckin
2016-02-23 10:33hgbotNote Added: 0084416
2016-02-23 10:33hgbotStatusscheduled => resolved
2016-02-23 10:33hgbotResolutionopen => fixed
2016-02-23 10:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dcf5fd700abc4b90c5601a0359e5e29d7a004eb4 [^]
2016-02-23 10:34hgbotCheckin
2016-02-23 10:34hgbotNote Added: 0084417
2016-02-23 10:34hgbotCheckin
2016-02-23 10:34hgbotNote Added: 0084418
2016-02-25 19:47guilleaerNote Added: 0084527
2016-02-29 09:32marvintmNote Added: 0084582
2016-02-29 09:32marvintmStatusresolved => new
2016-02-29 09:32marvintmResolutionfixed => open
2016-02-29 13:05marvintmStatusnew => scheduled
2016-03-04 08:30hgbotCheckin
2016-03-04 08:30hgbotNote Added: 0084705
2016-03-04 12:24marvintmStatusscheduled => resolved
2016-03-04 12:24marvintmResolutionopen => fixed
2016-03-07 11:33marvintmReview Assigned To => marvintm
2016-03-07 11:33marvintmStatusresolved => closed
2016-03-07 11:33marvintmFixed in Version => RR16Q1
2016-03-07 17:27hgbotCheckin
2016-03-07 17:27hgbotNote Added: 0084788

Notes
(0084416)
hgbot   
2016-02-23 10:33   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: dcf5fd700abc4b90c5601a0359e5e29d7a004eb4
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Feb 19 14:43:08 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dcf5fd700abc4b90c5601a0359e5e29d7a004eb4 [^]

Fixed issue 32217: Discretionary discounts are removed when business partner
is changed with multiprice list

A calculateReceipt is made before the business partner changes, and the
discretionary discounts are removed from the products.

Now, the problem is fixed and the discretionary discounts are not deleted.

---
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
---
(0084417)
hgbot   
2016-02-23 10:34   
Repository: erp/pmods/org.openbravo.retail.sampledata
Changeset: 34bb80a4a4003b8ef193d239723a7ad8c137671c
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Feb 19 09:07:01 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/34bb80a4a4003b8ef193d239723a7ad8c137671c [^]

Related to issue 32217: Discretionary discounts are removed when business partner
is changed with multiprice list

Sampledata needs to be changed due to the new tests:
* New promotion created only for Stephane Cluster.
* Stephane Cluster has no taxes (tax excempt).

---
M referencedata/sampledata/The_White_Valley_Group/C_BPARTNER.xml
M referencedata/sampledata/The_White_Valley_Group/M_OFFER.xml
M referencedata/sampledata/The_White_Valley_Group/M_OFFER_PRODUCT.xml
A referencedata/sampledata/The_White_Valley_Group/M_OFFER_BPARTNER.xml
---
(0084418)
hgbot   
2016-02-23 10:34   
Repository: tools/automation/pi-mobile
Changeset: edbe4e37d7dfa610fb3bda5cd5a6181d1fe7aa68
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Feb 23 10:31:10 2016 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/edbe4e37d7dfa610fb3bda5cd5a6181d1fe7aa68 [^]

Verifies issue 32217: Discretionary discounts are removed when business partner
is changed with multiprice list

Added test:
* I32217_MPLDiscountOnlyForOneCustomerAndDifferentTaxes
* I32217_MPLDiscretionaryPromotions

---
M src-test/org/openbravo/test/mobile/common/selenium/javascript/TestId.java
A src-test/org/openbravo/test/mobile/quarantine/pack/JGA/multipricelist/I32217_MPLDiscountOnlyForOneCustomerAndDifferentTaxes.java
A src-test/org/openbravo/test/mobile/quarantine/pack/JGA/multipricelist/I32217_MPLDiscretionaryPromotions.java
---
(0084527)
guilleaer   
2016-02-25 19:47   
Attributes of a backbone model should be accessed and set through get and set functions instead of assign it directly.

I.E.
me.attributes.lines.at(index).set('promotions', lines[index].attributes.promotions);

should be

me.get('lines').at(index).set('promotions', lines[index].get('promotions'));
(0084582)
marvintm   
2016-02-29 09:32   
The fix can be improved so that instead of executing calculateReceipt twice, it's done just once.
(0084705)
hgbot   
2016-03-04 08:30   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 560b5385b3305f4057d96d47ae1d54564e41b8c8
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Mar 03 15:47:03 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/560b5385b3305f4057d96d47ae1d54564e41b8c8 [^]

Related to issue 32217: Discretionary discounts are removed when business
partner is changed (with multiprice list)

Some changes are necessary to improve performance.

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0084788)
hgbot   
2016-03-07 17:27   
Repository: retail/backports/3.0RR15Q4.5/org.openbravo.retail.posterminal
Changeset: fa14d19acc1ca15488172ba6851cf4b14b98bf9b
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Mon Mar 07 16:47:36 2016 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q4.5/org.openbravo.retail.posterminal/rev/fa14d19acc1ca15488172ba6851cf4b14b98bf9b [^]

Fixed issue 32226: discretionary discounts are removed when business partner
is changed with multiprice list

Backport of the issue 32217 for 3.0RR15Q4.5

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
---