|
@ -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; |
|
|
}, |
|
|
}, |
|
|