mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-04 18:23:05 +00:00
fix: enhance growth view filtering by validating period keys
This commit is contained in:
committed by
Smit Vora
parent
4c7499600c
commit
aad287d09e
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user