feat(analytics): cashflow view with income/investment/net — split-adjusted + multi-currency
- Add 'investment' category (shares, ETFs, super) - Analytics API: separate income, investment, expense queries; use amount_aud for FX-aware sums - Analytics page: cashflow summary (income/expenses/invested/net cash), grouped bar chart, income + invested rows in 6-month trend table - MonthlyAnalytics interface: add income, investments, net fields to totals - DB: amount_aud + exchange_rate_to_aud columns added and backfilled (in prior migration)
This commit is contained in:
@@ -16,6 +16,7 @@ export const CATEGORIES = [
|
||||
"rent",
|
||||
"transfers",
|
||||
"income",
|
||||
"investment",
|
||||
"personal_care",
|
||||
"pets",
|
||||
"gifts",
|
||||
|
||||
+3
-1
@@ -451,7 +451,9 @@ export interface MonthlyAnalyticsRow {
|
||||
export interface MonthlyAnalytics {
|
||||
months: string[];
|
||||
rows: MonthlyAnalyticsRow[];
|
||||
totals: Record<string, { spent: number; budget: number }>;
|
||||
income: Record<string, number>;
|
||||
investments: Record<string, number>;
|
||||
totals: Record<string, { spent: number; income: number; investments: number; net: number }>;
|
||||
}
|
||||
|
||||
export function useBudgets(month: string) {
|
||||
|
||||
Reference in New Issue
Block a user