Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0031261 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Discounts and Promotions | major | always | 2015-10-27 11:10 | 2015-12-04 16:30 | |||
Reporter | jorge-garcia | View Status | public | |||||
Assigned To | jorge-garcia | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | RR16Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 0aa75789a053 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | marvintm | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0031261: Promotions are wrong applied if there is more than one promotion for the products | |||||||
Description | Promotions are wrong applied if there is more than one promotion that can be applied for the products of the receipt. This happens even if you use priority order in the promotions. There is also a performance problems when you have a lot of lines in the receipt. | |||||||
Steps To Reproduce | 1) Create a new promotion: Name: bottles called 6 x 3 - Bottles Type: Buy X Pay Y from different Products Subtype: Apply Lowest Distribute between lines: checked X: 6 Y: 3 2) In the Products tab: Use the same Products of the 3 x 2 - Bottles promotion 3) Login in the Web POS 4) Add 6 products, that are included in the bottle's promotions, to the receipt. 5) See that the promotion that had been applied is 3 x 2 - Bottles (It's applied twice). 6) Try the same scenario setting priority for these promotions i) 3 x 2 - Bottles: 20 ii) 6 x 4 - Bottles: 10 7) Repeat steps 3 to 5 and check the result is the same. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|||||||||||||||
|
![]() |
|
(0081428) hgbot (developer) 2015-11-02 12:56 |
Repository: erp/pmods/org.openbravo.retail.discounts Changeset: 0aa75789a053f6fd069baab3ff1509f3a827e40e Author: Jorge Garcia <jorge.garcia <at> openbravo.com> Date: Thu Oct 29 18:09:00 2015 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/0aa75789a053f6fd069baab3ff1509f3a827e40e [^] Fixed issue 31261: Promotions are wrong applied if there is more than one promotion for the products Due to the changes in the perfomance and the discount rules engine, two rule's implementations has changed: * promotion-XYdifferentProduts.js * promotion-pack.js The first one has change because in some cases, the promotion doesn't apply correctly the rule (CIG Concept Original fix). The second one has change because of the performance fix (part of the fix for Cig Concept issue) in the discount engine. --- M web/org.openbravo.retail.discounts/js/promotion-XYdifferentProduts.js M web/org.openbravo.retail.discounts/js/promotion-pack.js --- |
(0081429) hgbot (developer) 2015-11-02 12:57 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: f229f40bfc5d8388d597bae8eb05fe97366b8bfb Author: Jorge Garcia <jorge.garcia <at> openbravo.com> Date: Thu Oct 29 18:11:33 2015 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f229f40bfc5d8388d597bae8eb05fe97366b8bfb [^] Related to issue 31261: Promotions are wrong applied if there is more than one promotion for the products Some changes in performance and discount rules are necessary. Now there is the option to take the promotionCandidates in the implementation of the rules. --- M web/org.openbravo.retail.posterminal/js/model/discounts.js M web/org.openbravo.retail.posterminal/js/model/executor.js M web/org.openbravo.retail.posterminal/js/model/order.js --- |
(0081430) hgbot (developer) 2015-11-02 12:57 |
Repository: erp/pmods/org.openbravo.retail.sampledata Changeset: 141d658db3bf8aa755a4aaf1fb60ee0d54ada98a Author: Jorge Garcia <jorge.garcia <at> openbravo.com> Date: Thu Oct 29 18:16:58 2015 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/141d658db3bf8aa755a4aaf1fb60ee0d54ada98a [^] Related to issue 31261: Promotions are wrong applied if there is more than one promotion for the products Some changes in the sampledata are necessary for the tests. Added three new promotions: * 2 x 1 - Ski Touring * 3 x 2 - Ski Touring * 6 x 4 - Ski Touring Note: By default, these promotions are subtype lowest and not distributed For each promotion we add the same products seven products: * Pole 2 section ski touring * Ski touring bindings * Ski touring board Dyn * Ski touring board Pyr * Ski touring boot alpine * Ski touring helmet * Ski touring pole compact --- M referencedata/sampledata/The_White_Valley_Group/M_OFFER.xml M referencedata/sampledata/The_White_Valley_Group/M_OFFER_PRODUCT.xml --- |
(0081431) hgbot (developer) 2015-11-02 12:58 |
Repository: tools/automation/pi-mobile Changeset: 4841075d54192777de4a7c8d5e1e542f93014d44 Author: Jorge Garcia <jorge.garcia <at> openbravo.com> Date: Thu Oct 29 18:03:02 2015 +0100 URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/4841075d54192777de4a7c8d5e1e542f93014d44 [^] Verifies issue 31261: Promotions are wrong applied if there is more than one promotion for the products Added test to cover these scenarios: * Three possible promotions for average subtype * Three possible promotions for lowest subtype * Three possible promotions for most expensive subtype * Three possible promotions for loest distributed subtype Note: There is two kind of test for each case: basic and advanced Some test has been change due to this fix * Communit6783_BuyXPayYDifferentProductCheapestDistribu * Communit6784_BuyXPayYDifferentProductAverage * I28120_SameProductInTwoPacks * I30542_BuyXPayYDiffProd_Average A new class has been added: * OBAddProduct.java: Add products using search tab and set the qty for the product just added. --- M src-test/org/openbravo/test/mobile/common/selenium/javascript/TestId.java 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/Communit6784_BuyXPayYDifferentProductAverage.java M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I28120_SameProductInTwoPacks.java M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I30542_BuyXPayYDiffProd_Average.java M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/SaleWithTwentyLinesII.java A src-test/org/openbravo/test/mobile/common/selenium/utils/OBAddProduct.java A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/MultiPromotions_BuyXPayYDiffProducts_AverageI.java A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/MultiPromotions_BuyXPayYDiffProducts_AverageII.java A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/MultiPromotions_BuyXPayYDiffProducts_LowestDistributedI.java A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/MultiPromotions_BuyXPayYDiffProducts_LowestDistributedII.java A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/MultiPromotions_BuyXPayYDiffProducts_LowestI.java A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/MultiPromotions_BuyXPayYDiffProducts_LowestII.java A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/MultiPromotions_BuyXPayYDiffProducts_MostExpensiveI.java A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/MultiPromotions_BuyXPayYDiffProducts_MostExpensiveII.java --- |
(0081571) jorge-garcia (viewer) 2015-11-06 14:11 |
With this refactor, we notice that the old flow of discounts doesn't work, so the issue is being rescheduled |
(0081618) hgbot (developer) 2015-11-09 12:51 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: 8cd17ca7e9ad07baac12e63834f882597e0c7080 Author: Jorge Garcia <jorge.garcia <at> openbravo.com> Date: Mon Nov 09 10:42:59 2015 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8cd17ca7e9ad07baac12e63834f882597e0c7080 [^] Related to issue 31261: Promotions are wrong applied if there is more than one promotion for the products With the refactor of the discounts and promotions engine, the old flow of discounts doesn't work properly. Now, the problem is fixed and the old flow of discounts works fine. --- M web/org.openbravo.retail.posterminal/js/model/discounts.js M web/org.openbravo.retail.posterminal/js/model/executor.js --- |
![]() |
|||
Date Modified | Username | Field | Change |
2015-10-27 11:10 | jorge-garcia | New Issue | |
2015-10-27 11:10 | jorge-garcia | Assigned To | => jorge-garcia |
2015-10-27 11:10 | jorge-garcia | OBNetwork customer | => No |
2015-10-27 11:10 | jorge-garcia | Triggers an Emergency Pack | => No |
2015-10-27 11:12 | jorge-garcia | Relationship added | related to 0030446 |
2015-10-27 11:12 | jorge-garcia | Status | new => acknowledged |
2015-10-28 11:24 | plujan | Issue Monitored: plujan | |
2015-11-02 12:56 | hgbot | Checkin | |
2015-11-02 12:56 | hgbot | Note Added: 0081428 | |
2015-11-02 12:56 | hgbot | Status | acknowledged => resolved |
2015-11-02 12:56 | hgbot | Resolution | open => fixed |
2015-11-02 12:56 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/0aa75789a053f6fd069baab3ff1509f3a827e40e [^] |
2015-11-02 12:57 | hgbot | Checkin | |
2015-11-02 12:57 | hgbot | Note Added: 0081429 | |
2015-11-02 12:57 | hgbot | Checkin | |
2015-11-02 12:57 | hgbot | Note Added: 0081430 | |
2015-11-02 12:58 | hgbot | Checkin | |
2015-11-02 12:58 | hgbot | Note Added: 0081431 | |
2015-11-06 14:10 | jorge-garcia | Status | resolved => new |
2015-11-06 14:10 | jorge-garcia | Resolution | fixed => open |
2015-11-06 14:10 | jorge-garcia | Status | new => scheduled |
2015-11-06 14:11 | jorge-garcia | Note Added: 0081571 | |
2015-11-09 12:51 | hgbot | Checkin | |
2015-11-09 12:51 | hgbot | Note Added: 0081618 | |
2015-11-09 13:19 | jorge-garcia | Status | scheduled => resolved |
2015-11-09 13:19 | jorge-garcia | Resolution | open => fixed |
2015-11-16 14:04 | Orekaria | Review Assigned To | => marvintm |
2015-12-04 16:30 | marvintm | Status | resolved => closed |
2015-12-04 16:30 | marvintm | Fixed in Version | => RR16Q1 |
2017-04-26 13:56 | jorge-garcia | Relationship added | causes 0035848 |
Copyright © 2000 - 2009 MantisBT Group |