Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037057Retail ModulesWeb POSpublic2017-10-11 15:552017-10-27 12:49
aaroncalero 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR18Q1 
marvintm
No
0037057: Mandatory Services search should be blocked while the calculateReceipt function is being executed
When a product is added to a ticket and there are mandatory services related to said product, the mandatory services search is opened and the services are listed right away, while the calculateReceipt function might still be executing.
Some functionalities might require the total of the lines to be calculated (i.e. the Automatic Service Price Rule Calculation: org.openbravo.retail.services.autoprice) before showing the service list
Login in web pos
Open the browser console and execute this[1] code to add a hook that slows down the calculateReceipt process.
Go to the Search tab, search for the Blue Trousers product and add it to the ticket.
The Mandatory services search will be shown, and after 5 seconds the total of the ticket will be correctly calculated.


[1] OB.UTIL.HookManager.registerHook('OBPOS_PreApplyAutomaticDiscount', function(args, callback){
setTimeout(function(){
  OB.UTIL.HookManager.callbackExecutor(args, callback);
}, 5000)
})
Attached diffs with the following changes:
Postermina: When the calculateReceipt has finished, trigger the 'calculatedReceipt' event on the receipt model.
Mobile Core: Instead of launching the service search right away, if the calculateReceipt is still pending wait for the 'calculatedReceipt' event to trigger the search.
No tags attached.
diff Issue37057_Posterminal.diff (757) 2017-10-11 16:07
https://issues.openbravo.com/file_download.php?file_id=11171&type=bug
diff Issue37057_MobileCore.diff (1,784) 2017-10-11 16:08
https://issues.openbravo.com/file_download.php?file_id=11172&type=bug
Issue History
2017-10-11 15:55aaroncaleroNew Issue
2017-10-11 15:55aaroncaleroAssigned To => Retail
2017-10-11 15:55aaroncaleroResolution time => 1508882400
2017-10-11 15:55aaroncaleroTriggers an Emergency Pack => No
2017-10-11 16:07aaroncaleroFile Added: Issue37057_Posterminal.diff
2017-10-11 16:08aaroncaleroFile Added: Issue37057_MobileCore.diff
2017-10-19 11:55ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-10-19 11:55ranjith_qualiantech_comStatusnew => scheduled
2017-10-23 13:00hgbotCheckin
2017-10-23 13:00hgbotNote Added: 0099992
2017-10-23 13:00hgbotStatusscheduled => resolved
2017-10-23 13:00hgbotResolutionopen => fixed
2017-10-23 13:00hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fa427f5256aa97b295fb15aa846ea97bf4be2c6b [^]
2017-10-24 12:05hgbotCheckin
2017-10-24 12:05hgbotNote Added: 0100018
2017-10-27 12:49marvintmReview Assigned To => marvintm
2017-10-27 12:49marvintmStatusresolved => closed
2017-10-27 12:49marvintmFixed in Version => RR18Q1

Notes
(0099992)
hgbot   
2017-10-23 13:00   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: fa427f5256aa97b295fb15aa846ea97bf4be2c6b
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Oct 23 16:18:06 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fa427f5256aa97b295fb15aa846ea97bf4be2c6b [^]

Fixed issue 37057 : Show Product Services after calculateReceipt completed

---
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproductcharacteristic.js
---
(0100018)
hgbot   
2017-10-24 12:05   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: ab7e3eb2ff506c5d564376e6e792aa7c5dde6adf
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Oct 24 15:23:59 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ab7e3eb2ff506c5d564376e6e792aa7c5dde6adf [^]

Related to issue 37057 : Removed unused warning while searching services

---
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproductcharacteristic.js
---