whisper-money/database/factories
Víctor Falcón 299b8a56d8
feat: investment benefits — show gains/losses on investment accounts (#140)
## Why

Investment and retirement accounts show balance over time, but there's
no way to see how much money was actually put in versus how much is
current value. Users can't tell at a glance whether their investments
are up or down.

## What

Adds an "invested amount" tracking system across the full stack:

**Backend**
- New `invested_amount` column on `account_balances` (nullable
bigInteger, cents, per-date)
- Auto-sync from providers: Indexa Capital (instruments_cost +
cash_amount), Bitpanda (fiat deposit/withdrawal history), Binance
(90-day windowed deposit/withdrawal with crypto→fiat conversion)
- Manual input support via Update Balance dialog
- Historical invested amount data in all balance evolution APIs (net
worth, account detail)

**Frontend**
- Dashed line on sparkline charts (dashboard + accounts page) showing
per-point historical invested amount alongside balance
- Dashed line on account detail charts (daily AreaChart + monthly
ComposedChart)
- Tooltips with labeled rows: Balance, Invested, Gain/loss (color-coded)
- Invested amount column in balances history modal
- Invested amount field in balance import wizard (CSV mapping)
- Demo account seeder updated with invested amount data

## Screenshots
<img width="1301" height="750" alt="image"
src="https://github.com/user-attachments/assets/0f05ecd0-8b98-47b4-9fa4-027f0311e3bb"
/>
<img width="744" height="374" alt="image"
src="https://github.com/user-attachments/assets/c4daa816-dee0-4f94-957f-317a13bc80d5"
/>
<img width="1267" height="738" alt="image"
src="https://github.com/user-attachments/assets/21df350c-6954-4ff5-8b3c-b858df3a8b3a"
/>
<img width="1301" height="828" alt="image"
src="https://github.com/user-attachments/assets/16f5f021-a926-4e8e-a999-c4ca32d1ea3d"
/>
<img width="1274" height="845" alt="image"
src="https://github.com/user-attachments/assets/62f2dfc0-04f0-4bdb-b072-cf7cd1be77d3"
/>
2026-02-23 13:59:10 +01:00
..
AccountBalanceFactory.php feat: investment benefits — show gains/losses on investment accounts (#140) 2026-02-23 13:59:10 +01:00
AccountFactory.php feat: Integrate EnableBanking as open banking provider (#106) 2026-02-12 09:09:28 +01:00
AutomationRuleFactory.php Automation rules 2025-11-10 12:08:58 +00:00
BankFactory.php Update bank model 2025-11-07 19:11:00 +00:00
BankingConnectionFactory.php feat: Add Bitpanda exchange integration (#132) 2026-02-19 09:26:31 +01:00
BudgetFactory.php Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
BudgetPeriodFactory.php Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
BudgetTransactionFactory.php Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
CategoryFactory.php Add category type field support (#2) 2025-12-01 20:19:47 +01:00
ExchangeRateFactory.php feat: Add multi-currency conversion for net worth charts (#138) 2026-02-20 10:45:23 +01:00
LabelFactory.php feat: add transaction labels feature (#24) 2025-12-13 13:02:19 +01:00
TransactionFactory.php feat: Integrate EnableBanking as open banking provider (#106) 2026-02-12 09:09:28 +01:00
UserFactory.php Remove encryption from browser tests and demo user (#129) 2026-02-17 11:45:27 +01:00
UserLeadFactory.php Merge pull request #1 from whisper-money/landing-page 2025-11-24 12:11:35 +01:00
UserMailLogFactory.php feat: Send custom emails to users (#52) 2026-01-09 09:33:19 +01:00