Skip to content

Commit ada3330

Browse files
committed
fix(pos): changing loyalty points not updating payment amounts
1 parent e0143e0 commit ada3330

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

erpnext/selling/page/point_of_sale/point_of_sale.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,13 +1838,14 @@ class Payment {
18381838
});
18391839
}
18401840

1841-
update_loyalty_points() {
1842-
if (this.dialog.get_value("redeem_loyalty_points")) {
1843-
this.dialog.set_value("loyalty_points", this.frm.doc.loyalty_points);
1844-
this.dialog.set_value("loyalty_amount", this.frm.doc.loyalty_amount);
1845-
this.update_payment_amount();
1846-
this.show_paid_amount();
1847-
}
1841+
async update_loyalty_points() {
1842+
const { loyalty_points, loyalty_amount } = this.frm.doc;
1843+
await Promise.all([
1844+
this.dialog.set_value("loyalty_points", loyalty_points),
1845+
this.dialog.set_value("loyalty_amount", loyalty_amount)
1846+
]);
1847+
this.update_payment_amount();
1848+
this.show_paid_amount();
18481849
}
18491850

18501851
}

0 commit comments

Comments
 (0)