Skip to content

Commit

Permalink
FIX corrected the refund process when pressed the Do full refund butt…
Browse files Browse the repository at this point in the history
…on if the quantity is lesser than 1
  • Loading branch information
Wvven committed Nov 12, 2024
1 parent 5b2790b commit 687cd63
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 687cd63

Please sign in to comment.