[cleanup] customer not buying since long time report

This commit is contained in:
Rushabh Mehta 2015-06-02 12:21:17 +05:30
parent c8b406d050
commit d3fe7ec858

View File

@ -43,8 +43,8 @@ def get_so_details():
def get_last_so_amt(customer):
res = frappe.db.sql("""select base_net_total from `tabSales Order`
where customer ='%(customer)s' and docstatus = 1 order by transaction_date desc
limit 1""" % {'customer': frappe.db.escape(customer)})
where customer = %s and docstatus = 1 order by transaction_date desc
limit 1""", customer)
return res and res[0][0] or 0