paisa: promote from _dev; add config, demo, template, docs; remove maybe_dev

- Rename paisa_dev to paisa (production-ready)
- config/: blank-slate paisa.yaml and main.ledger
- demo/: Demolition Company Ltd. sample books (Dec 2025 to Feb 2026)
  with a tax-estimates sheet
- template/: starter books for a new small BC corporation
- docs/: demo guide, ledger cheatsheet, Paisa for accountants
- Remove maybe_dev stack

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
code
2026-11-22 16:54:02 +00:00
co-authored by Claude Opus 5.5
parent 80f2243424
commit b9ede12780
29 changed files with 1251 additions and 200 deletions
+158
View File
@@ -0,0 +1,158 @@
# Using the Demo Data
The `demo/` folder is a complete ledger git repo for a fictional
British Columbia business, **Demolition Company Ltd.** Use it to explore
Paisa before entering your own books. All figures are made up.
## What's in it
| File | Purpose |
| ----------------- | ---------------------------------------------------------- |
| `paisa.yaml` | Paisa config: CAD, BC time zone, strict accounts, goals |
| `main.ledger` | Entry point; includes the other files |
| `accounts.ledger` | Chart of accounts and the CAD commodity |
| `budget.ledger` | Monthly budget (periodic transaction) |
| `2025.ledger` | Incorporation, share issue, equipment purchase (Dec 2025) |
| `2026.ledger` | January and February 2026 transactions |
| `sheets/` | Paisa sheet with 2025 and 2026 tax estimates |
| `.gitignore` | Keeps `paisa.db` out of git if both paths share a folder |
## The company
- Incorporated in British Columbia on **December 1, 2025**
- Fiscal year end: **December 31**
- 100 common shares issued at $2,500 each ($250,000 share capital)
| Shareholder | Class | Shares | Paid (CAD) |
| -------------------------- | ------------------- | -----: | ---------: |
| CEO | A (voting) | 26 | 65,000.00 |
| CAO | A (voting) | 25 | 62,500.00 |
| CFO | A (voting) | 10 | 25,000.00 |
| Secretary | A (voting) | 5 | 12,500.00 |
| Investor01 to Investor04 | B (non-voting) | 4 | 10,000.00 |
| Investor05 to Investor10 | B (non-voting) | 3 | 7,500.00 |
| **Total** | | 100 | 250,000.00 |
Investor rows are per investor (four holders at 4 shares, six at 3).
The four officers hold 66 voting shares. The CEO's 26 is the largest
single block, but no officer has a majority alone. The ten family and
friends investors hold 34 non-voting Class B shares: they share in the
equity but have no vote. Each holder has an account under
`Equity:ShareCapital:ClassA` or `ClassB`, and each posting carries a
`Shares:` tag with the share count.
December 2025 covers incorporation and legal fees, the share issue, a
$120,000 equipment loan, machinery and vehicle purchases (BC PST added to
the asset cost, GST claimed as input tax credits), a savings transfer, a
petty cash float, and the first loan payment.
The crew also did three small jobs that month:
| Invoice | Job | Before tax | With GST + PST | Paid |
| ------- | ----------------------------- | ---------: | -------------: | ------------- |
| 1001 | Backyard shed removal | 2,500.00 | 2,800.00 | Dec 16, 2025 |
| 1002 | Kitchen tear-out, Oak Ave | 4,800.00 | 5,376.00 | Jan 8, 2026 |
| 1003 | Detached garage demolition | 7,500.00 | 8,400.00 | Dec 30, 2025 |
Plus scrap steel sales, landfill fees, fuel on the credit card, December
wages, and the WorkSafeBC premium. Invoice 1002 is still owed at year end,
and $840 of fuel is still on the credit card; both are settled in 2026.
## Year end, December 31, 2025
The first fiscal year is one month long. `2025.ledger` ends with two
entries dated December 31:
1. **Tax accrual:** corporate income tax at the 11% small business rate
(9% federal + 2% BC) on 3,890.00 of profit = 427.90, owed to CRA.
2. **Closing entry**, tagged `:closing:`: moves every 2025 income and
expense balance into `Equity:RetainedEarnings`.
| 2025 | CAD |
| -------------------------------------- | ---------: |
| Demolition income | 14,800.00 |
| Scrap income | 650.00 |
| **Total income** | **15,450.00** |
| Wages | 6,000.00 |
| Disposal | 2,000.00 |
| Professional fees | 1,500.00 |
| Fuel | 800.00 |
| Interest | 670.00 |
| Incorporation | 350.00 |
| WorkSafeBC | 240.00 |
| **Total expenses** | **11,560.00** |
| Net income before tax | 3,890.00 |
| Corporate income tax (11%) | 427.90 |
| **Net income to retained earnings** | **3,462.10** |
The T2 return and the tax balance are due June 30, 2026 (six months after
year end). The small business rates are a simplification for the demo;
confirm current rates with an accountant.
Accountants new to Paisa: read
[Paisa for Accountants](paisa-for-accountants.md#closing-entries) before
relying on Paisa's December 2025 reports. The closing entry makes them show
zero net income for that month.
## Tax estimates sheet
`sheets/tax-estimates.paisa` (in Paisa: **More → Sheets**) uses the
ledger to work out profit, the 11% small business tax, net GST, and PST
for fiscal 2025 and 2026 to date, then totals the cash to set aside. It
skips the closing entry so the 2025 figures aren't zero. The expected
result is in a comment on each line, so you can check it against the
ledger.
## 2026 activity
The 2026 books cover demolition invoices with GST 5% and
BC PST 7%, scrap metal sales (GST only), expenses with GST input tax
credits, payroll and CRA remittances, WorkSafeBC premiums, an equipment
loan, a credit card, and a savings transfer toward an excavator fund.
## Where the files go
| Data | Host path | In git? |
| ----------------------------- | ---------------------------- | ------- |
| `paisa.yaml`, `*.ledger` | `${VOL_PROJECTS:-/data}/paisa` | Yes |
| `paisa.db` (SQLite) | `${VOL_PATH:-/data}/paisa` | No, backed up by restic |
Both variables default to `/data`, so out of the box both are `/data/paisa`.
## Load the demo
1. From the root of this repo, copy the demo into its own folder, keeping
your real books separate:
```bash
mkdir -p /data/demo
cp -r paisa/demo /data/demo/paisa
```
2. In Dockhand, edit the stack's environment variables:
```env
VOL_PROJECTS=/data/demo
VOL_PATH=/data/demo-db
```
The compose file appends `/paisa`, so the ledger comes from
`/data/demo/paisa` and the database is written to `/data/demo-db/paisa`.
3. Redeploy the stack and open http://localhost:7500 (or the host's
address or proxy hostname if you're not on the Docker host).
4. Optional: make it a git repo to try the workflow:
```bash
cd /data/demo/paisa && git init && git add . && git commit -m "Demo books"
```
## Switch back to your own books
Set `VOL_PROJECTS` and `VOL_PATH` back to your values (default `/data`)
and redeploy. The demo database in `/data/demo-db` can be deleted at any
time; Paisa rebuilds it from the ledger files.
## Start your own books
- **New business:** copy `template/` instead of `demo/`. It has a
chart of accounts for a small BC corporation, `strict: "yes"`, a
sample budget, and a year file with commented examples. Fill in the
`TODO`s in `paisa.yaml`, `main.ledger`, and `accounts.ledger`.
- **Blank slate:** copy `config/`. It holds the same defaults with an
empty journal, `strict: "no"`, and no accounts.
+180
View File
@@ -0,0 +1,180 @@
# Ledger Cheatsheet
Quick reference for the plain-text [ledger](https://ledger-cli.org/)
format that Paisa reads. Full docs: [ledger manual](https://ledger-cli.org/doc/ledger3.html)
and [paisa.fyi](https://paisa.fyi/).
## Transaction basics
```ledger
2026/01/05 Payee | Description
Expenses:Fuel 850.00 CAD
Assets:GST:InputTaxCredits 42.50 CAD
Liabilities:CreditCard
```
- First line: date, optional status, payee/description.
- Postings are indented (at least 2 spaces or a tab).
- Separate account and amount with **2+ spaces** or a tab.
- Every transaction must balance to zero. One posting may omit its
amount; ledger fills in whatever balances it.
- Positive = debit, negative = credit. See [Account types](#account-types)
for each root's normal balance.
## Status marks
```ledger
2026/01/05 * Cleared transaction
2026/01/06 ! Pending transaction
```
## Comments
```ledger
; whole-line comment
2026/01/05 Fuel station ; note on the transaction
Expenses:Fuel 850.00 CAD ; note on a posting
Liabilities:CreditCard
```
## Account types
| Root | Normal balance | Example |
| ------------- | -------------- | ---------------------------- |
| `Assets` | Positive | `Assets:Bank:Chequing` |
| `Liabilities` | Negative | `Liabilities:CreditCard` |
| `Equity` | Negative | `Equity:OpeningBalances` |
| `Income` | Negative | `Income:Demolition` |
| `Expenses` | Positive | `Expenses:Fuel` |
Use `:` for sub-accounts. Paisa groups its reports by these roots.
## Declarations
```ledger
commodity CAD
format 1,000.00 CAD
account Assets:Bank:Chequing
account Expenses:Fuel
```
With `strict: "yes"` in `paisa.yaml`, every account and commodity must be
declared before it is used.
## Includes
```ledger
include accounts.ledger
include 2026.ledger
```
Ledger itself accepts any path, but Paisa only reads included files in
the same folder as the main journal or a subfolder.
## Budgets (periodic transactions)
```ledger
~ Monthly
Expenses:Fuel 3,000.00 CAD
Expenses:Disposal 4,000.00 CAD
Assets:Bank:Chequing
```
Paisa reads `~ Monthly` entries as the monthly budget.
## Common Canadian business patterns
Sale with GST 5% + BC PST 7%:
```ledger
2026/01/30 Invoice 1001 | Main St demolition
Assets:AccountsReceivable 31,360.00 CAD
Income:Demolition -28,000.00 CAD
Liabilities:GST:Collected -1,400.00 CAD
Liabilities:PST:Collected -1,960.00 CAD
```
Customer pays the invoice:
```ledger
2026/02/10 Customer | Payment on invoice 1001
Assets:Bank:Chequing 31,360.00 CAD
Assets:AccountsReceivable
```
Purchase with a GST input tax credit:
```ledger
2026/01/20 Landfill | Tipping fees
Expenses:Disposal 3,200.00 CAD
Assets:GST:InputTaxCredits 160.00 CAD
Assets:Bank:Chequing
```
Payroll, with source deductions owed to CRA:
```ledger
2026/01/31 Payroll | January wages
Expenses:Wages 18,000.00 CAD
Liabilities:Payroll:CRA -4,500.00 CAD
Assets:Bank:Chequing
```
Loan payment split into principal and interest:
```ledger
2026/01/31 Lender | Equipment loan
Liabilities:Loan:Equipment 2,800.00 CAD
Expenses:Interest 650.00 CAD
Assets:Bank:Chequing
```
Transfer between your own accounts:
```ledger
2026/02/28 Transfer | To savings
Assets:Bank:Savings 2,000.00 CAD
Assets:Bank:Chequing
```
Opening balances:
```ledger
2026/01/01 Opening balances
Assets:Bank:Chequing 45,000.00 CAD
Liabilities:Loan:Equipment -120,000.00 CAD
Equity:OpeningBalances
```
Year-end closing entry (net loss moved to retained earnings):
```ledger
2025/12/31 * Year end | Close 2025 income and expenses ; :closing:
Expenses:Incorporation -350.00 CAD
Expenses:ProfessionalFees -1,500.00 CAD
Expenses:Interest -670.00 CAD
Equity:RetainedEarnings 2,520.00 CAD
```
Reverse each Income and Expenses balance for the year and post the
difference to `Equity:RetainedEarnings`. A profit shows as a negative
(credit) to retained earnings, and a loss as a positive (debit).
## CLI commands (inside the container)
Run them with `docker compose exec paisa sh` (or open the container console in Dockhand), then `cd /root/Documents/paisa`:
| Command | Shows |
| ----------------------------------------- | ------------------------------ |
| `ledger -f main.ledger bal` | Balances for every account |
| `ledger -f main.ledger bal Expenses` | Expense totals |
| `ledger -f main.ledger reg Assets:Bank` | Running register for the bank |
| `ledger -f main.ledger bal -p "2026/01"` | January 2026 balances |
| `ledger -f main.ledger bal -M Expenses` | Expenses by month |
| `ledger -f main.ledger --strict bal` | Warns about undeclared accounts|
| `ledger -f main.ledger accounts` | List of accounts |
| `ledger -f main.ledger payees` | List of payees |
After editing files by hand, click **Sync** in Paisa so it rebuilds the
database from the journal.
+114
View File
@@ -0,0 +1,114 @@
# Paisa for Accountants
Notes for accountants and bookkeepers who know double-entry accounting
but haven't used Paisa or plain-text accounting before.
## How Paisa differs from accounting software
| Traditional software (QuickBooks, Sage) | Paisa + ledger |
| ----------------------------------------- | ------------------------------------------------ |
| Data lives in the program's database | Data lives in plain `.ledger` text files in git |
| Chart of accounts set up in the UI | Accounts declared in `accounts.ledger` |
| Entries made through forms | Entries typed as text (or through Paisa's editor)|
| Period close locks the books | Nothing is locked; git history is the audit trail|
| Closing entries required each year end | Reports are built from any date range on demand |
The database (`paisa.db`) is only a cache that Paisa rebuilds from the
ledger files. The `.ledger` files are the books of record.
## Sign convention
Ledger shows debits as positive and credits as negative. Income, equity,
and liability balances therefore show as negative numbers. This is
expected: `-15,450.00 CAD Income` means a 15,450.00 credit balance.
## Closing entries
**Paisa doesn't need closing entries.** It builds the income statement for
whatever period you pick by adding up the Income and Expenses postings in
that range. Income and expense accounts are never "reset"; a report for
2026 simply starts counting on January 1, 2026.
**What happens if you post one anyway.** The demo includes a closing
entry dated December 31, 2025 (tagged `:closing:`) so the books match what
an accountant expects at year end. Because it reverses every 2025 income
and expense balance on that date, Paisa's reports show:
- December 2025 (and fiscal 2025) with **zero income, expenses, and net
income**, since the reversal is posted to the same accounts on the
same date
- Correct balance sheet figures, including retained earnings
**To see the real 2025 figures,** exclude the closing entry with the
ledger CLI:
```bash
ledger -f main.ledger bal ^Income ^Expenses -p 2025 \
--limit 'not has_tag("closing")'
```
**Choosing an approach:**
| Approach | Paisa reports | Retained earnings in the books |
| ---------------------------------------- | ------------------ | ---------------------------------- |
| Post a closing entry (the demo) | Fiscal year = zero | Recorded explicitly |
| No closing entry | Correct | Derived (equity + net income) |
| Closing entry in a separate file | Correct in Paisa | Recorded; include file for filing |
For the third option, put closing entries in a file such as
`closing.ledger` that `main.ledger` doesn't include. Paisa then reports
normally, and you can include it when preparing statements:
`ledger -f main.ledger -f closing.ledger bal`.
## Accruals and receivables
Accruals work as normal journal entries. For example, the demo accrues
2025 corporate income tax on December 31 and carries invoice 1002 as a
receivable into January. Paisa shows them in the period they're dated.
## Sales tax (GST/PST)
There's no tax engine. GST and PST are separate postings on each entry:
- GST collected: `Liabilities:GST:Collected`
- GST paid on purchases (input tax credits): `Assets:GST:InputTaxCredits`
- BC PST collected: `Liabilities:PST:Collected`
- BC PST paid on purchases isn't recoverable, so add it to the expense or
asset cost
Net GST owing for a filing period:
```bash
ledger -f main.ledger bal GST -p "2025/12/01 to 2026/01/01"
```
## Useful reports for year-end work
| Report | Command |
| ---------------------------- | --------------------------------------------------------------- |
| Trial balance at year end | `ledger -f main.ledger bal -e 2026/01/01` |
| Income statement for 2025 | `ledger -f main.ledger bal ^Income ^Expenses -p 2025 --limit 'not has_tag("closing")'` |
| Balance sheet at year end | `ledger -f main.ledger bal ^Assets ^Liabilities ^Equity -e 2026/01/01` |
| General ledger for an account| `ledger -f main.ledger reg Assets:Bank:Chequing` |
| Check for undeclared accounts| `ledger -f main.ledger --strict --pedantic bal` |
`-e` is an exclusive end date: `-e 2026/01/01` means "up to and including
December 31, 2025". If you skip closing entries, the trial balance shows
the year's Income and Expenses balances, and the balance sheet above only
balances once net income is added to equity (it isn't in
`Equity:RetainedEarnings` yet).
## Audit trail
Every change to the books is a git commit with an author, date, and diff.
To see who changed what:
```bash
git log -p -- 2025.ledger
```
Paisa doesn't lock periods. If you need closed periods protected, use git
practices instead: tag the repo at year end (`git tag fy2025`) and review
any later changes to that year's file.
See also: [ledger cheatsheet](ledger-cheatsheet.md), [demo data](demo.md).