[Fix] - making customer/supplier field manadatory on order type condition

This commit is contained in:
Khushal Trivedi 2019-10-16 11:40:27 +05:30
parent e2bb950012
commit 01f8a4966a

View File

@ -51,11 +51,13 @@ frappe.ui.form.on('Blanket Order', {
set_tc_name_filter: function(frm) {
if (frm.doc.blanket_order_type === 'Selling') {
frm.set_df_property("customer","reqd", 1)
frm.set_query("tc_name", function() {
return { filters: { selling: 1 } };
});
}
if (frm.doc.blanket_order_type === 'Purchasing') {
frm.set_df_property("customer","reqd", 1)
frm.set_query("tc_name", function() {
return { filters: { buying: 1 } };
});