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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031390
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Discounts and Promotionsmajoralways2015-08-04 13:412015-12-03 18:01
ReportermalsasuaView Statuspublic 
Assigned Tojorge-garcia 
PriorityhighResolutionfixedFixed in VersionRR15Q3.3
StatusclosedFix in branchFixed in SCM revision72d3ee12d66b
ProjectionnoneETAnoneTarget VersionRR15Q3.3
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned Toguilleaer
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0031390: 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 Files

- Relationships Relation Graph ] Dependency Graph ]
has duplicate defect 0029522 closedjorge-garcia [RR15Q3 & RR15Q2.4] Adding products fast enough makes product discount disappear 
blocks defect 0030498 closedjorge-garcia infinite loop with discounts of type "Buy X pay Y of different product" 

-  Notes
(0082310)
hgbot (developer)
2015-11-25 08:42

Repository: retail/backports/3.0RR15Q3.3/org.openbravo.retail.posterminal
Changeset: 72d3ee12d66bfa9e30986477eaeecd3ce8334d0a
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Nov 06 11:20:43 2015 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q3.3/org.openbravo.retail.posterminal/rev/72d3ee12d66bfa9e30986477eaeecd3ce8334d0a [^]

Fixed issue 31390: 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
---
(0082311)
hgbot (developer)
2015-11-25 08:42

Repository: retail/backports/3.0RR15Q3.3/org.openbravo.retail.posterminal
Changeset: 88deb600cc7ab96a2a6209513de2862aadd8dc92
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Nov 19 10:40:09 2015 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q3.3/org.openbravo.retail.posterminal/rev/88deb600cc7ab96a2a6209513de2862aadd8dc92 [^]

Related to issue 31390: infinite loop with discounts of type "Buy X pay Y of
different products

It's necessary to set applyPromotions to false when setting the order type.
If not, calculateGross is never execute.

---
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/pointofsale.js
---
(0082312)
hgbot (developer)
2015-11-25 08:42

Repository: retail/backports/3.0RR15Q3.3/org.openbravo.retail.posterminal
Changeset: 2b3dcd5c13acc99d5e0f2bbef7960a779d1f4386
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Nov 24 17:26:22 2015 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q3.3/org.openbravo.retail.posterminal/rev/2b3dcd5c13acc99d5e0f2bbef7960a779d1f4386 [^]

Related to issue 31390: infinite loop with discounts of type "Buy X pay Y
of different product

Need to add a receipt.calculateGross

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

- Issue History
Date Modified Username Field Change
2015-11-06 11:01 jorge-garcia Type defect => backport
2015-11-06 11:01 jorge-garcia Target Version => RR15Q3.3
2015-11-06 11:10 jorge-garcia Relationship added has duplicate 0029522
2015-11-25 08:42 hgbot Checkin
2015-11-25 08:42 hgbot Note Added: 0082310
2015-11-25 08:42 hgbot Status scheduled => resolved
2015-11-25 08:42 hgbot Resolution open => fixed
2015-11-25 08:42 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/92e150fb18152d7831b7cfbe74329e5582a0eaf9 [^] => http://code.openbravo.com/retail/backports/3.0RR15Q3.3/org.openbravo.retail.posterminal/rev/72d3ee12d66bfa9e30986477eaeecd3ce8334d0a [^]
2015-11-25 08:42 hgbot Checkin
2015-11-25 08:42 hgbot Note Added: 0082311
2015-11-25 08:42 hgbot Checkin
2015-11-25 08:42 hgbot Note Added: 0082312
2015-12-03 18:01 guilleaer Review Assigned To marvintm => guilleaer
2015-12-03 18:01 guilleaer Status resolved => closed
2015-12-03 18:01 guilleaer Fixed in Version => RR15Q3.3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker