mirror of
https://github.com/frappe/erpnext.git
synced 2026-07-31 16:24:37 +00:00
fix: update formatting of growth view for FS report
(cherry picked from commit 4c7499600c)
This commit is contained in:
committed by
Mergify
parent
1f5281d3b8
commit
da3844c4df
@@ -41,6 +41,22 @@ erpnext.financial_statements = {
|
||||
_is_special_view: function (column, data) {
|
||||
if (!data) return false;
|
||||
const view = get_filter_value("selected_view");
|
||||
|
||||
if (!["Growth", "Margin"].includes(view)) return false;
|
||||
|
||||
if (get_filter_value("report_template")) {
|
||||
const columnInfo = erpnext.financial_statements._parse_column_info(column.fieldname, data);
|
||||
// Account column
|
||||
if (columnInfo.isAccount) return false;
|
||||
|
||||
if (view === "Growth") {
|
||||
const periodKeys = data._segment_info?.period_keys || [];
|
||||
// First period of new segment
|
||||
if (periodKeys[0] === columnInfo.fieldname) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return (view === "Growth" && column.colIndex >= 3) || (view === "Margin" && column.colIndex >= 2);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user