From 019501e4a04d24ed74b92820e7e272d58ee0c5b3 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 19 Apr 2017 17:53:31 +0530 Subject: [PATCH] [fix] Balance Sheet, linking account to general ledger is not working --- erpnext/public/js/financial_statements.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js index 711520530a..66daf0dfb4 100644 --- a/erpnext/public/js/financial_statements.js +++ b/erpnext/public/js/financial_statements.js @@ -26,13 +26,14 @@ erpnext.financial_statements = { }, "open_general_ledger": function(data) { if (!data.account) return; + var project = $.grep(frappe.query_report.filters, function(e){ return e.df.fieldname == 'project'; }) frappe.route_options = { "account": data.account, "company": frappe.query_report_filters_by_name.company.get_value(), "from_date": data.from_date || data.year_start_date, "to_date": data.to_date || data.year_end_date, - "project": $.grep(frappe.query_report.filters, function(e){ return e.df.fieldname == 'project'; })[0].$input.val() + "project": (project && project.length > 0) ? project[0].$input.val() : "" }; frappe.set_route("query-report", "General Ledger"); },