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;