mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-09 00:01:18 +00:00
feat(pos): reset payments and loyalty points on redeem uncheck
This commit is contained in:
@@ -1694,7 +1694,13 @@ class Payment {
|
||||
fieldtype: 'Check',
|
||||
label: 'Redeem Loyalty Points',
|
||||
fieldname: 'redeem_loyalty_points',
|
||||
onchange: () => {
|
||||
onchange: async function () {
|
||||
if (!cint(me.dialog.get_value('redeem_loyalty_points'))) {
|
||||
await Promise.all([
|
||||
me.frm.set_value('loyalty_points', 0),
|
||||
me.dialog.set_value('loyalty_points', 0)
|
||||
]);
|
||||
}
|
||||
me.update_cur_frm_value("redeem_loyalty_points", () => {
|
||||
frappe.flags.redeem_loyalty_points = false;
|
||||
me.update_loyalty_points();
|
||||
|
||||
Reference in New Issue
Block a user