From 6e46ba7b460b5f155735c91f957a4dca3dec8f96 Mon Sep 17 00:00:00 2001 From: Laurent Smet Date: Tue, 17 Oct 2017 15:19:31 +0200 Subject: [PATCH] [FIX] point_of_sale: fix taxes rounding in POS Don't round the base amount at each step during compute_all of taxes. -opw: 776986 --- addons/point_of_sale/static/src/js/models.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index a18bd707da6..43c375937ed 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1407,7 +1407,7 @@ exports.Orderline = Backbone.Model.extend({ var recompute_base = function(base_amount, fixed_amount, percent_amount){ if(fixed_amount === 0.0 && percent_amount === 0.0) return base_amount; - return round_pr((base_amount - fixed_amount) / (1.0 + percent_amount / 100.0), currency_rounding); + return (base_amount - fixed_amount) / (1.0 + percent_amount / 100.0); } // 4) Iterate the taxes in the reversed sequence order to retrieve the initial base of the computation. @@ -1461,7 +1461,6 @@ exports.Orderline = Backbone.Model.extend({ taxes_vals.push(tax_vals); }); - return { taxes: taxes_vals, total_excluded: round_pr(total_excluded, currency_rounding_bak),