diff options
Diffstat (limited to 'docs/STATE.md')
| -rw-r--r-- | docs/STATE.md | 70 |
1 files changed, 43 insertions, 27 deletions
diff --git a/docs/STATE.md b/docs/STATE.md index 4425b10..929ddf1 100644 --- a/docs/STATE.md +++ b/docs/STATE.md @@ -6,34 +6,49 @@ Read with `AGENTS.md` (rules) and `docs/TUI-GUIDELINES.md` (UI conventions). ## Status Working self-hosted bookkeeping system, not production-proven. Backend ledger -core is complete, as are invoicing and the payroll engine; filing/year-end -work and the payroll TUI remain. TUI is usable and exercised by -`make test-pty` (golden screen-text scenarios); `make test` covers the -server/protocol/ledger, the TUI widget unit tests and the docs consistency -check. +core is complete, as are invoicing, the payroll engine and the payroll TUI; +filing/year-end work remains. TUI is usable and exercised by `make test-pty` +(golden screen-text scenarios, now including the payroll run and the +lönebesked); `make test` covers the server/protocol/ledger, the TUI widget +unit tests and the docs consistency check. ## Resume here (2026-09-21) -- **Deployed**: `v0.1.54`, 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`). `main` is ahead of the deployment: - payroll (schema v11), the query helpers and the mail fixes are **not - deployed** yet — deploy before the human tries payroll in the TUI. -- **Next task**: the **Lön** TUI section (wave 3) per `docs/PAYROLL.md` §6: - `Lönekörningar` (list + Ctrl+N), `Anställda` under Register, a - `Skattetabeller` fetch/status action, and the run screen with F5 preview, - Ctrl+Enter post and the manual buttons Bokför, Lönebesked, AGI-underlag, - Betala skatt & avgifter. -- **Follow-ups from the payroll waves**: fold `payroll.settings_get/set` into + 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 - `INVALID_ARGS`); move `invoice.send` to the shared `src/mail.c`; add a pty - scenario for the payslip. -- **Already merged on main since the last deploy**: payroll schema v10/v11 + - employees/tax tables/runs/payslip (`e692f0f`, `4488b6c`), `mail.c` + - `smtp_reply_to` (`e25a8c9`), query helpers `db_row_json`/`req_list`/ - `req_exec` (`b1956aa`), and a Makefile fix that tracks the test binaries' - `.d` files (a stale `smtp_check.o` hung `make test`). + `INVALID_ARGS`); move `invoice.send` to the shared `src/mail.c`. The TUI + has no screen for the payroll account/rate settings yet (they are + defaults and can stay server-side until the fold). +- **Done in the TUI wave**: `clients/screens_payroll.c` with Lönekörningar + (list + Ctrl+N, run screen with F5 preview, Ctrl+Enter post after + confirmation and the action rows Lönebesked, AGI-underlag, Betala skatt & + 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 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 @@ -60,8 +75,9 @@ None open. Completed items that used to be listed here are archived in 11. ~~SIE import only into an empty fiscal year~~ chronological multi-year import works; each year must still target an empty fiscal year. 12. TUI polish: horizontal scrolling in long text fields, bracketed paste. -13. Payroll TUI (wave 3) and the payroll follow-ups listed under "Resume - here"; payroll is server-complete but has no employee registered yet. +13. ~~Payroll TUI (wave 3)~~ done (`clients/screens_payroll.c`); the + remaining payroll follow-ups are listed under "Resume here". No + employee is registered yet in the real orgs. 14. Invoice follow-ups when needed: credit notes (`invoice.credit`), per-row account in the invoice form, kundreskontra view. 15. `make test-pty` speed if it ever exceeds ~60 s: parallelise the @@ -75,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.54`, 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 @@ -165,9 +181,9 @@ Original entries for the struck items are in `docs/DECISIONS.md`. pärm (får refereras i efterhand, även i stängda år). - **Lön (2026-09-21)**: bara ägaren är anställd, men schema och kommandon är fleranvändarklara. Lönemotorn (schema v11: anställda, skattetabeller, - lönekörningar, lönebesked + mejl) är klar server-side; TUI:t saknas och + lönekörningar, lönebesked + mejl) och TUI-sektionen Lön är klara, men **ingen anställd är registrerad än** (personnummer, lön, skattetabell och - kolumn fylls i under Anställda). Konton enligt historiken: + kolumn fylls i under Register → Anställda). Konton enligt historiken: 7210/7510/2710/2731/1630. Skattetabellerna hämtas med en knapp från Skatteverket (varning när året är gammalt), personnumret är krypterat i databasen. Ingen semesteruppbokning; arbetsgivardeklarationen (AGI) görs |
