mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 18:51:21 +00:00
Remove enqueuing update_total_sales method, sometimes it does not include current invoice (#12522)
This commit is contained in:
@@ -358,7 +358,6 @@ def update_company_current_month_sales(company):
|
||||
monthly_total = results[0]['total'] if len(results) > 0 else 0
|
||||
|
||||
frappe.db.set_value("Company", company, "total_monthly_sales", monthly_total)
|
||||
frappe.db.commit()
|
||||
|
||||
def update_company_monthly_sales(company):
|
||||
'''Cache past year monthly sales of every company based on sales invoices'''
|
||||
@@ -369,7 +368,6 @@ def update_company_monthly_sales(company):
|
||||
"posting_date", filter_str, "sum")
|
||||
|
||||
frappe.db.set_value("Company", company, "sales_monthly_history", json.dumps(month_to_value_dict))
|
||||
frappe.db.commit()
|
||||
|
||||
def cache_companies_monthly_sales_history():
|
||||
companies = [d['name'] for d in frappe.get_list("Company")]
|
||||
|
||||
Reference in New Issue
Block a user