Merge pull request #22075 from abhishekbalam/fix-customer-count

fix(Accounts): Customer Count in Customer Acq. Report wrong
This commit is contained in:
Deepesh Garg
2020-06-02 00:09:01 +05:30
committed by GitHub

View File

@@ -169,7 +169,7 @@ def get_customer_stats(filters, tree_view=False):
customers_in = {} customers_in = {}
for si in frappe.db.sql('''select territory, posting_date, customer, base_grand_total from `tabSales Invoice` for si in frappe.db.sql('''select territory, posting_date, customer, base_grand_total from `tabSales Invoice`
where docstatus=1 and posting_date <= %(to_date)s and posting_date >= %(from_date)s where docstatus=1 and posting_date <= %(to_date)s
{company_condition} order by posting_date'''.format(company_condition=company_condition), {company_condition} order by posting_date'''.format(company_condition=company_condition),
filters, as_dict=1): filters, as_dict=1):