diff options
Diffstat (limited to 'docs/DECISIONS.md')
| -rw-r--r-- | docs/DECISIONS.md | 70 |
1 files changed, 68 insertions, 2 deletions
diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index a108f48..5499610 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -201,7 +201,65 @@ kept verbatim from the STATE.md they were pruned from (2026-09-21). employed now but everything is multi-employee; no semester accrual; tax tables from day one; manual step-buttons (Bokför, Lönebesked, AGI-underlag, Betala skatt & avgifter); bank phase 3 (`bank_rule.*`) is - dropped. + dropped. +25. **Per-feature voucher series (2026-09-21)**: the single standardserie + setting is replaced by one setting per feature that posts vouchers: + `series_voucher` (manual vouchers and new templates, default `A`, + falling back to the legacy `default_series`), `series_invoice` (`F`), + `series_payroll` (`L`), `series_bokslut` (`Å`) and `series_ib` (`IB`). + All are editable (Bolaget → Verifikationsserier), 1–8 characters with + no control characters. The manual voucher form remembers the last + series it posted as `series_voucher`. Reports and SIE treat both the + configured `series_ib` and the historical `IB` series as ingående + balans, so old books keep working. "Nästa fakturanummer" is editable + in Bolaget → Fakturauppgifter (owner only). +26. **Invoicing follow-ups (2026-09-21)**: schema v12 adds + `invoice_rows.is_text` and `invoices.paid_date`/`payment_voucher_id`. + Invoices accept **text rows** (`"text": true`): description only, no + amount, excluded from totals and the posting voucher; at least one + priced row is required. The invoice detail gets `u = duplicera` (same + customer, rows and references, dates reset to today, due = today + + payment days) and `b = kvittera betalning`, which prefills the ordinary + voucher form (D `bank_account`, K `invoice_receivable_account`, both + editable, underlag attachable) and, after posting, calls + `invoice.pay`, which requires the voucher to credit the receivable with + exactly the invoice total. Partial payments are out of scope. Lists + show `betald <datum>`. SMTP: `smtp_from`/`smtp_reply_to` are validated + as e-mail addresses (settings.set and mail config), with the sender's + display name taken from the org name. +27. **Document header (2026-09-22)**: the invoice header bar no longer + draws the `MAKANDRA AB` Comfortaa outline; it prints the organization + name (`orgs.name`) in Helvetica-Bold, scaled down and truncated with + `...` if it would reach the `FAKTURA` wordmark, which stays. The shared + setting `document_header_color` (`#rrggbb`, default `#314c59`) colours + the header bar of **every** generated document — currently the invoice + and the lönebesked; `settings.set` refuses other values and the + renderers fall back to the default if a stored value is invalid. The + lönebesked prints the employer name in its header too, so the + `MAKANDRA AB` outlines are unused at runtime (kept in the generated + header). Images remain out of scope. +28. **TUI interaction model (2026-09-22, design)**: settled in the UX + session; the spec is `TUI-GUIDELINES.md` "Interaction model" and is not + implemented yet. Two focus modes: the navigation keys (`Tab`, arrows, + `Home`/`End`, `PgUp`/`PgDn`) only move focus/selection/scroll and never + mutate data, while an active field keeps caret semantics. `Enter` + activates the focused item only when it owns an action (menu item, + action row, opening list row); a plain report has none, so `Enter` does + nothing there — it never saves a whole form, deletes or posts. Entities + have one of three lifecycles: **register** (explicit `Spara` after + validation; drafts live in memory and in + `$XDG_CACHE_HOME/bokf/drafts.json`, marked `<UTKAST>`, deletable from + the list and from the editor), **document** (the form is the draft, + explicit post, immutable) and **settings** (explicit `Spara`; the + per-field autosave is dropped). Every savable form ends with a `Spara` + (or `Posta`) action row; commit is blocked while invalid and a server + error keeps the draft. Screens declare actions in one ordered + `struct tui_action` list that drives the `F2` menu, the accelerator keys + and the footer hints; `F2` only, no `§`; `Ctrl+Enter` is dropped as a + commit key (`F9` and the save action row remain). **Kunder pilot + implemented 2026-09-22** (`clients/drafts.[ch]`, `<UTKAST>`, the `Spara` + row, the `F2` menu, delete from list and editor); the other screens + follow. ## Completed work formerly listed under "Pending decisions" @@ -275,7 +333,15 @@ kept verbatim from the STATE.md they were pruned from (2026-09-21). statement (Kapitas 2022-2026). **Decided 2026-09-19: no importer change.** Locked years stay locked and the source's closings stay in the books; the årsredovisning export flags incomplete jämförelsetal for those years and - points to the previous year's annual report. + points to the previous year's annual report. **Amended 2026-09-22**: the + income statement (and therefore INK2/SRU and the TUI resultatrapport) now + skips the same "Stäng ..." vouchers when they are SIE-imported, so a year + being declared shows its real figures; the balance sheet keeps them (the + result sits in 2099 and must not be counted twice). The source's own + #IB/#UB corrections that the vouchers do not reproduce (e.g. Makandra's FY + 2022/2023 result transfer is 17 857.63 kr short of that year's P&L) remain + a data divergence: the derived balance sheet is off by that amount until a + correction is booked in the current year. 11. ~~SIE import only into an empty fiscal year; consider broader import.~~ Chronological multi-year import works (CRLF, `#RAR 0`, zero rows, `#IB` rule handled); each year must still target an empty fiscal year. Note: |
