[cleanup] customer not buying since long time report
This commit is contained in:
parent
c8b406d050
commit
d3fe7ec858
@ -43,8 +43,8 @@ def get_so_details():
|
|||||||
|
|
||||||
def get_last_so_amt(customer):
|
def get_last_so_amt(customer):
|
||||||
res = frappe.db.sql("""select base_net_total from `tabSales Order`
|
res = frappe.db.sql("""select base_net_total from `tabSales Order`
|
||||||
where customer ='%(customer)s' and docstatus = 1 order by transaction_date desc
|
where customer = %s and docstatus = 1 order by transaction_date desc
|
||||||
limit 1""" % {'customer': frappe.db.escape(customer)})
|
limit 1""", customer)
|
||||||
|
|
||||||
return res and res[0][0] or 0
|
return res and res[0][0] or 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user