fix: Remove comments and unused code
This commit is contained in:
@@ -19,14 +19,6 @@ frappe.ui.form.on("Opportunity", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// customer: function(frm) {
|
|
||||||
// frm.trigger('set_contact_link');
|
|
||||||
// erpnext.utils.get_party_details(frm);
|
|
||||||
// },
|
|
||||||
|
|
||||||
// lead: function(frm) {
|
|
||||||
// frm.trigger('set_contact_link');
|
|
||||||
// },
|
|
||||||
|
|
||||||
with_items: function(frm) {
|
with_items: function(frm) {
|
||||||
frm.trigger('toggle_mandatory');
|
frm.trigger('toggle_mandatory');
|
||||||
@@ -46,7 +38,6 @@ frappe.ui.form.on("Opportunity", {
|
|||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
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('toggle_mandatory');
|
frm.trigger('toggle_mandatory');
|
||||||
frm.trigger("set_dynamic_field_label");
|
frm.trigger("set_dynamic_field_label");
|
||||||
erpnext.toggle_naming_series();
|
erpnext.toggle_naming_series();
|
||||||
@@ -83,13 +74,6 @@ frappe.ui.form.on("Opportunity", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// set_contact_link: function(frm) {
|
|
||||||
// if(frm.doc.customer) {
|
|
||||||
// frappe.dynamic_link = {doc: frm.doc, fieldname: 'customer', doctype: 'Customer'}
|
|
||||||
// } else if(frm.doc.lead) {
|
|
||||||
// frappe.dynamic_link = {doc: frm.doc, fieldname: 'lead', doctype: 'Lead'}
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
set_dynamic_field_label: function(frm){
|
set_dynamic_field_label: function(frm){
|
||||||
if (frm.doc.opportunity_from == "Customer")
|
if (frm.doc.opportunity_from == "Customer")
|
||||||
{
|
{
|
||||||
@@ -117,10 +101,6 @@ frappe.ui.form.on("Opportunity", {
|
|||||||
// TODO commonify this code
|
// TODO commonify this code
|
||||||
erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
|
erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
|
||||||
onload: function() {
|
onload: function() {
|
||||||
// if(!this.frm.doc.enquiry_from && this.frm.doc.customer)
|
|
||||||
// this.frm.doc.enquiry_from = "Customer";
|
|
||||||
// if(!this.frm.doc.enquiry_from && this.frm.doc.lead)
|
|
||||||
// this.frm.doc.enquiry_from = "Lead";
|
|
||||||
|
|
||||||
if(!this.frm.doc.status)
|
if(!this.frm.doc.status)
|
||||||
set_multiple(this.frm.doc.doctype, this.frm.doc.name, { status:'Open' });
|
set_multiple(this.frm.doc.doctype, this.frm.doc.name, { status:'Open' });
|
||||||
@@ -168,7 +148,7 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
|
|||||||
$.extend(cur_frm.cscript, new erpnext.crm.Opportunity({frm: cur_frm}));
|
$.extend(cur_frm.cscript, new erpnext.crm.Opportunity({frm: cur_frm}));
|
||||||
|
|
||||||
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
|
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
|
||||||
if(doc.opportunity_from == 'Lead' && doc.lead)
|
if(doc.opportunity_from == 'Lead' && doc.customer_lead)
|
||||||
cur_frm.cscript.lead(doc, cdt, cdn);
|
cur_frm.cscript.lead(doc, cdt, cdn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user