mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
[minor] Toggle required opportunity item table based on with items field (#13584)
This commit is contained in:
committed by
Nabin Hait
parent
e72bde5159
commit
098b444f6f
@@ -20,6 +20,10 @@ frappe.ui.form.on("Opportunity", {
|
|||||||
frm.trigger('set_contact_link');
|
frm.trigger('set_contact_link');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
with_items: function(frm) {
|
||||||
|
frm.trigger('toggle_mandatory');
|
||||||
|
},
|
||||||
|
|
||||||
customer_address: function(frm, cdt, cdn) {
|
customer_address: function(frm, cdt, cdn) {
|
||||||
erpnext.utils.get_address_display(frm, 'customer_address', 'address_display', false);
|
erpnext.utils.get_address_display(frm, 'customer_address', 'address_display', false);
|
||||||
},
|
},
|
||||||
@@ -35,6 +39,7 @@ frappe.ui.form.on("Opportunity", {
|
|||||||
var doc = frm.doc;
|
var doc = frm.doc;
|
||||||
frm.events.enquiry_from(frm);
|
frm.events.enquiry_from(frm);
|
||||||
frm.trigger('set_contact_link');
|
frm.trigger('set_contact_link');
|
||||||
|
frm.trigger('toggle_mandatory');
|
||||||
erpnext.toggle_naming_series();
|
erpnext.toggle_naming_series();
|
||||||
|
|
||||||
if(!doc.__islocal && doc.status!=="Lost") {
|
if(!doc.__islocal && doc.status!=="Lost") {
|
||||||
@@ -84,6 +89,10 @@ frappe.ui.form.on("Opportunity", {
|
|||||||
method: "erpnext.crm.doctype.opportunity.opportunity.make_supplier_quotation",
|
method: "erpnext.crm.doctype.opportunity.opportunity.make_supplier_quotation",
|
||||||
frm: cur_frm
|
frm: cur_frm
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
toggle_mandatory: function(frm) {
|
||||||
|
frm.toggle_reqd("items", frm.doc.with_items ? 1:0);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user