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. 2
      pos_customer_display/static/src/js/customer_display.js

2
pos_customer_display/static/src/js/customer_display.js

@ -272,6 +272,7 @@ 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();
if (currentOrder) {
var paidTotal = currentOrder.get_total_paid(); var paidTotal = currentOrder.get_total_paid();
var dueTotal = currentOrder.get_total_with_tax(); var dueTotal = currentOrder.get_total_with_tax();
var change = paidTotal > dueTotal ? paidTotal - dueTotal : 0; var change = paidTotal > dueTotal ? paidTotal - dueTotal : 0;
@ -279,6 +280,7 @@ odoo.define('pos_customer_display', function(require) {
var change_rounded = change.toFixed(2); var change_rounded = change.toFixed(2);
this.pos.prepare_text_customer_display('update_payment', {'change': change_rounded}); this.pos.prepare_text_customer_display('update_payment', {'change': change_rounded});
} }
}
return res; return res;
}, },
}); });

Loading…
Cancel
Save