fix: enhance growth view filtering by validating period keys

(cherry picked from commit aad287d09e)
This commit is contained in:
Abdeali Chharchhoda
2026-06-25 18:54:25 +05:30
committed by Mergify
parent da3844c4df
commit 3f87836536

View File

@@ -49,11 +49,15 @@ erpnext.financial_statements = {
// Account column
if (columnInfo.isAccount) return false;
const periodKeys = data._segment_info?.period_keys || [];
if (!periodKeys.includes(columnInfo.fieldname)) 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;
}