Browse Source

[FIX] Fix pos_customer_display with Floors in Restaurant

pull/195/merge
Invitu 7 years ago
committed by Sylvain LE GAL
parent
commit
f51c691a23
  1. 14
      pos_customer_display/static/src/js/customer_display.js

14
pos_customer_display/static/src/js/customer_display.js

@ -272,12 +272,14 @@ odoo.define('pos_customer_display', function(require) {
render_paymentlines: function(){ render_paymentlines: function(){
var res = this._super(); var res = this._super();
var currentOrder = this.pos.get_order(); var currentOrder = this.pos.get_order();
var paidTotal = currentOrder.get_total_paid();
var dueTotal = currentOrder.get_total_with_tax();
var change = paidTotal > dueTotal ? paidTotal - dueTotal : 0;
if (change) {
var change_rounded = change.toFixed(2);
this.pos.prepare_text_customer_display('update_payment', {'change': change_rounded});
if (currentOrder) {
var paidTotal = currentOrder.get_total_paid();
var dueTotal = currentOrder.get_total_with_tax();
var change = paidTotal > dueTotal ? paidTotal - dueTotal : 0;
if (change) {
var change_rounded = change.toFixed(2);
this.pos.prepare_text_customer_display('update_payment', {'change': change_rounded});
}
} }
return res; return res;
}, },

Loading…
Cancel
Save