indent to tabs

This commit is contained in:
Abhishek Balam
2020-06-12 11:07:28 +05:30
parent 411b125906
commit f596b5950e

View File

@@ -160,7 +160,7 @@ def get_data_by_territory(filters, common_columns):
return columns, data, None, None, None, 1 return columns, data, None, None, None, 1
def get_customer_stats(filters, tree_view=False): def get_customer_stats(filters, tree_view=False):
""" Calculates number of new and repeated customers. """ """ Calculates number of new and repeated customers and revenue. """
company_condition = '' company_condition = ''
if filters.get('company'): if filters.get('company'):
company_condition = ' and company=%(company)s' company_condition = ' and company=%(company)s'
@@ -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):