mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 18:51:21 +00:00
[minor] [for territory] auto add default For Territory in a new Tax Master, Shipping Rule and Price List
This commit is contained in:
@@ -39,5 +39,14 @@ $.extend(erpnext, {
|
||||
cur_frm.toggle_display("company", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
add_for_territory: function() {
|
||||
if(cur_frm.doc.__islocal &&
|
||||
wn.model.get_doclist(cur_frm.doc.doctype, cur_frm.doc.name).length === 1) {
|
||||
var territory = wn.model.add_child(cur_frm.doc, "For Territory",
|
||||
"valid_for_territories");
|
||||
territory.territory = wn.defaults.get_default("territory");
|
||||
}
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user