Skip to content

Commit

Permalink
FIX corrected the order quantity when pressed the Do full refund button
Browse files Browse the repository at this point in the history
  • Loading branch information
Wvven committed Nov 12, 2024
1 parent 5b2790b commit d2b1d78
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pos_full_refund/static/src/js/pos_full_refund.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ patch(TicketScreen.prototype, {
onDoFullRefund() {
var selected_order = this.getSelectedOrder();
for (const line of selected_order.orderlines) {
this.onClickOrderline(line);
for (const char of line.quantity.toString()) {
this._onUpdateSelectedOrderline({key: char, buffer: char});
const toRefundDetails = line
.getAllLinesInCombo()
.map((line) => this._getToRefundDetail(line));
for (const toRefundDetail of toRefundDetails) {
toRefundDetail.qty = line.quantity;
}
}
var pay_button = document.querySelector(".pay");
pay_button.click();
},
});
});

0 comments on commit d2b1d78

Please sign in to comment.