aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/PAYROLL.md6
-rw-r--r--docs/PROTOCOL.md33
-rw-r--r--docs/STATE.md37
-rw-r--r--docs/TUI-GUIDELINES.md14
4 files changed, 53 insertions, 37 deletions
diff --git a/docs/PAYROLL.md b/docs/PAYROLL.md
index 23e7fb1..b78aeba 100644
--- a/docs/PAYROLL.md
+++ b/docs/PAYROLL.md
@@ -228,9 +228,9 @@ the base is the gross.
`SMTP_FAILED` (the stored attachment stays linked). `dry_run` validates,
renders and stores nothing. See `PROTOCOL.md` §7.12.
- **TUI — Lön** (done, `clients/screens_payroll.c`): `Lönekörningar` (list,
- Ctrl+N for a new run) under Lön, `Anställda` under Företag, and a
- **Skattetabeller** screen (System, since the tables are national) with
- status, the Skatteverket fetch and the offline file import.
+ Ctrl+N for a new run) under Lön, `Anställda` under Bolaget, and a
+ **Skattetabeller** screen (via System, since the tables are national)
+ with status, the Skatteverket fetch and the offline file import.
- The run screen shows the preview (F5), posts with Ctrl+Enter after
confirmation, then offers the buttons **Lönebesked** (saves/opens the
PDF), **AGI-underlag** (`payroll.agi` in a pager, owner only) and
diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md
index 01f5dd1..76197d9 100644
--- a/docs/PROTOCOL.md
+++ b/docs/PROTOCOL.md
@@ -378,8 +378,9 @@ resolved rows in a dry run.
`default_series` (1–8 characters, e.g. `A`, `V-`, `A `) is used when
`voucher.post` carries no `series` and as the default series for new
-templates. `attachment_dir` (a path, up to 255 characters) is the folder the
-TUI file browser opens in when attaching underlag. `bank_account` (digits
+templates. `attachment_dir` (a path, up to 255 characters) is accepted for
+compatibility, but the TUI file browser now remembers the directory of the
+last picked attachment client-side. `bank_account` (digits
only, up to 10 characters, default `1930`) is the account `bank.import` uses
when the request carries no `account`. `invoice_receivable_account` (default
`1510`) and `invoice_revenue_account` (default `3001`) are the receivable and
@@ -941,8 +942,8 @@ commands. Implemented screens (0.1.0-dev):
tax table/column, e-mail). Ctrl+N creates, Enter edits (an empty
personnummer keeps the stored one), `d` archives/reactivates; F5
validates with a dry run and Ctrl+Enter saves.
-- **Skattetabeller** (System) — stored tax table years, the current year's
- status, fetch time and source. Owners fetch Skatteverket's official
+- **Skattetabeller** (via **System**) — stored tax table years, the current
+ year's status, fetch time and source. Owners fetch Skatteverket's official
monthly table (`payroll.tax_tables_fetch`) or import a file offline
(`payroll.tax_tables_import`).
- **Rapporter** — saldobalans, resultaträkning, balansräkning, moms,
@@ -959,16 +960,20 @@ commands. Implemented screens (0.1.0-dev):
events, AGM and payment dates, proposed dividend, employees, other notes),
edited per field; a new fiscal year inherits the stable fields. The
årsredovisning draft reads them without prompting.
-- **Bolaget** — the org record (name, org number, VAT number, address,
- e-mail, phone, moms period, framework, fiscal-year start month), editable
- in place by owners; others see it read-only. The sub-forms
- **Fakturauppgifter…** (standardserie, fordringskonto, intäktskonto,
- bankgiro, vår referens) and **E-post (SMTP)…** (host, port, user, sender,
- reply-to, security, password) are `settings.set` and open to bookkeepers,
- and **Styrelseledamöter** lists the board.
-- **Systeminställningar** (System) — bilagornas mapp, the file browser's
- start directory.
-- **Revision** (System) — chain verification and behandlingshistorik.
+- **Bolaget** — the dashboard's hub for the org's master data:
+ **Företagsuppgifter** (name, org number, VAT number, address, e-mail,
+ phone, moms period, framework, fiscal-year start month), editable in
+ place by owners, others see it read-only; **Fakturauppgifter**
+ (standardserie, fordringskonto, intäktskonto, bankgiro, vår referens) and
+ **E-post (SMTP)** (host, port, user, sender, reply-to, security,
+ password), both `settings.set` and open to bookkeepers;
+ **Styrelseledamöter**; and the registers **Anställda**, **Kunder** and
+ **Momsregler**.
+- **System** — the hub with **Skattetabeller** and **Revision**. The file
+ browser starts in the directory of the last picked attachment (remembered
+ in the client's `tui.conf`) and falls back to `$HOME` when it is gone.
+- **Revision** (via **System**) — chain verification and
+ behandlingshistorik.
**Ctrl+N is the universal "add" key**: it starts a new verifikat from the
dashboard, the voucher list and the voucher detail view; a new mall from the
diff --git a/docs/STATE.md b/docs/STATE.md
index bd38963..929ddf1 100644
--- a/docs/STATE.md
+++ b/docs/STATE.md
@@ -14,13 +14,19 @@ unit tests and the docs consistency check.
## Resume here (2026-09-21)
-- **Deployed**: `v0.1.55`, healthy on `nas` (Alpine runtime, static aarch64
+- **Deployed**: `v0.1.59`, healthy on `nas` (Alpine runtime, static aarch64
binaries cross-compiled on this machine — ~20 s, the host only assembles
- the image; image 33.7 MB, no `libssl3`). It brings the payroll server
- waves (schema v11: employees, tax tables, lönebesked) and the payroll
- TUI with the Företag/System menu; the live database migrated v9 → v11 on
- startup with the automatic pre-migration snapshot in `var/db/backup/`.
- `main` and the tag `v0.1.55` are pushed to `nas`.
+ the image; image 33.7 MB, no `libssl3`). `v0.1.55` brought the payroll
+ server waves (schema v11: employees, tax tables, lönebesked) and the
+ payroll TUI; `v0.1.56` the **Bolaget** hub; `v0.1.57` the flat main menu
+ without section headings, the **System** hub (Skattetabeller, Revision)
+ and the client-side remembered attachment directory; `v0.1.58` loads the
+ system CA bundle explicitly so the static binaries can verify TLS (the
+ Skatteverket fetch, SMTP, static clients); `v0.1.59` fixes form saving on
+ modern terminals (modifyOtherKeys level 2, Kitty keyboard protocol, and
+ `^Enter/F9` in the hints). The live database migrated v9 → v11 on the
+ v0.1.55 startup with the automatic pre-migration snapshot in
+ `var/db/backup/`. `main` and the tags are pushed to `nas`.
- **Next tasks (payroll follow-ups)**: fold `payroll.settings_get/set` into
`settings.get/set` (cmd_settings.c was busy during wave 1); settle the
over-80k % rule (SKV 433 leaves it ambiguous — currently a clear
@@ -33,13 +39,16 @@ unit tests and the docs consistency check.
avgifter), Anställda under Företag and the Skattetabeller
fetch/import/status screen under System. A pty scenario posts a run and
fetches its lönebesked, so the payslip PDF path is exercised end to end.
-- **Menu (2026-09-21)**: the dashboard has the sections Bokföring (with
- Mallar), Fakturering, Lön, Rapporter & bokslut, Företag (Anställda,
- Kunder, Bolaget, Momsregler) and System (Skattetabeller, Revision,
- Systeminställningar). Inställningar is gone: standardserie,
- fordrings-/intäktskonto, bankgiro, vår referens and SMTP now live under
- Bolaget (the Fakturauppgifter and E-post sub-forms) and bilagornas mapp
- under System. `--screen settings` remains an alias for Bolaget.
+- **Menu (2026-09-21)**: the dashboard is one flat list without section
+ headings: Verifikat, Underlag, Bankavstämning, Mallar, Fakturor,
+ Lönekörningar, Rapporter, Bokslut, Bolaget, System, Ingående balans,
+ Räkenskapsår, Logga ut. **Bolaget** is the master-data hub
+ (Företagsuppgifter, Fakturauppgifter, E-post (SMTP), Styrelseledamöter
+ and the registers Anställda, Kunder, Momsregler); **System** holds
+ Skattetabeller and Revision. Inställningar is gone, and bilagornas mapp
+ is no longer a setting: the file browser remembers the last pick
+ directory in `tui.conf` and falls back to `$HOME`. `--screen settings`
+ remains an alias for Bolaget.
## Open decisions
@@ -82,7 +91,7 @@ Original entries for the struck items are in `docs/DECISIONS.md`.
## Environment / how to run
-- **Deployed**: `scripts/deploy.sh` (latest `v0.1.55`, healthy on nas).
+- **Deployed**: `scripts/deploy.sh` (latest `v0.1.59`, healthy on nas).
Live daemon `tls:bokf.makandra.eu:8788`, token
`~/.config/bokf/migration-token` (scopes `read,write`; owner-only actions
like closing years must be done by the human in the TUI). Git remote
diff --git a/docs/TUI-GUIDELINES.md b/docs/TUI-GUIDELINES.md
index 7e0d404..190a5c5 100644
--- a/docs/TUI-GUIDELINES.md
+++ b/docs/TUI-GUIDELINES.md
@@ -33,7 +33,7 @@ there.
| `Ctrl+F` | Attach a file via the file browser (voucher form and voucher detail) |
| `k` | Underlag: link the highlighted attachment to a voucher picked from a list |
| `Ctrl+X` | Clear the current row — only inside row editors (never "new") |
-| `Ctrl+Enter` | Save/post the current form. Enabled via xterm `modifyOtherKeys`; terminals that cannot send it keep `F9` working |
+| `Ctrl+Enter` | Save/post the current form. Enabled via xterm `modifyOtherKeys` level 2 or the Kitty keyboard protocol; terminals that send neither keep `F9` working, and the hints show `^Enter/F9` |
Every screen prints its keys in the footer via `hints()`. If a key exists, the
footer shows it; if the footer shows it, the key works. Control keys are
@@ -135,11 +135,13 @@ written compactly as `^N`, `^A`, `^C`, `^R` to save width.
`BACK`, `REFRESH` or `SUBMIT` (the widget returns as on `Esc`/`F5`/
`Ctrl+Enter`). Hooks exist on `tui_form_run_hook`, `tui_rt_set_key`,
`tui_pager_hook` and `tui_select_list_hook`.
-- File browser (`file_browser`): starts in the org's `attachment_dir` (or
- `$HOME`; a leading `~` is expanded to `$HOME`), `.. (uppåt)` is the first row, directories sort first with a
- trailing `/`, hidden files are skipped. Enter enters a directory or picks a
- file; `Esc` cancels. Selected files are uploaded immediately as unlinked
- underlag and linked when the voucher is posted.
+- File browser (`file_browser`): starts in the directory where the last
+ attachment was picked (remembered in `tui.conf`), falling back to `$HOME`
+ when it is gone (a leading `~` is expanded to `$HOME`), `.. (uppåt)` is
+ the first row, directories sort first with a trailing `/`, hidden files
+ are skipped. Enter enters a directory or picks a file; `Esc` cancels.
+ Picking a file remembers its directory. Selected files are uploaded
+ immediately as unlinked underlag and linked when the voucher is posted.
## Messages