[FIX] point of sale: rounding globally

The price without taxe must be rounded on each line like 'price_subtotal' in "sale.order.line"
with digits_compute= dp.get_precision('Account').
The total taxes included must be the sum of the rounded total without taxe and
the rounded taxes like in "sale.order" in _amount_all.

opw:643254
This commit is contained in:
Goffin Simon
2015-06-29 09:02:10 +02:00
parent acc1b525fa
commit 56d832dbc5
+2 -3
View File
@@ -937,6 +937,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
taxtotal += tax.amount;
taxdetail[tax.id] = tax.amount;
});
totalNoTax = round_pr(totalNoTax, this.pos.currency.rounding);
return {
"priceWithTax": totalTax,
@@ -1123,9 +1124,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
}), 0), this.pos.currency.rounding);
},
getTotalTaxIncluded: function() {
return round_pr((this.get('orderLines')).reduce((function(sum, orderLine) {
return sum + orderLine.get_price_with_tax();
}), 0), this.pos.currency.rounding);
return this.getTotalTaxExcluded() + this.getTax();
},
getDiscountTotal: function() {
return round_pr((this.get('orderLines')).reduce((function(sum, orderLine) {