Skip to content
Permalink
Browse files

[FIX] point_of_sale: discount applied twice

before this commit, if product price tax included
then the discount will deduct twice. that fixed

task-1978564
  • Loading branch information...
mgh-odoo committed May 16, 2019
1 parent 330b99f commit 8e06e8d421e78a918539f3f43dbba8c22caa30f4
Showing with 2 additions and 2 deletions.
  1. +2 −2 addons/point_of_sale/static/src/js/models.js
@@ -1636,9 +1636,9 @@ exports.Orderline = Backbone.Model.extend({
},
get_display_price_one: function(){
var rounding = this.pos.currency.rounding;
var price_unit = this.get_unit_price() * (1.0 - (this.get_discount() / 100.0));
var price_unit = this.get_unit_price();
if (this.pos.config.iface_tax_included !== 'total') {
return round_pr(price_unit, rounding);
return round_pr(price_unit * (1.0 - (this.get_discount() / 100.0)), rounding);
} else {
var product = this.get_product();
var taxes_ids = product.taxes_id;

0 comments on commit 8e06e8d

Please sign in to comment.
You can’t perform that action at this time.