diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 047d23ad6732a170f7ff90aaf90a96b310473c44..97e0532edf2bc7d9cb7ec9ce0338f7c2ac8783a3 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1007,6 +1007,18 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } frappe.msgprint(final_message); } + + frappe.confirm( + __( + "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"); + } + ); } }