From 4f62c4cf2d0625613d3fd6bac7c5bf8fae0ed47c Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 3 Oct 2016 12:48:25 +0530 Subject: [PATCH] [minor][fix] for condition maker --- erpnext/controllers/trends.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/trends.py b/erpnext/controllers/trends.py index 080d7499aa..d991c15b0d 100644 --- a/erpnext/controllers/trends.py +++ b/erpnext/controllers/trends.py @@ -49,10 +49,10 @@ def get_data(filters, conditions): posting_date = 't1.posting_date' if conditions["based_on_select"] in ["t1.project,", "t2.project,"]: - cond = 'and '+ conditions["based_on_select"][:-1] +' IS Not NULL' + cond = ' and '+ conditions["based_on_select"][:-1] +' IS Not NULL' if conditions.get('trans') in ['Sales Order', 'Purchase Order']: - cond += "and t1.status != 'Closed'" + cond += " and t1.status != 'Closed'" year_start_date, year_end_date = frappe.db.get_value("Fiscal Year", filters.get('fiscal_year'), ["year_start_date", "year_end_date"])