[FIX] point_of_sale: quantity uses decimal separator of lang

This revision is related to 5a10903e9b.

The above revision makes so the decimal separator from the language
is used to display the prices.

This revision makes so this decimal separator is used as well
for quantities, to be coherent.

opw-657591
This commit is contained in:
Denis Ledoux 2015-11-27 17:22:42 +01:00
parent 4b003afd0a
commit 261ccf7c56
1 changed files with 2 additions and 1 deletions

View File

@ -718,7 +718,8 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
if(unit){
if (unit.rounding) {
this.quantity = round_pr(quant, unit.rounding);
this.quantityStr = this.quantity.toFixed(Math.ceil(Math.log(1.0 / unit.rounding) / Math.log(10)));
var decimals = Math.ceil(Math.log(1.0 / unit.rounding) / Math.log(10));
this.quantityStr = openerp.instances[this.pos.session.name].web.format_value(this.quantity, { type: 'float', digits: [69, decimals]});
} else {
this.quantity = round_pr(quant, 1);
this.quantityStr = this.quantity.toFixed(0);