[FIX] point_of_sale: make tendered amount adhere to currency formatting

Part of the number formatting overhaul done in
5c9b4556e3,
4b003afd0a,
261ccf7c56 and
6e945de681. The only place left where we
didn't correctly format the numbers was in the tendered column on
the payment screen. This fixes that by not directly displaying the
inputbuffer anymore. Instead we pass the payment line amount through
format_currency_no_symbol() and display that instead. We also give a
default amount of 0 to parse_value so it doesn't return false for an
empty string.
This commit is contained in:
Joren Van Onder
2015-12-11 09:45:35 +01:00
parent da563bcf5c
commit 697739dd64
@@ -1530,7 +1530,7 @@ openerp.point_of_sale.load_screens = function load_screens(instance, module){ //
if (order.selected_paymentline) {
var amount;
try{
amount = instance.web.parse_value(this.inputbuffer, {type: "float"});
amount = instance.web.parse_value(this.inputbuffer, {type: "float"}, 0);
}
catch(e){
amount = 0;
@@ -1538,7 +1538,7 @@ openerp.point_of_sale.load_screens = function load_screens(instance, module){ //
order.selected_paymentline.set_amount(amount);
this.order_changes();
this.render_paymentlines();
this.$('.paymentline.selected .edit').text(this.inputbuffer);
this.$('.paymentline.selected .edit').text(this.format_currency_no_symbol(amount));
}
}
},