mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-02 04:58:29 +00:00
fix: clear conditions table when calculate_based_on is set to Fixed
This commit is contained in:
committed by
ravibharathi656
parent
bc8f63b6dd
commit
d73920be12
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user