mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-26 01:58:31 +00:00
fix: clear conditions table when calculate_based_on is set to Fixed
(cherry picked from commit d73920be12)
This commit is contained in:
committed by
Mergify
parent
813f4644a0
commit
35bd43775c
@@ -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