[FIX] pos_self_order: show correct total in order widget
Part-of: odoo/odoo#138352
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user