summaryrefslogtreecommitdiff
path: root/addons/point_of_sale/static/src/js/models.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/point_of_sale/static/src/js/models.js')
-rw-r--r--addons/point_of_sale/static/src/js/models.js5
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 7eea6cb2725..e3423dd419a 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -1134,7 +1134,7 @@ exports.Orderline = Backbone.Model.extend({
if(unit){
if (unit.rounding) {
this.quantity = round_pr(quant, unit.rounding);
- var decimals = Math.ceil(Math.log(1.0 / unit.rounding) / Math.log(10));
+ var decimals = this.pos.dp['Product Unit of Measure'];
this.quantityStr = formats.format_value(round_di(this.quantity, decimals), { type: 'float', digits: [69, decimals]});
} else {
this.quantity = round_pr(quant, 1);
@@ -1259,9 +1259,8 @@ exports.Orderline = Backbone.Model.extend({
return round_pr(this.get_unit_price() * this.get_quantity() * (1 - this.get_discount()/100), rounding);
},
get_display_price: function(){
- return this.get_base_price();
if (this.pos.config.iface_tax_included) {
- return this.get_all_prices().priceWithTax;
+ return this.get_price_with_tax();
} else {
return this.get_base_price();
}