From d3fe7ec8581775b65c9ec59606cdd17cc31d26c3 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 2 Jun 2015 12:21:17 +0530 Subject: [PATCH] [cleanup] customer not buying since long time report --- .../customers_not_buying_since_long_time.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py b/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py index 2b2c550b47..de4c655be9 100644 --- a/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py +++ b/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.py @@ -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