mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-19 09:28:46 +00:00
fix: enhance growth view filtering by validating period keys
(cherry picked from commit aad287d09e)
This commit is contained in:
committed by
Mergify
parent
da3844c4df
commit
3f87836536
@@ -49,11 +49,15 @@ erpnext.financial_statements = {
|
|||||||
// Account column
|
// Account column
|
||||||
if (columnInfo.isAccount) return false;
|
if (columnInfo.isAccount) return false;
|
||||||
|
|
||||||
|
const periodKeys = data._segment_info?.period_keys || [];
|
||||||
|
|
||||||
|
if (!periodKeys.includes(columnInfo.fieldname)) return false;
|
||||||
|
|
||||||
if (view === "Growth") {
|
if (view === "Growth") {
|
||||||
const periodKeys = data._segment_info?.period_keys || [];
|
|
||||||
// First period of new segment
|
// First period of new segment
|
||||||
if (periodKeys[0] === columnInfo.fieldname) return false;
|
if (periodKeys[0] === columnInfo.fieldname) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user