mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
chore: mass trailing whitespace and EOF fixes
This commit is contained in:
@@ -235,4 +235,3 @@ def _get_employee_from_user(user):
|
||||
# frappe.db.exists returns a tuple of a tuple
|
||||
return frappe.get_doc('Employee', employee_docname[0][0])
|
||||
return None
|
||||
|
||||
|
||||
@@ -7,4 +7,4 @@ function check_times(frm) {
|
||||
frappe.throw(__('In row {0} of Appointment Booking Slots: "To Time" must be later than "From Time".', [i + 1]));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ frappe.ui.form.on("Contract", {
|
||||
let contract_template = r.message.contract_template;
|
||||
frm.set_value("contract_terms", r.message.contract_terms);
|
||||
frm.set_value("requires_fulfilment", contract_template.requires_fulfilment);
|
||||
|
||||
|
||||
if (frm.doc.requires_fulfilment) {
|
||||
// Populate the fulfilment terms table from a contract template, if any
|
||||
r.message.contract_template.fulfilment_terms.forEach(element => {
|
||||
@@ -23,7 +23,7 @@ frappe.ui.form.on("Contract", {
|
||||
d.requirement = element.requirement;
|
||||
});
|
||||
frm.refresh_field("fulfilment_terms");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -9,4 +9,4 @@ frappe.listview_settings['Contract'] = {
|
||||
return [__(doc.status), "gray", "status,=," + doc.status];
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -24,8 +24,8 @@ def get_contract_template(template_name, doc):
|
||||
|
||||
if contract_template.contract_terms:
|
||||
contract_terms = frappe.render_template(contract_template.contract_terms, doc)
|
||||
|
||||
|
||||
return {
|
||||
'contract_template': contract_template,
|
||||
'contract_template': contract_template,
|
||||
'contract_terms': contract_terms
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class Lead(SellingController):
|
||||
"ends_on": frappe.db.get_value("Lead", self.name, "ends_on") if (not cint(self.is_new())) else None,
|
||||
"contact_by": frappe.db.get_value("Lead", self.name, "contact_by") if (not cint(self.is_new())) else None,
|
||||
})
|
||||
|
||||
|
||||
def set_full_name(self):
|
||||
self.lead_name = " ".join(filter(None, [self.first_name, self.middle_name, self.last_name]))
|
||||
|
||||
|
||||
@@ -16,4 +16,4 @@ def get_data():
|
||||
'items': ['Opportunity', 'Quotation']
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,4 +82,4 @@ def make_lead(**args):
|
||||
"email_id": args.email_id or "new_lead_{}@example.com".format(random_string(5)),
|
||||
}).insert()
|
||||
|
||||
return lead_doc
|
||||
return lead_doc
|
||||
|
||||
@@ -57,7 +57,7 @@ frappe.ui.form.on("Opportunity", {
|
||||
if (frm.doc.status == "Lost"){
|
||||
frm.trigger('set_as_lost_dialog');
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
customer_address: function(frm, cdt, cdn) {
|
||||
|
||||
@@ -372,4 +372,4 @@ def get_events(start, end, filters=None):
|
||||
"start": start,
|
||||
"end": end
|
||||
}, as_dict=True, update={"allDay": 0})
|
||||
return data
|
||||
return data
|
||||
|
||||
@@ -9,4 +9,4 @@ def get_data():
|
||||
'items': ['Quotation', 'Supplier Quotation']
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,4 +87,4 @@ def make_opportunity(**args):
|
||||
})
|
||||
|
||||
opp_doc.insert()
|
||||
return opp_doc
|
||||
return opp_doc
|
||||
|
||||
@@ -19,7 +19,7 @@ frappe.ui.form.on('Social Media Post', {
|
||||
refresh: function(frm){
|
||||
if (frm.doc.docstatus === 1){
|
||||
if (frm.doc.post_status != "Posted"){
|
||||
add_post_btn(frm);
|
||||
add_post_btn(frm);
|
||||
}
|
||||
else if (frm.doc.post_status == "Posted"){
|
||||
frm.set_df_property('sheduled_time', 'read_only', 1);
|
||||
@@ -63,5 +63,5 @@ var post = function(frm){
|
||||
frappe.dom.unfreeze();
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,4 +16,3 @@ frappe.query_reports["Campaign Efficiency"] = {
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
@@ -132,4 +132,4 @@ def get_order_amount(leads):
|
||||
where prevdoc_docname in (
|
||||
select name from `tabQuotation` where status = 'Ordered'
|
||||
and quotation_to = 'Lead' and party_name in (%s)
|
||||
)""" % ', '.join(["%s"]*len(leads)), tuple(leads))[0][0]
|
||||
)""" % ', '.join(["%s"]*len(leads)), tuple(leads))[0][0]
|
||||
|
||||
@@ -20,5 +20,3 @@ frappe.query_reports["Lead Conversion Time"] = {
|
||||
},
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -49,4 +49,4 @@ frappe.query_reports["Lead Details"] = {
|
||||
"options": "Territory",
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
@@ -107,7 +107,7 @@ def get_columns():
|
||||
"options": "Country",
|
||||
"width": 100
|
||||
},
|
||||
|
||||
|
||||
]
|
||||
return columns
|
||||
|
||||
@@ -142,7 +142,7 @@ def get_data(filters):
|
||||
company = %(company)s
|
||||
AND `tabLead`.creation BETWEEN %(from_date)s AND %(to_date)s
|
||||
{conditions}
|
||||
ORDER BY
|
||||
ORDER BY
|
||||
`tabLead`.creation asc """.format(conditions=get_conditions(filters)), filters, as_dict=1)
|
||||
|
||||
def get_conditions(filters) :
|
||||
@@ -153,6 +153,5 @@ def get_conditions(filters) :
|
||||
|
||||
if filters.get("status"):
|
||||
conditions.append(" and `tabLead`.status=%(status)s")
|
||||
|
||||
return " ".join(conditions) if conditions else ""
|
||||
|
||||
return " ".join(conditions) if conditions else ""
|
||||
|
||||
@@ -64,4 +64,4 @@ frappe.query_reports["Lost Opportunity"] = {
|
||||
"options": "User"
|
||||
},
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
@@ -87,17 +87,17 @@ def get_data(filters):
|
||||
`tabOpportunity`.sales_stage,
|
||||
`tabOpportunity`.territory
|
||||
FROM
|
||||
`tabOpportunity`
|
||||
`tabOpportunity`
|
||||
{join}
|
||||
WHERE
|
||||
`tabOpportunity`.status = 'Lost' and `tabOpportunity`.company = %(company)s
|
||||
AND `tabOpportunity`.modified BETWEEN %(from_date)s AND %(to_date)s
|
||||
{conditions}
|
||||
GROUP BY
|
||||
`tabOpportunity`.name
|
||||
ORDER BY
|
||||
AND `tabOpportunity`.modified BETWEEN %(from_date)s AND %(to_date)s
|
||||
{conditions}
|
||||
GROUP BY
|
||||
`tabOpportunity`.name
|
||||
ORDER BY
|
||||
`tabOpportunity`.creation asc """.format(conditions=get_conditions(filters), join=get_join(filters)), filters, as_dict=1)
|
||||
|
||||
|
||||
|
||||
def get_conditions(filters):
|
||||
conditions = []
|
||||
@@ -117,15 +117,15 @@ def get_conditions(filters):
|
||||
return " ".join(conditions) if conditions else ""
|
||||
|
||||
def get_join(filters):
|
||||
join = """LEFT JOIN `tabOpportunity Lost Reason Detail`
|
||||
ON `tabOpportunity Lost Reason Detail`.parenttype = 'Opportunity' and
|
||||
join = """LEFT JOIN `tabOpportunity Lost Reason Detail`
|
||||
ON `tabOpportunity Lost Reason Detail`.parenttype = 'Opportunity' and
|
||||
`tabOpportunity Lost Reason Detail`.parent = `tabOpportunity`.name"""
|
||||
|
||||
if filters.get("lost_reason"):
|
||||
join = """JOIN `tabOpportunity Lost Reason Detail`
|
||||
ON `tabOpportunity Lost Reason Detail`.parenttype = 'Opportunity' and
|
||||
join = """JOIN `tabOpportunity Lost Reason Detail`
|
||||
ON `tabOpportunity Lost Reason Detail`.parenttype = 'Opportunity' and
|
||||
`tabOpportunity Lost Reason Detail`.parent = `tabOpportunity`.name and
|
||||
`tabOpportunity Lost Reason Detail`.lost_reason = '{0}'
|
||||
""".format(filters.get("lost_reason"))
|
||||
|
||||
return join
|
||||
|
||||
return join
|
||||
|
||||
@@ -106,4 +106,4 @@ def get_lead_filters(filters):
|
||||
return lead_filters
|
||||
|
||||
def get_creation_date_based_on_lead_age(filters):
|
||||
return add_days(now(), (filters.get('lead_age') * -1))
|
||||
return add_days(now(), (filters.get('lead_age') * -1))
|
||||
|
||||
Reference in New Issue
Block a user