summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-19 23:53:09 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-19 23:53:09 +0200
commit1f2d7a8190876e3d1c541251e079a11a2cc637f2 (patch)
tree284427385e9c140dddb0c97df318fc85852fe8e1 /docs
parent86c0ef0e30f6cb24db04f20a326cf5fb4b616c3c (diff)
downloadbokf-1f2d7a8190876e3d1c541251e079a11a2cc637f2.tar.gz
bokf-1f2d7a8190876e3d1c541251e079a11a2cc637f2.zip
tui: bokslut hub with year fields, reports and the posting actionv0.1.43
Diffstat (limited to 'docs')
-rw-r--r--docs/STATE.md21
-rw-r--r--docs/TUI-GUIDELINES.md16
2 files changed, 33 insertions, 4 deletions
diff --git a/docs/STATE.md b/docs/STATE.md
index 5112455..a108a52 100644
--- a/docs/STATE.md
+++ b/docs/STATE.md
@@ -59,10 +59,11 @@ server/protocol/ledger only.
11. **UI keys**: Ctrl+N = add, F5 = refresh, Esc/q = back (never exits),
Ctrl+C = quit, 1–9/g = jump, F7 = clear row in editors, F9 = save.
Shared line editor and date field; see TUI-GUIDELINES.md. The dashboard
- is sectioned (Bokföring / Rapporter & bokslut / Register / Övrigt) with
- non-selectable headers; theme/styles and pager markup live in the widget
- layer (`tui_style`, `tui_markup`). Year-end **Bokslut** and the former
- "Information om året" are one screen (`yearinfo` is an alias).
+ is sectioned (Bokföring / Rapporter & bokslut / Register / Räkenskapsår
+ / Övrigt) with non-selectable headers; theme/styles and pager markup
+ live in the widget layer (`tui_style`, `tui_markup`). Year-end
+ **Bokslut** and the former "Information om året" are one screen
+ (`yearinfo` is an alias).
12. **Login**: two steps — credentials, then org picker ("Välj organisation
att representera"). No org switch in the dashboard; fiscal year switch is
on the dashboard. `--org ID` bypasses the picker.
@@ -89,6 +90,18 @@ server/protocol/ledger only.
20/21, reverse-charge output VAT 2614/2624/2634 in 30/31/32, and box 48
signed negative. Rules may share a box and are summed; box 49 is the sum
of the moms boxes only. v3 migrates existing databases.
+17. **Year-end hub and menu IA (2026-09-19)**: the forms widget layer gained
+ an action list (`tui_form_run_actions`; fields and actions in one focus
+ ring, `TUI_FORM_ACTION + i` for a chosen action, dimmed-but-selectable
+ rows with a `disabled_reason`, `-1` heading/status rows). The **Bokslut**
+ screen is the year-end hub: the eight year fields, the derived status
+ row `Bokslut bokfört: ja/nej` (`voucher.list` with
+ `text:"Skatt på årets resultat"`; a closed year counts as posted) and
+ the actions Årsredovisning (K2), Inkomstdeklaration (INK2/SRU),
+ Bokslutsplan (torrkörning) and Bokför bokslut (dimmed with a reason on a
+ closed or already posted year). Årsredovisning and INK2/SRU left the
+ Rapporter menu, and Ingående balans moved from Bokföring to the
+ dashboard's Räkenskapsår section next to Räkenskapsår.
## Pending decisions
diff --git a/docs/TUI-GUIDELINES.md b/docs/TUI-GUIDELINES.md
index decca09..3bed983 100644
--- a/docs/TUI-GUIDELINES.md
+++ b/docs/TUI-GUIDELINES.md
@@ -97,6 +97,22 @@ written compactly as `^N`, `^A`, `^C`, `^R` to save width.
changing anything. Typing a printable character hands the focus to the
first table cell and inserts it there, so rows can be entered without
touching the header. `F5`/`Ctrl+Enter`/`Esc` work the same from both.
+- A form may carry an action list under its fields (`tui_form_run_actions`):
+ fields first, then action rows, one focus ring (`Tab`/`Shift-Tab`/
+ up/down, `Home`/`End`; the ring wraps and heading rows are skipped).
+ `enabled: 1` runs on `Enter`; `0` is dimmed but selectable and shown as
+ `label (reason)`, `Enter` shows the reason in a message; `-1` is a dim
+ non-selectable heading/status row like a menu section. The call returns
+ the field index after an edit, `TUI_FORM_ACTION + i` for a chosen action,
+ or `TUI_FORM_BACK`/`REFRESH`/`SUBMIT`; `tui_form_hint()` overrides the
+ footer of the next run as usual.
+- `Bokslut` is the year-end hub in one view: the year fields, the status
+ heading `Bokslut bokfört: ja/nej` (derived from the `Skatt på årets
+ resultat` voucher that `bokslut.post` creates; a closed year counts as
+ posted) and the actions Årsredovisning (K2), Inkomstdeklaration
+ (INK2/SRU), Bokslutsplan (torrkörning) and Bokför bokslut — the last
+ dimmed with a reason when the year is closed or already posted. `F5`
+ shows the plan, `Ctrl+Enter` posts it.
- Validation: `F5` validates without writing and reports exactly what is wrong
(field, row number). Server `dry_run` is used where available.
- Saving: `Ctrl+Enter` writes, shows a confirmation message, and returns to