mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
chore: mass trailing whitespace and EOF fixes
This commit is contained in:
@@ -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