feat: clear payment terms and schedule
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index f89bebd..5d24af5 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -960,11 +960,16 @@
 				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");
+				}
 			);
 		}
 	}