[fix] Balance Sheet, linking account to general ledger is not working

This commit is contained in:
Rohit Waghchaure 2017-04-19 17:53:31 +05:30 committed by Nabin Hait
parent 5123a8519b
commit 019501e4a0

View File

@ -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");
},