Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037284Retail ModulesWeb POSpublic2017-11-14 09:482017-12-26 18:17
adrianromero 
adrianromero 
normalminorhave not tried
closedfixed 
5
 
RR18Q1 
guilleaer
No
0037284: It should be good to have an utility function to get a payment by key
To reuse code it should be good to have the following utility function:

OB.UTIL.getPaymentByKey = function (key) {
  var i;
  var terminalPayments = OB.MobileApp.model.get('payments');
  for (i = 0; i < terminalPayments.length; i++) {
    if (terminalPayments[i].payment.searchKey === key) {
      return terminalPayments[i];
    }
  }
  return null;
};
N/A
No tags attached.
patch issue0037284.patch (953) 2017-11-14 09:55
https://issues.openbravo.com/file_download.php?file_id=11285&type=bug
Issue History
2017-11-14 09:48adrianromeroNew Issue
2017-11-14 09:48adrianromeroAssigned To => Retail
2017-11-14 09:48adrianromeroTriggers an Emergency Pack => No
2017-11-14 09:55adrianromeroFile Added: issue0037284.patch
2017-11-14 09:55adrianromeroNote Added: 0100508
2017-11-14 09:56adrianromeroReview Assigned To => guilleaer
2017-12-11 13:31hgbotCheckin
2017-12-11 13:31hgbotNote Added: 0100961
2017-12-11 13:31hgbotStatusnew => resolved
2017-12-11 13:31hgbotResolutionopen => fixed
2017-12-11 13:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2d661d17056ebcccd6b337420c4220884db32c46 [^]
2017-12-11 13:46marvintmAssigned ToRetail => adrianromero
2017-12-26 18:17guilleaerStatusresolved => closed
2017-12-26 18:17guilleaerFixed in Version => RR18Q1

Notes
(0100508)
adrianromero   
2017-11-14 09:55   
See attached patch
(0100961)
hgbot   
2017-12-11 13:31   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2d661d17056ebcccd6b337420c4220884db32c46
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Nov 14 09:51:08 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2d661d17056ebcccd6b337420c4220884db32c46 [^]

Fixes issue 0037284: Implements JS function getPaymentByKey()

---
M web/org.openbravo.retail.posterminal/js/utils/ob-utilitiesuipos.js
---