We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0143e0 commit ada3330Copy full SHA for ada3330
1 file changed
erpnext/selling/page/point_of_sale/point_of_sale.js
@@ -1838,13 +1838,14 @@ class Payment {
1838
});
1839
}
1840
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
- }
+ async update_loyalty_points() {
+ const { loyalty_points, loyalty_amount } = this.frm.doc;
+ await Promise.all([
+ this.dialog.set_value("loyalty_points", loyalty_points),
+ this.dialog.set_value("loyalty_amount", loyalty_amount)
+ ]);
+ this.update_payment_amount();
1848
+ this.show_paid_amount();
1849
1850
1851
0 commit comments