[Fix] - making customer/supplier field manadatory on order type condition on BO
This commit is contained in:
parent
7084f07dab
commit
5f4b6d267c
@ -53,6 +53,7 @@ frappe.ui.form.on('Blanket Order', {
|
|||||||
if (frm.doc.blanket_order_type === 'Selling') {
|
if (frm.doc.blanket_order_type === 'Selling') {
|
||||||
frm.set_df_property("customer","reqd", 1)
|
frm.set_df_property("customer","reqd", 1)
|
||||||
frm.set_df_property("supplier","reqd", 0)
|
frm.set_df_property("supplier","reqd", 0)
|
||||||
|
frm.set_value("supplier", "")
|
||||||
|
|
||||||
frm.set_query("tc_name", function() {
|
frm.set_query("tc_name", function() {
|
||||||
return { filters: { selling: 1 } };
|
return { filters: { selling: 1 } };
|
||||||
@ -61,6 +62,8 @@ frappe.ui.form.on('Blanket Order', {
|
|||||||
if (frm.doc.blanket_order_type === 'Purchasing') {
|
if (frm.doc.blanket_order_type === 'Purchasing') {
|
||||||
frm.set_df_property("supplier","reqd", 1)
|
frm.set_df_property("supplier","reqd", 1)
|
||||||
frm.set_df_property("customer","reqd", 0)
|
frm.set_df_property("customer","reqd", 0)
|
||||||
|
frm.set_value("customer", "")
|
||||||
|
|
||||||
|
|
||||||
frm.set_query("tc_name", function() {
|
frm.set_query("tc_name", function() {
|
||||||
return { filters: { buying: 1 } };
|
return { filters: { buying: 1 } };
|
||||||
|
@ -88,7 +88,8 @@
|
|||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Company",
|
"label": "Company",
|
||||||
"options": "Company"
|
"options": "Company",
|
||||||
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "section_break_12",
|
"fieldname": "section_break_12",
|
||||||
@ -128,7 +129,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2019-06-19 11:59:09.279607",
|
"modified": "2019-10-16 13:38:32.302316",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "Blanket Order",
|
"name": "Blanket Order",
|
||||||
|
Loading…
Reference in New Issue
Block a user