mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
fix: link cash flow rows and fix summary linking
(cherry picked from commit b94af28587)
# Conflicts:
# erpnext/public/js/financial_statements.js
This commit is contained in:
@@ -28,6 +28,13 @@ erpnext.financial_statements = {
|
||||
|
||||
return value;
|
||||
} else if (frappe.query_report.get_filter_value("selected_view") == "Margin" && data) {
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
if (column.fieldname == "stub" && data.account_name == __("Income")) {
|
||||
//Taking the total income from each column (for all the financial years) as the base (100%)
|
||||
this.baseData = row;
|
||||
}
|
||||
>>>>>>> b94af28587 (fix: link cash flow rows and fix summary linking)
|
||||
if (column.colIndex >= 2) {
|
||||
const marginPercent = data[column.fieldname];
|
||||
|
||||
@@ -41,8 +48,9 @@ erpnext.financial_statements = {
|
||||
}
|
||||
}
|
||||
|
||||
if (data && column.fieldname == "account") {
|
||||
value = data.account_name || value;
|
||||
if (data && column.fieldname == "stub") {
|
||||
// first column
|
||||
value = data.section_name || data.account_name || value;
|
||||
|
||||
if (filter && filter?.text && filter?.type == "contains") {
|
||||
if (!value.toLowerCase().includes(filter.text)) {
|
||||
@@ -50,7 +58,7 @@ erpnext.financial_statements = {
|
||||
}
|
||||
}
|
||||
|
||||
if (data.account) {
|
||||
if (data.account || data.accounts) {
|
||||
column.link_onclick =
|
||||
"erpnext.financial_statements.open_general_ledger(" + JSON.stringify(data) + ")";
|
||||
}
|
||||
@@ -59,7 +67,7 @@ erpnext.financial_statements = {
|
||||
|
||||
value = default_formatter(value, row, column, data);
|
||||
|
||||
if (data && !data.parent_account) {
|
||||
if (data && !data.parent_account && !data.parent_section) {
|
||||
value = $(`<span>${value}</span>`);
|
||||
|
||||
var $value = $(value).css("font-weight", "bold");
|
||||
@@ -73,13 +81,13 @@ erpnext.financial_statements = {
|
||||
return value;
|
||||
},
|
||||
open_general_ledger: function (data) {
|
||||
if (!data.account) return;
|
||||
if (!data.account && !data.accounts) return;
|
||||
let project = $.grep(frappe.query_report.filters, function (e) {
|
||||
return e.df.fieldname == "project";
|
||||
});
|
||||
|
||||
frappe.route_options = {
|
||||
account: data.account,
|
||||
account: data.account || data.accounts,
|
||||
company: frappe.query_report.get_filter_value("company"),
|
||||
from_date: data.from_date || data.year_start_date,
|
||||
to_date: data.to_date || data.year_end_date,
|
||||
|
||||
Reference in New Issue
Block a user