Add Balance Sheet report
New first-tab report showing a full breakdown of where money sits: - Three KPI cards: total assets, total liabilities, net worth - Proportional stacked bars showing asset and liability composition - Side-by-side account lists grouped by type (Cash, Savings, ISAs, Investments, Pension, Crypto vs Credit Cards, Loans, Mortgages) - Backend endpoint GET /api/v1/reports/balance-sheet with typed schema - Balance Sheet is now the default tab on the Reports page Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
70db18e89f
commit
dd66b2d5fe
5 changed files with 337 additions and 5 deletions
|
|
@ -94,3 +94,27 @@ class SpendingTrendsReport(BaseModel):
|
|||
points: list[SpendingTrendPoint]
|
||||
categories: list[str]
|
||||
currency: str
|
||||
|
||||
|
||||
class BalanceSheetAccount(BaseModel):
|
||||
id: str
|
||||
name: str
|
||||
type: str
|
||||
balance: Decimal
|
||||
currency: str
|
||||
|
||||
|
||||
class BalanceSheetGroup(BaseModel):
|
||||
label: str
|
||||
type_keys: list[str]
|
||||
accounts: list[BalanceSheetAccount]
|
||||
subtotal: Decimal
|
||||
|
||||
|
||||
class BalanceSheetReport(BaseModel):
|
||||
asset_groups: list[BalanceSheetGroup]
|
||||
liability_groups: list[BalanceSheetGroup]
|
||||
total_assets: Decimal
|
||||
total_liabilities: Decimal
|
||||
net_worth: Decimal
|
||||
currency: str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue