[minor] [fix] project query

This commit is contained in:
Rushabh Mehta 2015-08-26 10:50:16 +05:30
parent 007e2d0015
commit b6398be232

View File

@ -205,10 +205,10 @@ def get_project_name(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select `tabProject`.name from `tabProject`
where `tabProject`.status not in ("Completed", "Cancelled")
and %(cond)s `tabProject`.name like "%(txt)s" %(mcond)s
and {cond} `tabProject`.name like %s {match_cond}
order by `tabProject`.name asc
limit %(start)s, %(page_len)s """ % {'cond': cond,'txt': "%%%s%%" % frappe.db.escape(txt),
'mcond':get_match_cond(doctype),'start': start, 'page_len': page_len})
limit {start}, {page_len}""".format(cond=cond, match_cond=get_match_cond(doctype),
start=start, page_len=page_len), "%{0}%".format(txt))
def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select `tabDelivery Note`.name, `tabDelivery Note`.customer_name