Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030498
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Discounts and Promotionsmajoralways2015-08-04 13:412015-11-06 11:09
ReportermalsasuaView Statuspublic 
Assigned Tojorge-garcia 
PriorityhighResolutionfixedFixed in VersionRR15Q4
StatusclosedFix in branchFixed in SCM revision92e150fb1815
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030498: infinite loop with discounts of type "Buy X pay Y of different product"

Descriptionwhen there are several discounts of type "Buy X pay Y of different product", and several products are added to receipt, then the total button never is enabled. Infinite loop in discount executor

note: with old flow discount is working fine
Steps To Reproduce. in back office:
 . go to discount and promotions window
 . create three new discounts:
  disc1: see disc1 attached
  disc2: see disc2 attached
  disc3: see disc3 attached

. in web pos
 . create a new receipt (see receipt.png attached). Add the products quickly

total button never is enabled
TagsNo tags attached.
Attached Filespng file icon disc1.png [^] (146,315 bytes) 2015-08-04 13:41


png file icon dis2.png [^] (139,264 bytes) 2015-08-04 13:41


png file icon disc3.png [^] (138,981 bytes) 2015-08-04 13:41


png file icon receipt.png [^] (315,849 bytes) 2015-08-04 13:42

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0031390RR15Q3.3 closedjorge-garcia infinite loop with discounts of type "Buy X pay Y of different product" 
related to defect 0029522 closedjorge-garcia [RR15Q3 & RR15Q2.4] Adding products fast enough makes product discount disappear 
causes design defect 0030942RR15Q4 closedOrekaria Events are being fired when the applyDiscounts tries to prevent infinite loop 
causes defect 0030904 closedjorge-garcia Taxes and total not updated when a line is removed with the old discount flow 

-  Notes
(0080116)
hgbot (developer)
2015-09-04 13:28

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 92e150fb18152d7831b7cfbe74329e5582a0eaf9
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Aug 28 08:36:38 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/92e150fb18152d7831b7cfbe74329e5582a0eaf9 [^]

Fixed issue 30498: infinite loop with discounts of type "Buy X pay Y of
different product"

It's necessary to set two flags in the applyDiscounts process.
“IsBeingDiscounted” indicates that the process is running. The second,
“reApplyDiscounts” is set to true if the applyDiscounts process is called more
than once, applying the discounts only one more time.

This way, the process doesn't do an infinite loop calculating discounts.

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

- Issue History
Date Modified Username Field Change
2015-08-04 13:41 malsasua New Issue
2015-08-04 13:41 malsasua Assigned To => Retail
2015-08-04 13:41 malsasua File Added: disc1.png
2015-08-04 13:41 malsasua Resolution time => 1441231200
2015-08-04 13:41 malsasua Triggers an Emergency Pack => No
2015-08-04 13:41 malsasua File Added: dis2.png
2015-08-04 13:41 malsasua File Added: disc3.png
2015-08-04 13:42 malsasua File Added: receipt.png
2015-08-13 18:05 ddeyris Issue Monitored: ddeyris
2015-08-21 09:28 jorge-garcia Assigned To Retail => jorge-garcia
2015-08-21 14:09 egoitz Issue Monitored: egoitz
2015-09-01 15:24 jorge-garcia Status new => scheduled
2015-09-04 13:28 hgbot Checkin
2015-09-04 13:28 hgbot Note Added: 0080116
2015-09-04 13:28 hgbot Status scheduled => resolved
2015-09-04 13:28 hgbot Resolution open => fixed
2015-09-04 13:28 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/92e150fb18152d7831b7cfbe74329e5582a0eaf9 [^]
2015-09-07 11:46 marvintm Review Assigned To => marvintm
2015-09-07 11:46 marvintm Status resolved => closed
2015-09-07 11:46 marvintm Fixed in Version => RR15Q4
2015-09-26 22:30 Orekaria Relationship added causes 0030942
2015-09-29 13:12 Orekaria Relationship added causes 0030904
2015-11-06 10:11 jorge-garcia Relationship added related to 0029522
2015-11-06 11:01 jorge-garcia Status closed => new
2015-11-06 11:01 jorge-garcia Resolution fixed => open
2015-11-06 11:01 jorge-garcia Fixed in Version RR15Q4 =>
2015-11-06 11:01 jorge-garcia Status new => scheduled
2015-11-06 11:02 jorge-garcia Status scheduled => resolved
2015-11-06 11:02 jorge-garcia Resolution open => fixed
2015-11-06 11:02 jorge-garcia Status resolved => closed
2015-11-06 11:09 jorge-garcia Fixed in Version => RR15Q4


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker