[MERGE] forward port of branch 8.0 up to c92e70b
[odoo/odoo.git] / addons / point_of_sale / static / src / js / models.js
index c746d12..07be5f0 100644 (file)
@@ -811,10 +811,13 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
         get_unit_price: function(){
             return this.price;
         },
-        get_display_price: function(){
+        get_base_price:    function(){
             var rounding = this.pos.currency.rounding;
             return  round_pr(round_pr(this.get_unit_price() * this.get_quantity(),rounding) * (1- this.get_discount()/100.0),rounding);
         },
+        get_display_price: function(){
+            return this.get_base_price();
+        },
         get_price_without_tax: function(){
             return this.get_all_prices().priceWithoutTax;
         },
@@ -830,7 +833,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.currency.rounding;
-            var base = round_pr(this.get_quantity() * this.get_unit_price() * (1.0 - (this.get_discount() / 100.0)), currency_rounding);
+            var base = this.get_base_price();
             var totalTax = base;
             var totalNoTax = base;