[fix] Remove un-necessary Whitespace

This commit is contained in:
suyashphadtare
2017-01-31 15:14:44 +05:30
parent 750a067688
commit 34ab136b46

View File

@@ -358,31 +358,31 @@ def warehouse_query(doctype, txt, searchfield, start, page_len, filters):
filter_dict = get_doctype_wise_filters(filters) filter_dict = get_doctype_wise_filters(filters)
sub_query = """ select round(`tabBin`.actual_qty, 2) from `tabBin` sub_query = """ select round(`tabBin`.actual_qty, 2) from `tabBin`
where `tabBin`.warehouse = `tabWarehouse`.name where `tabBin`.warehouse = `tabWarehouse`.name
{bin_conditions} """.format( {bin_conditions} """.format(
bin_conditions=get_filters_cond(doctype, filter_dict.get("Bin"), bin_conditions)) bin_conditions=get_filters_cond(doctype, filter_dict.get("Bin"), bin_conditions))
response = frappe.db.sql("""select `tabWarehouse`.name, response = frappe.db.sql("""select `tabWarehouse`.name,
CONCAT_WS(" : ", "Actual Qty", ifnull( ({sub_query}), 0) ) as actual_qty CONCAT_WS(" : ", "Actual Qty", ifnull( ({sub_query}), 0) ) as actual_qty
from `tabWarehouse` from `tabWarehouse`
where where
`tabWarehouse`.`{key}` like %(txt)s `tabWarehouse`.`{key}` like %(txt)s
{fcond} {mcond} {fcond} {mcond}
order by order by
`tabWarehouse`.name desc `tabWarehouse`.name desc
limit limit
%(start)s, %(page_len)s %(start)s, %(page_len)s
""".format( """.format(
sub_query=sub_query, sub_query=sub_query,
key=frappe.db.escape(searchfield), key=frappe.db.escape(searchfield),
fcond=get_filters_cond(doctype, filter_dict.get("Warehouse"), conditions), fcond=get_filters_cond(doctype, filter_dict.get("Warehouse"), conditions),
mcond=get_match_cond(doctype) mcond=get_match_cond(doctype)
), ),
{ {
"txt": "%%%s%%" % frappe.db.escape(txt), "txt": "%%%s%%" % frappe.db.escape(txt),
"start": start, "start": start,
"page_len": page_len "page_len": page_len
}) })
return response return response