Skip to content

Accounts (Bank & Cash)

Operational bank/cash/card/wallet account register. Each record shadows a GL account and tracks money-in/money-out as a simple ledger.

Two senses of 'accounts'

The Accounts page at /accounts (this doc) is about bank accounts and cash drawers. The Chart of Accounts for general-ledger accounting lives under Finance at /finance?tab=accounts and is documented in docs/features/finance/index.md. The /accounts URL actually redirects to /finance (see src/App.tsx:173) — the Bank & Cash page is surfaced inside Finance or reached directly via Accounts.tsx.

Pages

  • src/pages/accounts/Accounts.tsx — single-page register + transaction ledger.

Route (src/App.tsx:173):

<Route path="/accounts" element={<Navigate to="/finance" replace />} />

Route behaviour

The direct /accounts URL redirects to /finance. The Bank & Cash UI is embedded inside Finance's Accounts tab. The Accounts.tsx component is still used there.

Account types

Defined in Accounts.tsx:61:

Type Label Default GL code Default GL name
bank Bank Account 1100 Bank Account
cash Cash Account 1010 Cash in Hand
credit_card Credit Card 2200 Credit Card Payable
digital_wallet Digital Wallet / UPI 1120 Digital Wallet
other Other 1190 Other Account

Each record carries:

  • Currency — one of the system currency list (src/types/currency.ts).
  • Transaction modeboth | debit_only | credit_only.
  • Allow negative balance — toggle for accounts that can legitimately dip below zero (e.g. credit cards).
  • Opening balance, bank name, last-4 account number, notes.

Ledger

A detail dialog lists all AccountTransaction rows in reverse chronological order with three summary cards:

  • Opening balance.
  • Net flow — sum of credits − debits across visible transactions.
  • Current balance — opening + net flow.

Transaction types:

Type Label Effect on balance
credit Money In +amount
debit Money Out −amount
adjustment Adjustment sign embedded in amount

Booking payments flow separately

The manual transaction dialog includes a hint: "For booking payments, use the Bookings page." Booking-linked receipts go through the payments flow (docs/features/bookings.md) which posts a balanced journal to the GL and creates the matching account transaction automatically.

Relationship to the general ledger

Every Bank & Cash row maps to a GL account via the type-to-code table above. Internal notes on the page confirm:

All transactions automatically post to the general ledger.

So when a user adds a manual transaction here, the server posts a journal line to the mapped GL code. Reconciliation is done either on this page (opening an account → reviewing ledger rows) or by posting a contra voucher from Finance to shift money between two Bank & Cash accounts.

API endpoints

Implemented in src/lib/api.ts:16563 onwards:

Method Path Purpose
GET /accounts List accounts (supports includeInactive)
POST /accounts Create account — finance.create
POST /accounts/transfers Inter-account transfer — finance.create
PATCH /accounts/:id Edit or soft-toggle active — finance.edit
DELETE /accounts/:id Hard delete (cascade-safe) — finance.edit
GET /accounts/:id/transactions Ledger
POST /accounts/:id/transactions Add manual txn — finance.create
PATCH /accounts/transactions/:id Edit txn — finance.edit
DELETE /accounts/transactions/:id Delete txn — finance.edit
GET /accounts/:id/ledger Delegates to /finance/accounts/:id/ledger for journal-level ledger

Permissions

Action Permission Source
View Bank & Cash finance.view Inherits Finance route gate
Create account / manual transaction finance.create src/lib/api.ts:16775, :16987
Edit / delete account or transaction finance.edit src/lib/api.ts:16945, :17048, :17054
  • Chart of Accounts & journal posting → docs/features/finance/index.md, docs/features/finance/journals.md.
  • Bank reconciliation workflow → docs/features/finance/bank-reconciliation.md.