Merge pull request #3220 from odoo-dev/7.0-opw-615322-rgo
authorFrédéric Van der Essen <fva@openerp.com>
Wed, 12 Nov 2014 16:58:07 +0000 (17:58 +0100)
committerFrédéric Van der Essen <fva@openerp.com>
Wed, 12 Nov 2014 16:58:07 +0000 (17:58 +0100)
[FIX] point_of_sale: fixed rounding issue for pos order when discount ad...

addons/point_of_sale/static/src/js/models.js

index b7b36d0..606ee1e 100644 (file)
@@ -494,7 +494,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
         get_all_prices: function(){
             var self = this;
             var currency_rounding = this.pos.get('currency').rounding;
-            var base = round_pr(this.get_quantity() * this.get_unit_price() * (1.0 - (this.get_discount() / 100.0)), currency_rounding);
+            var base = round_pr(round_pr(this.get_quantity() * this.get_unit_price(), currency_rounding) * (1.0 - (this.get_discount() / 100.0)), currency_rounding);
             var totalTax = base;
             var totalNoTax = base;