From 732f5c18674a9fde30b6e8fd5e0ae20b66a58802 Mon Sep 17 00:00:00 2001 From: Abhishek Balam Date: Mon, 1 Jun 2020 23:51:39 +0530 Subject: [PATCH] fixed customer count logic --- .../customer_acquisition_and_loyalty.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.py b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.py index 88bd9c135d..e1633ae5ed 100644 --- a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.py +++ b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.py @@ -169,8 +169,7 @@ def get_customer_stats(filters, tree_view=False): customers_in = {} 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 - {company_condition} order by posting_date'''.format(company_condition=company_condition), + where docstatus=1 and posting_date <= %(to_date)s {company_condition} order by posting_date'''.format(company_condition=company_condition), filters, as_dict=1): key = si.territory if tree_view else si.posting_date.strftime('%Y-%m')