Feature

BookKeeper

Proper double-entry over the top of the cash and the stock: journals in, statements out.

Why it exists

DailyCash answers “what happened today”. StockRoom answers “what’s on the shelf”. Neither answers “what is this business worth, and where did the money go this year” — that needs accounts, and accounts need double entry.

The path through it

Chart of accounts │ ▼ ┌─────────────────┐ │ General journal │ anything that isn't cash in or cash out │ Cash receipts │ CRJ — money in │ Disbursements │ CDJ — money out └────────┬────────┘ │ journal_entries + journal_entry_lines ▼ General ledger (view) every posted line, per account │ ▼ Trial balance (view) debits = credits, or something is wrong │ ▼ Income · Owner's Equity · Financial Position · Cash Flows

The tables

TableHolds
bookkeeping.accountsThe chart of accounts: code, name, type, normal balance.
bookkeeping.journal_entriesOne entry — its date, journal, reference and remarks.
bookkeeping.journal_entry_linesThe debits and credits. An entry is only valid if these sum to zero.

A view whose job is to be empty

bookkeeping.unbalanced_entries lists entries whose lines don’t balance. It should always return nothing. It exists so that “the books balance” is a query with an answer rather than an assumption — the accounting equivalent of a test you can run against production.

The three journals

JournalForPage
GeneralEverything that isn't a cash movement: accruals, corrections, opening balances./books/journals/general
Cash Receipts (CRJ)Money in./books/journals/receipts
Cash Disbursements (CDJ)Money out./books/journals/disbursements

The statements

StatementAnswers
IncomeDid it make money over this period?
Owner's EquityWhat happened to the owner's stake?
Financial PositionWhat does it own and owe right now?
Cash FlowsWhere the cash actually went, which is rarely the same story as income.

All four are built from the same period facts — an opening set, a period set and a to-date set — so the statements agree with each other by construction rather than by coincidence.

Export

Journals export to Excel via excel and file_saver. They’re the only dependencies in the app pulled in for a single feature, which is noted in pubspec.yaml so it stays obvious why they’re there.

Known rough edge

Posting expenses that offset a receivable currently credits Cash even when no cash moved, and there’s a non-cash withholding source that isn’t modelled as one. Both are known and deferred — recorded here so the next person to open the CDJ posting code isn’t surprised by it.