[FIX] point_of_sale: fixed rounding issue for pos order when discount added(maintenan...
authorRavi Gohil <rgo@openerp.com>
Fri, 17 Oct 2014 13:30:49 +0000 (19:00 +0530)
committerRavi Gohil <rgo@openerp.com>
Fri, 17 Oct 2014 13:30:49 +0000 (19:00 +0530)
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;