Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d07de12
feat(shell): show the app icon on the splash, as form.md's splash does
nodemode-ai Nov 27, 2026
8e42823
fix(theme): follow the system theme by default
nodemode-ai Nov 27, 2026
18f8d61
feat(window): add an export csv button part
nodemode-ai Nov 27, 2026
74b2bca
feat(window): export csv on the document lists
nodemode-ai Nov 27, 2026
1f1b571
feat(window): export csv on payments in and out
nodemode-ai Nov 27, 2026
09de485
feat(window): export csv on the six setup lists
nodemode-ai Nov 27, 2026
c8dbff9
feat(page): family page head with eyebrow title and lead
nodemode-ai Nov 27, 2026
4ad7cf1
feat(window): export csv on the ledger screens
nodemode-ai Nov 27, 2026
6020a12
feat(window): export csv on the statements
nodemode-ai Nov 27, 2026
fd78bff
feat(setup): cash or bank account flag on the chart of accounts
nodemode-ai Nov 27, 2026
71a7b65
feat(coa): add the cash or bank flag to accounts
nodemode-ai Nov 27, 2026
b743e7d
feat(reports): count cash and bank by a company preference
nodemode-ai Nov 27, 2026
f8ed116
feat(snapshot): carry the cash flag in the accounts table
nodemode-ai Nov 27, 2026
41e7f7f
feat(export): declare each export column and its kind
nodemode-ai Nov 27, 2026
8ab9fb0
build(deps): add go-pdf/fpdf v0.9.0 for printed documents
nodemode-ai Nov 27, 2026
7e8d0cc
feat(printout): draw quotes, orders and invoices as plain pdf pages
nodemode-ai Nov 27, 2026
4c6f23e
feat(printout): serve get /api/print/kind/number.pdf
nodemode-ai Nov 27, 2026
54bfcd7
feat(cli): add the print verb that writes the route's pdf bytes
nodemode-ai Nov 27, 2026
c2a5d65
docs(ledger): describe the cash flag and the cash preference
nodemode-ai Nov 27, 2026
ac98f9e
docs(internal): log why the cash preference bypasses settings defs
nodemode-ai Nov 27, 2026
67df401
feat(delivery): page the delivery note list with a cursor
nodemode-ai Nov 27, 2026
308a424
feat(icons): add theme, menu, sign out and history icons
nodemode-ai Nov 27, 2026
6327233
feat(shell): family sidebar head, user chip menu and history top bar
nodemode-ai Nov 27, 2026
99c913f
fix(printout): wrap cp1252 text by bytes so non-latin names do not panic
nodemode-ai Nov 27, 2026
363d333
fix(printout): say a draft is not yet numbered
nodemode-ai Nov 27, 2026
e4d1fec
docs(print): describe printing, the address, page size and characters
nodemode-ai Nov 27, 2026
70ff706
docs(export): describe declared columns, paging and money decimals
nodemode-ai Nov 27, 2026
c9cc635
fix(window): lay the export icon and label in one row
nodemode-ai Nov 27, 2026
c900e0f
docs(hashout): log the printout package
nodemode-ai Nov 27, 2026
3924bd5
feat(tokens): sheet shadow, card radius, xl text and bold weight
nodemode-ai Nov 27, 2026
657b4d5
feat(account): form.md sign-in card with brand, lead, hints and reveal
nodemode-ai Nov 27, 2026
73abdf3
docs(window): describe the family page head and where ledgers differ
nodemode-ai Nov 27, 2026
a8bc953
docs(web): log the family page head and its fixed height
nodemode-ai Nov 27, 2026
58dc6b8
fix(shell): sidebar foot rule, home action buttons, drop old status line
nodemode-ai Nov 27, 2026
c7b56b9
fix(docform): wrap document actions and follow the taller page head
nodemode-ai Nov 27, 2026
afc7266
fix(payments): bound the payment and stock forms to the window
nodemode-ai Nov 27, 2026
120b837
fix(setup): widen the cash badge column
nodemode-ai Nov 27, 2026
f2ca5b2
docs(hashout): family shell, theme menu and home head
nodemode-ai Nov 27, 2026
804659c
docs(window): log the export button and cash flag
nodemode-ai Nov 27, 2026
8199534
fix(docform): lay the title row out under the new page head
nodemode-ai Nov 27, 2026
296ab94
feat(printout): print a customer statement from the receivables state…
nodemode-ai Nov 27, 2026
293ddad
feat(cli): print statement CODE with --from and --to
nodemode-ai Nov 27, 2026
d799757
docs(print): describe the customer statement pdf
nodemode-ai Nov 27, 2026
864f8a0
feat(controls): inputs selects and checkboxes to the form.md field va…
nodemode-ai Nov 27, 2026
fd80102
docs(window): name the form.md source of the field rules
nodemode-ai Nov 27, 2026
90b393f
fix(payments): give the sticky payment actions the sheet colour
nodemode-ai Nov 27, 2026
a1c00c6
docs(window): log the form sizing checks
nodemode-ai Nov 27, 2026
e02ca29
feat(home): take the cash figure from the server's cash rule
nodemode-ai Nov 27, 2026
2464738
fix(docform): give the date fields room for a whole date
nodemode-ai Nov 27, 2026
a662fe8
fix(docform): keep the title box and the header values still on post
nodemode-ai Nov 27, 2026
ff2e3a3
docs(notice): credit the pdf library and what was ported from form.md
nodemode-ai Nov 27, 2026
3dd0370
chore(release): 0.10.0
nodemode-ai Nov 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Changelog

## 0.10.0

FormLedger now looks and behaves like a member of the Form family: its shell, sign-in, page heads and fields were brought over from form.md and checked against form.md running beside it.

### New
- The splash shows FormLedger's app icon, as form.md's splash shows its own.
- The window follows your system's light or dark theme, with a choice of System, Light or Dark in the menu at the foot of the sidebar.
- Sign-in, first set-up, unlock and invitations are one card on the dotted ground, with a show-password control.
- The sidebar is headed by the app icon, name, a live dot and the version, and ends in a chip with your name that opens a menu for your account, the theme and signing out.
- The top bar has back and forward and shows where you are as group and screen.
- Every screen opens with its group, a large title and one line saying what it is for.
- "Export CSV" on every list, ledger screen and statement, with the filters you have on.
- PDFs: invoices, quotes, orders, purchase documents and customer statements, by `./formledger cli print KIND NUMBER` or from the server. `docs/PRINT.md` says how.
- A "Cash or bank account" tick on asset accounts, and a company choice of how Home counts cash: ticked accounts, accounts named cash or bank, or automatic (ticked ones if any are ticked). `docs/ledger/cash-accounts.md` explains it.
- Home greets you and offers "New invoice" and "Record payment".

### Changed
- Fields, selects and tick boxes look and focus as they do in form.md.
- The delivery note list is read in pages like the other lists, so its export is no longer cut off at 500.
- An export of an empty list now has its real column header.
- The snapshot's accounts table has a new last column, `is_cash`.

### Fixed
- In narrower windows the document form's buttons, and the payment, goods receipt and delivery note forms' buttons, could fall outside the window.
- A grey band behind the payment form's buttons in the light theme.

### Known issues
- Buttons still differ a little from form.md's (hover, the danger style, height); the list is in the pull request.
- The window has no place yet to change how Home counts cash; it can be set through the server only.
- PDFs print letters outside Western European alphabets as codes such as `[U+0141]`, not as the letters.
- PDFs through FormTxt are not built. The window has no print button yet.
- The sidebar and Home show "FormLedger" where your company's name should be.
- Tables' empty messages do not yet have form.md's icon and title.
- The desktop app has not been built yet, so the splash has been checked as a page, not in the running app.

## 0.9.0

The window has had its first design pass, and two ways to take your figures out have arrived.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION := v0.9.0
VERSION := v0.10.0
GO_BUILD := CGO_ENABLED=0 go build -trimpath -ldflags "-s -w"

.PHONY: build web server check clean
Expand Down
3 changes: 2 additions & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A file brought over from another Form repository gets a row here with its source

| Source | Licence | What came over |
| --- | --- | --- |
| form.md v0.61.1 (`nodemode-dev/form.md`) | Apache-2.0 | `cmd/formledger/main.go`, `embed.go` and `internal/` (`app`, `config`, `httpx`, `i18n`, `ids`, `netguard`, `nowindow`, `secrets`, `settings`, `store` with its migration runner and the instance and settings tables, `server`, `static`, `startup`), reduced to a skeleton and renamed, with the encryption hooks cut for now. Since 0.3.0 also `internal/auth` (password hashing nearly verbatim; the desktop entry, sessions, tokens and invitations cut down to one company and one role per person), `internal/policy` (the roles and actions are FormLedger's own), `internal/audit` and `internal/auditapi` (the workspace, page and agent parts, the purge and the export removed), `internal/crypt` and `internal/cryptvfs` (nearly verbatim, not switched on yet), and the users, sessions, tokens and invitations tables cut from form.md's accounts migration. `web/`: the engine store and commands, `ui/dom`, `ui/icons`, `ui/toast`, the theme tokens and shell styles, the Vite and TypeScript configuration, `oc_install` and `boot_frontend`. `src-tauri/`: the whole shell, renamed, with the menus reduced. The root launcher, installer, `build_app` and `Makefile`. `CODE_OF_CONDUCT.md`, `CONTRIBUTING.md`, `SECURITY.md`, `BRANCHING.md`, `.github/` and `.claude/settings.json`, rewritten for this repository |
| form.md v0.61.1 (`nodemode-dev/form.md`) | Apache-2.0 | `cmd/formledger/main.go`, `embed.go` and `internal/` (`app`, `config`, `httpx`, `i18n`, `ids`, `netguard`, `nowindow`, `secrets`, `settings`, `store` with its migration runner and the instance and settings tables, `server`, `static`, `startup`), reduced to a skeleton and renamed, with the encryption hooks cut for now. Since 0.3.0 also `internal/auth` (password hashing nearly verbatim; the desktop entry, sessions, tokens and invitations cut down to one company and one role per person), `internal/policy` (the roles and actions are FormLedger's own), `internal/audit` and `internal/auditapi` (the workspace, page and agent parts, the purge and the export removed), `internal/crypt` and `internal/cryptvfs` (nearly verbatim, not switched on yet), and the users, sessions, tokens and invitations tables cut from form.md's accounts migration. `web/`: the engine store and commands, `ui/dom`, `ui/icons`, `ui/toast`, the theme tokens and shell styles, the Vite and TypeScript configuration, `oc_install` and `boot_frontend`. `src-tauri/`: the whole shell, renamed, with the menus reduced. The root launcher, installer, `build_app` and `Makefile`. `CODE_OF_CONDUCT.md`, `CONTRIBUTING.md`, `SECURITY.md`, `BRANCHING.md`, `.github/` and `.claude/settings.json`, rewritten for this repository. Since 0.10.0 also, from form.md at its `main` of 2026-11-27: the system-theme start in `web/index.html`; the sidebar head, user chip and menu, the top bar's back, forward and crumb, the sign-in card and the Home head (`web/src/styles/shell.css`, `auth.css`, `home.css`, `panels.css`, `pages.css`, `controls.css`, `web/src/ui/auth.ts`, `web/src/ui/icons.ts`, the tokens); the field, select and checkbox styles (`forms.css`, `settings.css`); the page head (`home.css`); the PDF page setup and page counter (`internal/transfer/pdf.go`); and the splash page's layout, which FormLedger shows with its own icon |

## Third-party software

Expand All @@ -18,6 +18,7 @@ Each component gets a row here with its licence and its use before it is added.
| --- | --- | --- |
| modernc.org/sqlite v1.60.1 and modernc.org/libc v1.77.1 | BSD-3-Clause | server |
| golang.org/x/crypto v0.58.0 | BSD-3-Clause | server |
| github.com/go-pdf/fpdf v0.9.0, the version form.md ships | MIT, read from the module's LICENSE: Copyright (c) 2021 The Go-PDF authors, (c) 2020 David Barnes, (c) 2017 Kurt Jung and contributors | server, the built-in PDF printouts |
| The indirect Go modules in `go.sum` (go-humanize, google/uuid, go-isatty, go-strftime, bigfft, x/net, x/sys, x/text, mathutil, memory) | the same modules form.md uses; their licences have not been read for this repository yet | server |
| Inter, the variable latin and latin-ext files from @fontsource-variable/inter 5.3.0, by way of form.md | SIL Open Font License 1.1, text in `web/src/fonts/Inter-OFL.txt` | interface font |
| typescript 7.0.2 | Apache-2.0 | building the web client; not shipped |
Expand Down
2 changes: 1 addition & 1 deletion cmd/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Living log of all comment content, explainers, rationale, TODOs, & removed (hashed-out) code for the entry point, `embed.go`, `internal/server`, `internal/static` and `internal/startup`. Source files stay comment-free per dev-rules `sub-skills/hashout-log/SUB-SKILL.md`; everything they would have said lives here, indexed. Read it first, then edit code surgically.

Current build version: v0.9.0
Current build version: v0.10.0
Last updated: 2026-11-26 (US Eastern) · skeleton port from form.md

---
Expand Down
21 changes: 11 additions & 10 deletions docs/EXPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,23 @@ The command line fetches the same route with the app token (`FORMLEDGER_TOKEN` o

## How it works

The export route runs the list or report's own JSON route inside the server, with the caller's own session or token. So each export takes exactly the query parameters of its JSON route and is guarded by exactly the same permission; a refusal or a bad parameter answers that route's own status and JSON error body. An unknown name answers `404` with `{"error":{"code":"not_found","message":"no such export"}}`. Without a session it answers `401`.
The export route runs the list or report's own JSON route inside the server, with the caller's own session or token. So each export takes exactly the query parameters of its JSON route and is guarded by exactly the same permission; a refusal or a bad parameter answers that route's own status and JSON error body. An unknown name answers `404` with `{"error":{"code":"not_found","message":"no such export"}}`. Without a session it answers `401`. All 22 JSON routes need `reports.read`, which every role holds (the viewer too), so today a signed-in user of any role gets every file; a role without that permission would get the route's `403`.

A list is read to the end: the export follows `nextCursor` (or `next`) page by page until it is empty, so the file holds every row, not the first page. `cursor` is ignored if given; `limit` only sets the page size.
A list is read to the end: the export follows `nextCursor` (or `next`) page by page until it is empty, so the file holds every row, not the first page. `cursor` is ignored if given; `limit` only sets the page size. The delivery note list pages by cursor like the document lists (`GET /api/delivery/notes?limit=&cursor=`, answering `nextCursor`, newest first with the id as the tie-break), so the delivery-notes export is complete past 500 rows.

## The file

- RFC 4180 through Go `encoding/csv`: comma separated, CRLF line ends, a field with a comma, quote or line break is quoted and its quotes doubled.
- UTF-8 with no byte order mark.
- `Content-Type: text/csv; charset=utf-8` and `Content-Disposition: attachment; filename="NAME-YYYY-MM-DD.csv"`, the date being today in US Eastern time.
- One header row of lower_snake_case names, taken from the JSON field names in their JSON order (`taxTotal` becomes `tax_total`, `days1to30` becomes `days_1_to_30`). A nested object is spread into prefixed columns (`account` in the general ledger gives `account_code`, `account_name` and so on). Nested lists (document lines, allocations) are left out.
- One header row of lower_snake_case names, from a column list declared for each export (the table below, in file order), so the header is the same whether the list has no rows, one row or many, and a field the first row lacks is still a column. A JSON field `taxTotal` is column `tax_total`, `days1to30` is `days_1_to_30`. A nested object is spread into prefixed columns (`account` in the general ledger gives `account_code`, `account_name` and so on). Nested lists (document lines, allocations) are left out. A JSON field that is not in the declared list is not written: a new field reaches the file only when it is declared there with its kind.
- Each declared column has a kind: text, date, money, integer or quantity. The kind decides how the cell is written, never the field's name.
- Report-wide values (`as_of`, `from`, `to`, `by`, the ledger's `account_*`) are repeated on every row so each row stands alone.
- Dates are YYYY-MM-DD. A time stamp field (`created_at`, `posted_at` and the like) is written as its US Eastern date; an empty one is an empty cell.
- Money is a plain decimal in major units of the row's currency, with a leading `-` when negative: never a thousands separator, never a currency sign. Every row with money carries a `currency` column. The money fields are `debit`, `credit`, `balance`, `amount`, `total`, `subtotal`, `tax_total`, `opening`, `closing`, `value`, `unit_cost`, `current`, the ageing buckets, `allocated`, `unallocated`, `outstanding` and any field ending in `price` or `amount`.
- Other numbers (`rate_bp`, `quantity_milli`, `payment_terms_days`, `line_count`) are written as the JSON integer. Booleans are `true` or `false`.
- Formula guard: a cell in a TEXT column (a JSON string, such as a name, memo or code) that starts with `=`, `+`, `-` or `@` is written with a single quote in front, so a spreadsheet shows it as text and does not run it as a formula. `=HYPERLINK("x")` is written `'=HYPERLINK("x")`. Numbers and amounts are never changed, so `-60.15` stays a number.
- A list with no rows has no field names to read, so its file is the single header `empty`.
- Dates (kind date) are YYYY-MM-DD. A time stamp field (`created_at`, `posted_at` and the like) is written as its US Eastern date; an empty one is an empty cell.
- Money (kind money, marked `*` below) is a plain decimal in major units of the row's currency, with a leading `-` when negative: never a thousands separator, never a currency sign. The number of decimals is the currency's own: `2468` minor units is `2468` in JPY (no decimals), `24.68` in USD and `2.468` in KWD (three). Every export with a money column carries a `currency` column.
- Integers and quantities (`rate_bp`, `payment_terms_days`, `line_count`, `line_no`, and the quantity `qty_milli`) are written as the JSON integer; quantities stay in thousandths, so `5000` is 5 units. Booleans (`active`, `is_group`) are `true` or `false`.
- Formula guard: a cell in a TEXT column (a name, memo, code or other string) that starts with `=`, `+`, `-` or `@` is written with a single quote in front, so a spreadsheet shows it as text and does not run it as a formula. `=HYPERLINK("x")` is written `'=HYPERLINK("x")`. Date, money, integer and quantity cells are never changed, so `-60.15` stays a number.
- A list with no rows still has its full header and no data rows.

## Names

Expand All @@ -38,7 +39,7 @@ Columns are listed in file order. `*` marks money.
| purchase-orders | `/api/purchase/docs?kind=order` | status, supplier, limit | as its JSON route | id, kind, number, date, due_date, supplier_id, supplier, supplier_name, currency, status, source_id, amends_id, warehouse_id, warehouse, supplier_ref, subtotal*, tax_total*, total*, journal_entry_id, memo, created_by, created_at, posted_by, posted_at, cancelled_by, cancelled_at, line_count |
| purchase-invoices | `/api/purchase/docs?kind=invoice` | as purchase-orders | as purchase-orders | as purchase-orders |
| goods-receipts | `/api/purchase/docs?kind=receipt` | as purchase-orders | as purchase-orders | as purchase-orders |
| delivery-notes | `/api/delivery/notes` | status, order, limit (default 500) | reports.read | id, number, date, sales_order_id, customer_id, warehouse_id, status, journal_entry_id, memo, created_by, created_at, posted_by, posted_at, cancelled_by, cancelled_at, value*, currency |
| delivery-notes | `/api/delivery/notes` | status, order, limit (page size, default 500) | reports.read | id, number, date, sales_order_id, customer_id, warehouse_id, status, journal_entry_id, memo, created_by, created_at, posted_by, posted_at, cancelled_by, cancelled_at, value*, currency |
| payments-in | `/api/sales/payments` | as its JSON route | as its JSON route | id, number, date, customer_id, customer, currency, amount*, deposit_account_id, deposit, status, journal_entry_id, memo, created_by, created_at, posted_by, posted_at, cancelled_by, cancelled_at, allocated*, unallocated* |
| payments-out | `/api/purchase/payments` | as its JSON route | as its JSON route | id, number, date, supplier_id, supplier, currency, amount*, paid_from_account_id, paid_from, status, journal_entry_id, memo, created_by, created_at, posted_by, posted_at, cancelled_by, cancelled_at, allocated*, unallocated* |
| customers | `/api/customers` | as its JSON route | as its JSON route | id, code, name, email, phone, address, tax_id, currency, receivable_account_id, receivable_account, payment_terms_days, active, created_at, updated_at |
Expand All @@ -51,7 +52,7 @@ Columns are listed in file order. `*` marks money.
| general-ledger | `/api/reports/general-ledger` | account (required), from, to | reports.read | account_account_id, account_code, account_name, account_type, account_currency, account_is_group, from, to, date, number, entry_id, line_no, memo, debit*, credit*, balance*, currency |
| receivables-ageing | `/api/receivables/ageing` | as its JSON route (asOf, by) | as its JSON route | as_of, by, customer_id, code, name, currency, current*, days_1_to_30*, days_31_to_60*, days_61_to_90*, over_90*, unallocated*, total* |
| payables-ageing | `/api/payables/ageing` | as its JSON route (asOf, by) | as its JSON route | as_of, by, supplier_id, code, name, currency, current*, days_1_to_30*, days_31_to_60*, days_61_to_90*, over_90*, unallocated*, total* |
| stock-balance | `/api/stock/balances` | as its JSON route | as its JSON route | as_of, then the balance row fields |
| stock-balance | `/api/stock/balances` | as its JSON route | as its JSON route | as_of, item_id, item_code, item_name, warehouse_id, warehouse_code, qty_milli (quantity, thousandths) |
| profit-and-loss | `/api/reports/profit-and-loss` | from, to | reports.read | from, to, section (income or expense), account_id, code, name, currency, amount* |
| balance-sheet | `/api/reports/balance-sheet` | asOf | reports.read | as_of, section (asset, liability or equity), account_id, code, name, currency, amount* |

Expand Down
Loading
Loading