From 6a916943aa66f25e7b5ef652f8c44250018db16a Mon Sep 17 00:00:00 2001 From: Saurabh Date: Fri, 26 Oct 2018 13:43:44 +0000 Subject: [PATCH] fix(P&L): sql query --- erpnext/accounts/report/financial_statements.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 10980574b34..076dd845dd6 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -341,8 +341,8 @@ def set_gl_entries_by_account( accounts = frappe.db.sql_list("""select name from `tabAccount` where lft >= %s and rgt <= %s""", (root_lft, root_rgt)) - additional_conditions += " and account in ('{}')"\ - .format("', '".join([frappe.db.escape(d) for d in accounts])) + additional_conditions += " and account in ({})"\ + .format(", ".join([frappe.db.escape(d) for d in accounts])) gl_entries = frappe.db.sql("""select posting_date, account, debit, credit, is_opening, fiscal_year, debit_in_account_currency, credit_in_account_currency, account_currency from `tabGL Entry` where company=%(company)s