fix: enhance growth view filtering by validating period keys

This commit is contained in:
Abdeali Chharchhoda
2026-06-25 18:54:25 +05:30
committed by Smit Vora
parent 4c7499600c
commit aad287d09e

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;
}