Skip to content

Commit

Permalink
feat: clear payment terms and schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed Feb 22, 2024
1 parent 6d43d46 commit 6249965
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions erpnext/public/js/controllers/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -960,11 +960,16 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
to_clear.push("Payment Schedule Table");
}

frappe.msgprint(
frappe.confirm(
__(
"Please clear the selected {0}",
"Do you want to clear the selected {0}?",
[frappe.utils.comma_and(to_clear.map(dt => __(dt)))]
)
),
() => {
this.frm.set_value("payment_terms_template", "");
this.frm.clear_table("payment_schedule");
this.frm.refresh_field("payment_schedule");
}
);
}
}
Expand Down

0 comments on commit 6249965

Please sign in to comment.