fix: clear conditions table when calculate_based_on is set to Fixed

(cherry picked from commit d73920be12)
This commit is contained in:
sarathibalamurugan
2026-04-20 16:17:38 +05:30
committed by Mergify
parent 813f4644a0
commit 35bd43775c

View File

@@ -25,6 +25,10 @@ frappe.ui.form.on("Shipping Rule", {
},
calculate_based_on: function (frm) {
frm.trigger("toggle_reqd");
if (frm.doc.calculate_based_on === "Fixed") {
frm.clear_table("conditions");
frm.refresh_field("conditions");
}
},
toggle_reqd: function (frm) {
frm.toggle_reqd("shipping_amount", frm.doc.calculate_based_on === "Fixed");