Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037567Retail ModulesWeb POSpublic2017-12-29 11:182018-02-05 13:40
guillermogil 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
RR18Q2 
marvintm
No
0037567: OBPOS_preAddPayment Hook is not using callback function
OBPOS_preAddPayment Hook is not using callback function.
it is using callback instead of args.callback
Add the following code:

OB.UTIL.HookManager.registerHook('OBPOS_preAddPayment', function (args, c) {

      args.callback = function () {
        alert('Callback Working');
      };

  OB.UTIL.HookManager.callbackExecutor(args, c);
});

Add a payment.
Alert should rise
See attached diff
No tags attached.
diff issue.diff (896) 2017-12-29 11:33
https://issues.openbravo.com/file_download.php?file_id=11402&type=bug
Issue History
2017-12-29 11:18guillermogilNew Issue
2017-12-29 11:18guillermogilAssigned To => Retail
2017-12-29 11:18guillermogilFile Added: issue.diff
2017-12-29 11:18guillermogilTriggers an Emergency Pack => No
2017-12-29 11:33guillermogilFile Deleted: issue.diff
2017-12-29 11:33guillermogilFile Added: issue.diff
2018-01-02 11:04ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2018-01-05 12:49ranjith_qualiantech_comStatusnew => scheduled
2018-01-05 12:49hgbotCheckin
2018-01-05 12:49hgbotNote Added: 0101591
2018-01-05 12:49hgbotStatusscheduled => resolved
2018-01-05 12:49hgbotResolutionopen => fixed
2018-01-05 12:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3567ef3a07ee80da1e165bdfcbc5c98a8f11fb56 [^]
2018-02-05 13:40marvintmReview Assigned To => marvintm
2018-02-05 13:40marvintmStatusresolved => closed
2018-02-05 13:40marvintmFixed in Version => RR18Q2

Notes
(0101591)
hgbot   
2018-01-05 12:49   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 3567ef3a07ee80da1e165bdfcbc5c98a8f11fb56
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jan 05 17:19:18 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3567ef3a07ee80da1e165bdfcbc5c98a8f11fb56 [^]

Fixed issue 37567 : Hook argument callback should be called for PreAddPayment hook

* Hook argument callback should be called instead of original one, because callback can eb overridden while implementing hook

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