fix: Update call_popup

- Setup missed & call ended listeners
- Show contacts based on links
This commit is contained in:
Suraj Shetty
2021-02-08 20:13:23 +05:30
parent c5248b30eb
commit dcc9947d10
2 changed files with 125 additions and 116 deletions

View File

@@ -352,7 +352,7 @@ def get_lead_with_phone_number(number):
leads = frappe.get_all('Lead', or_filters={
'phone': ['like', '%{}'.format(number)],
'mobile_no': ['like', '%{}'.format(number)]
}, limit=1)
}, limit=1, order_by="creation DESC")
lead = leads[0].name if leads else None
@@ -361,4 +361,4 @@ def get_lead_with_phone_number(number):
def daily_open_lead():
leads = frappe.get_all("Lead", filters = [["contact_date", "Between", [nowdate(), nowdate()]]])
for lead in leads:
frappe.db.set_value("Lead", lead.name, "status", "Open")
frappe.db.set_value("Lead", lead.name, "status", "Open")