Skip to content

Commit

Permalink
[FIX] update the paymentline amount after adds a product
Browse files Browse the repository at this point in the history
  • Loading branch information
ygcarvalh committed Aug 21, 2023
1 parent b941e28 commit 6c85f5a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pos_kiosk/static/src/js/Modals/CartModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,25 @@ odoo.define("pos_kiosk.CartModal", function (require) {
} else {
this.order.remove_orderline(orderline);
}

if (this.order.paymentlines.length > 0) {
this.order.paymentlines.models[0].set_amount(
this.order.get_total_with_tax()
);
}

this.render();
}

addQuantity(orderline) {
orderline.set_quantity(orderline.quantity + 1);

if (this.order.paymentlines.length > 0) {
this.order.paymentlines.models[0].set_amount(
this.order.get_total_with_tax()
);
}

this.render();
}

Expand Down

0 comments on commit 6c85f5a

Please sign in to comment.