[FIX] pos_self_order: show correct total in order widget

Part-of: odoo/odoo#138352
This commit is contained in:
Joseph Caburnay
2023-10-13 23:20:15 +00:00
parent c3e412aafd
commit 874c7fc6b5
2 changed files with 4 additions and 6 deletions
@@ -77,7 +77,10 @@ export class OrderWidget extends Component {
const qty = !lastChange ? currentQty : currentQty - lastChange.qty;
acc.count += qty;
acc.price += line.displayPrice * qty;
const subtotal = this.selfOrder.config.iface_tax_included
? line.price_subtotal_incl
: line.price_subtotal;
acc.price += (subtotal / currentQty) * qty;
return acc;
},
@@ -66,11 +66,6 @@ export class Line extends Reactive {
});
}
get displayPrice() {
// for the moment we use price with tax included but we should look at the config setup
return this.price_subtotal_incl;
}
updateDataFromServer(data) {
for (const key in data) {
let updatedValue = data[key];