Skip to content

Multi Bank accounts: Cash, Transfers, balances (#63) - #77

Merged
petkov93 merged 21 commits into
mainfrom
feat/multi-bank-accounts
Jul 26, 2026
Merged

petkov93 merged 21 commits into
mainfrom
feat/multi-bank-accounts

Conversation

@petkov93

@petkov93 petkov93 commented Jul 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Ships PRD #63: named Bank accounts (immortal Cash), Opening balance, in-app Transfers (same- and cross-currency per ADR-0004), Available balance as the Display-converted sum of pots, and IOU open/repay Bank account pickers.
  • Child tickets merged into this branch: #64/#70, #65/#71, #66/#72, #67/#74, #68/#75, #69/#76.
  • Investments left unchanged; admin-only bulk reassign for backlog cleanup.

Test plan

  • Run migrations on a fresh DB and an existing DB with history; confirm Cash is created and legacy transactions attach to Cash
  • Create custom Bank accounts (checking/savings/credit) with Opening balance; confirm per-pot balances and that Opening balance is excluded from dashboard/statistics spending totals
  • Confirm Bank account currency is locked after create; Cash cannot be deleted; empty custom pots can be deleted; delete blocked when transactions/Transfers remain
  • Add/edit transactions with Bank account picker (defaults to Cash); currency must match the pot
  • Create/edit/delete same-currency Transfer; balances move, Available balance unchanged, excluded from spending totals
  • Create cross-currency Transfer; destination credited via Currency conversion; FX unavailable path fails/warns consistently
  • Open and repay IOUs with Bank account picker (defaults to Cash); IOU cash still affects Available and stays out of spending stats
  • Dashboard still shows Available balance and Total balance (Available ± open IOUs)
  • Django admin: bulk-assign selected transactions to a Bank account (same user + matching currency)
  • CI green on this PR

Closes #63

Made with Cursor

petkov93 and others added 21 commits July 25, 2026 20:51
…n picker.

Closes #64

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…picker

Bank accounts: Cash, migrate history, transaction picker
Add a Django admin action that lets operators select multiple transactions
and assign them to a single bank account. The action validates that all
selected transactions belong to the same user and that their currency
matches the bank account currency, matching the in-app transaction rules.

Closes #65

Co-authored-by: Cursor <cursoragent@cursor.com>
…ncy error

Co-authored-by: Cursor <cursoragent@cursor.com>
raw_id_fields only accept numeric PKs, so pasting a username failed
even when the user existed. Switch related FK fields to autocomplete
and include the username in BankAccount string labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
#65 Admin bulk-assign transactions to bank account
Allow create/list/rename/delete of custom Bank accounts with locked currency, optional kind, and Opening balance that feeds Bank account balances while staying out of spending totals (#66).

Co-authored-by: Cursor <cursoragent@cursor.com>
…pening-balance

Bank accounts: manage accounts, Opening balance, balances
Redefine Available balance as the Display-converted sum of Bank account
balances (today's rate for cross-currency). Total balance still applies
open IOU adjustment.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add Transfer create/edit/delete between Bank accounts, with Currency
conversion for cross-currency moves, and exclude Transfers from spending.

Co-authored-by: Cursor <cursoragent@cursor.com>
Let users choose which Bank account lend/borrow openings and repayments
hit (default Cash). Currency must match the Bank account currency.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ance-67

Bank accounts: Available balance as sum of Bank accounts (#67)
create_receivable now requires Transaction currency to match the Bank
account currency; these fixtures used EUR against default CZK Cash.

Co-authored-by: Cursor <cursoragent@cursor.com>
Merge kept create_bank_account from services and dropped
ensure_cash_bank_account; view tests need the Cash helper, and
create_bank_account stays on the factory.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bank accounts: IOU open/repay Bank account picker (#69)
…fers-68

Co-authored-by: Cursor <cursoragent@cursor.com>
Bank accounts: in-app Transfers same- and cross-currency (#68)
@petkov93
petkov93 merged commit 8494049 into main Jul 26, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PRD: Multi Bank accounts (Cash, Transfers, balances)

1 participant