diff options
| author | Goffin Simon <sig@odoo.com> | 2015-06-26 09:15:35 +0200 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2015-06-29 09:02:10 +0200 |
| commit | 56d832dbc5083bd24146416caeb092e2d49850e2 (patch) | |
| tree | 467a2162c88bd5aa25699b7467ae548ba02cbbf0 /addons | |
| parent | acc1b525fa79bb1a05910647999e3e7c8abeca5e (diff) | |
[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
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/point_of_sale/static/src/js/models.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 460a2d9890b..fa6473e4194 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -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) { |
