fix: can't open general ledger from consolidated financial report (#25542)
This commit is contained in:
parent
1e554378c7
commit
384f4b5b7e
@ -2,6 +2,7 @@
|
||||
// For license information, please see license.txt
|
||||
/* eslint-disable */
|
||||
|
||||
frappe.require("assets/erpnext/js/financial_statements.js", function() {
|
||||
frappe.query_reports["Consolidated Financial Statement"] = {
|
||||
"filters": [
|
||||
{
|
||||
@ -94,6 +95,14 @@ frappe.query_reports["Consolidated Financial Statement"] = {
|
||||
}
|
||||
],
|
||||
"formatter": function(value, row, column, data, default_formatter) {
|
||||
if (data && column.fieldname=="account") {
|
||||
value = data.account_name || value;
|
||||
|
||||
column.link_onclick =
|
||||
"erpnext.financial_statements.open_general_ledger(" + JSON.stringify(data) + ")";
|
||||
column.is_tree = true;
|
||||
}
|
||||
|
||||
value = default_formatter(value, row, column, data);
|
||||
|
||||
if (!data.parent_account) {
|
||||
@ -117,3 +126,4 @@ frappe.query_reports["Consolidated Financial Statement"] = {
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -329,8 +329,9 @@ def prepare_data(accounts, start_date, end_date, balance_must_be, companies, com
|
||||
has_value = False
|
||||
total = 0
|
||||
row = frappe._dict({
|
||||
"account_name": _(d.account_name),
|
||||
"account": _(d.account_name),
|
||||
"account_name": ('%s - %s' %(_(d.account_number), _(d.account_name))
|
||||
if d.account_number else _(d.account_name)),
|
||||
"account": _(d.name),
|
||||
"parent_account": _(d.parent_account),
|
||||
"indent": flt(d.indent),
|
||||
"year_start_date": start_date,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user