Browse Source

[8.0][FIX] pos_payment_terminal

pull/383/head
Éloi Rivard 5 years ago
committed by Sylvain LE GAL
parent
commit
f3c1155b2a
  1. 7
      pos_payment_terminal/static/src/js/pos_payment_terminal.js

7
pos_payment_terminal/static/src/js/pos_payment_terminal.js

@ -11,9 +11,10 @@ openerp.pos_payment_terminal = function(instance){
module = instance.point_of_sale; module = instance.point_of_sale;
module.ProxyDevice = module.ProxyDevice.extend({ module.ProxyDevice = module.ProxyDevice.extend({
payment_terminal_transaction_start: function(line, currency_iso){
payment_terminal_transaction_start: function(line, currency_iso, currency_decimals){
var data = {'amount' : line.get_amount(), var data = {'amount' : line.get_amount(),
'currency_iso' : currency_iso, 'currency_iso' : currency_iso,
'currency_decimals': currency_decimals,
'payment_mode' : line.cashregister.journal.payment_mode}; 'payment_mode' : line.cashregister.journal.payment_mode};
this.message('payment_terminal_transaction_start', {'payment_info' : JSON.stringify(data)}); this.message('payment_terminal_transaction_start', {'payment_info' : JSON.stringify(data)});
}, },
@ -25,7 +26,9 @@ openerp.pos_payment_terminal = function(instance){
var self = this; var self = this;
if (line.cashregister.journal.payment_mode && this.pos.config.iface_payment_terminal){ if (line.cashregister.journal.payment_mode && this.pos.config.iface_payment_terminal){
el_node.querySelector('.payment-terminal-transaction-start') el_node.querySelector('.payment-terminal-transaction-start')
.addEventListener('click', function(){self.pos.proxy.payment_terminal_transaction_start(line, self.pos.currency.name)});
.addEventListener('click', function(){
self.pos.proxy.payment_terminal_transaction_start(line, self.pos.currency.name, self.pos.currency.decimals);
});
} }
return el_node; return el_node;
}, },

Loading…
Cancel
Save