[FIX] point_of_sale: avoid tip price modification
When a tip is added, the price of the product is changed, and so we don't want to recompute the unit price if quantity is changed.
This commit is contained in:
@@ -2560,10 +2560,16 @@ exports.Order = Backbone.Model.extend({
|
||||
if (lines[i].get_product() === tip_product) {
|
||||
lines[i].set_unit_price(tip);
|
||||
lines[i].set_lst_price(tip);
|
||||
lines[i].price_manually_set = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.add_product(tip_product, {quantity: 1, price: tip, lst_price: tip });
|
||||
this.add_product(tip_product, {
|
||||
quantity: 1,
|
||||
price: tip,
|
||||
lst_price: tip,
|
||||
extras: {price_manually_set: true},
|
||||
});
|
||||
}
|
||||
},
|
||||
set_pricelist: function (pricelist) {
|
||||
|
||||
Reference in New Issue
Block a user