From aad287d09ef157572e28eb5bc62705d7293eeebe Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Thu, 25 Jun 2026 18:54:25 +0530 Subject: [PATCH] fix: enhance growth view filtering by validating period keys --- erpnext/public/js/financial_statements.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js index 7eef83dac8d..af062e80e9c 100644 --- a/erpnext/public/js/financial_statements.js +++ b/erpnext/public/js/financial_statements.js @@ -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; }