From d4ae5d1d3310fb92d35ce616a7bfc267ce0e8ccd Mon Sep 17 00:00:00 2001 From: olsch01 Date: Sat, 21 Feb 2026 13:44:58 -0500 Subject: [PATCH] Hide system equity accounts from Accounts page System accounts (Operating Fund Balance, Reserve Fund Balance) are auto-created as double-entry offsets when users set initial balances. They don't represent real bank accounts and were confusing to see alongside actual accounts. Now filtered from account lists, tab counts, and summary card totals. They remain active under the covers for journal entries and are still visible on the Balance Sheet report where equity belongs. Co-Authored-By: Claude Opus 4.6 --- frontend/src/pages/accounts/AccountsPage.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/accounts/AccountsPage.tsx b/frontend/src/pages/accounts/AccountsPage.tsx index 54bec34..73647d3 100644 --- a/frontend/src/pages/accounts/AccountsPage.tsx +++ b/frontend/src/pages/accounts/AccountsPage.tsx @@ -388,7 +388,9 @@ export function AccountsPage() { }; // ── Filtering ── + // Hide system accounts (auto-created equity offsets) from the accounts view const filtered = accounts.filter((a) => { + if (a.is_system) return false; if (search && !a.name.toLowerCase().includes(search.toLowerCase()) && !String(a.account_number).includes(search)) return false; if (filterType && a.account_type !== filterType) return false; if (filterFund && a.fund_type !== filterFund) return false; @@ -403,9 +405,10 @@ export function AccountsPage() { const reserveInvestments = investments.filter((i) => i.fund_type === 'reserve' && i.is_active); // ── Summary cards ── + // Exclude system accounts from summaries to avoid double-counting const totalsByType = accounts.reduce( (acc, a) => { - if (a.is_active) { + if (a.is_active && !a.is_system) { acc[a.account_type] = (acc[a.account_type] || 0) + parseFloat(a.balance || '0'); } return acc;