aboutsummaryrefslogtreecommitdiff
path: root/docs/STATE.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/STATE.md')
-rw-r--r--docs/STATE.md56
1 files changed, 42 insertions, 14 deletions
diff --git a/docs/STATE.md b/docs/STATE.md
index 6af717b..b08471a 100644
--- a/docs/STATE.md
+++ b/docs/STATE.md
@@ -12,7 +12,7 @@ filing/year-end work remains. TUI is usable and exercised by `make test-pty`
lönebesked); `make test` covers the server/protocol/ledger, the TUI widget
unit tests and the docs consistency check.
-## Resume here (2026-09-21)
+## Resume here (2026-09-22)
- **Deployed**: `v0.1.62`, healthy on `nas` (Alpine runtime, static aarch64
binaries cross-compiled on this machine — ~20 s, the host only assembles
@@ -36,6 +36,18 @@ unit tests and the docs consistency check.
startup and v11 → v12 on the v0.1.62 startup, each with the automatic
pre-migration snapshot in `var/db/backup/`. `main` and the tags are pushed
to `nas`.
+- **Invoices (2026-09-22)**: the follow-ups are done and deployed in
+ `v0.1.62` — free-text rows, `u = duplicera`, `b = kvittera betalning`
+ (`invoice.pay`, strict receivable check) and `smtp_from` address
+ validation. `test_core` has `invoice_extras`; the pty suite has
+ `invoice-duplicate` and `invoice-pay`. Remaining invoice work is in the
+ backlog (credit notes, per-row account, kundreskontra, partial payments).
+- **Mail configuration**: Makandra AB (org 2) has **no** `smtp_*` settings
+ in bokf, so `invoice.send` there is `SMTP_NOT_CONFIGURED` (fine if
+ invoices are sent elsewhere — set them up when wanted). Mock AB (org 1)
+ has host/port/user/password but its stored `smtp_from` is the name
+ "Anders Bergsten": change it to an e-mail address in **Bolaget → E-post
+ (SMTP)** before sending; the new validation refuses names on save.
- **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
@@ -45,7 +57,7 @@ unit tests and the docs consistency check.
- **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
+ avgifter), Anställda under Bolaget 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
@@ -88,8 +100,10 @@ None open. Completed items that used to be listed here are archived in
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.
+14. ~~Invoice text rows, duplicate and payment registration~~ done in
+ `v0.1.62` (schema v12). Remaining invoice follow-ups when needed:
+ credit notes (`invoice.credit`), per-row account in the invoice form,
+ kundreskontra view, partial payments.
15. `make test-pty` speed if it ever exceeds ~60 s: parallelise the
independent scenarios (each has its own rig) and add `--only` symmetry;
measure first.
@@ -161,24 +175,34 @@ Original entries for the struck items are in `docs/DECISIONS.md`.
- Never commit unless the human asks.
- SQLite files must not be backed up live with restic; use
`backup.snapshot` (`VACUUM INTO`) and point restic at the snapshots.
-- Schema version is 11 (v3 moms rules; v4/v6 year info; v5 org
+- Schema version is 12 (v3 moms rules; v4/v6 year info; v5 org
description/shares + board members; v7 attachments append-only triggers;
v8 bank reconciliation; v9 invoicing + widened `vouchers.source` with a
table rebuild; v10 payroll + `payroll`/`payroll_tax` sources, same
- rebuild; v11 `employees.email`); forward migrations are in `db.c`.
+ rebuild; v11 `employees.email`; v12 `invoice_rows.is_text` and
+ `invoices.paid_date`/`payment_voucher_id`); forward migrations are in
+ `db.c`.
## Makandra driftstatus (org 2)
- **Org**: Makandra AB, org 2. Räkenskapsår (id): 2022=3, 2023=4, 2024=5,
2025=6, 2026=7, **2027=2 (öppet, aktuellt)**. Bokslut/AR/deklaration görs
för det år som är valt i sessionen.
-- **FK2027**: importerade Kapitas-böcker + 28 bokförda verifikat (V21–V48)
- för bank/skatt maj–sep 2026, samt V49 som makulerar en dubblett (V20).
- 1930 stämmer mot banken utom **CDON 2 409 kr** (väntar på kvittots del
- 2–4; bokförs när det kommer). 1630 = 40 721 (exakt enligt Skatteverket).
-- **Underlag**: 279 attachment i org 2 (alla historikdokument + insamlade
- underlag). Bank-/SKV-utdrag ligger i `~/Makandra AB/{bank,skatteverket}`
- (Syncthing), källkorpus i `~/Downloads/Makandra AB-…/Bokföring/`.
+- **FK2027**: importerade Kapitas-böcker + 30 bokförda verifikat (V21–V50)
+ för bank/skatt maj–sep 2026: V49 makulerar en dubblett (V20) och V50 är
+ Hetzner-förskottet (nedan). 1930 stämmer mot banken utom **CDON
+ 2 409 kr** (väntar på kvittots del 2–4; bokförs när det kommer) och
+ Hetzner-kortköpet 2026-09-21 som ännu inte är importerat. 1630 = 40 721
+ (exakt enligt Skatteverket).
+- **Hetzner-förskott (2026-09-22)**: V50, datum 2026-09-21 (bankens
+ bokföringsdatum), "Förskott Hetzner 100 EUR": **D 1790** 1 156,39 /
+ **K 1930** 1 156,39, med båda PDF:erna som underlag. Matchas mot banken
+ när nästa SEB-fil (efter 2026-09-18) importeras. Förbrukningen bokförs
+ när Hetzner-fakturorna kommer (se reglerna nedan).
+- **Underlag**: 309 attachment i org 2 (alla historikdokument + insamlade
+ underlag, inkl. de två Hetzner-PDF:erna). Bank-/SKV-utdrag ligger i
+ `~/Makandra AB/{bank,skatteverket}` (Syncthing), källkorpus i
+ `~/Downloads/Makandra AB-…/Bokföring/`.
- **Stängning**: 2022–2026 ska stängas av ägaren via **Räkenskapsår** i
TUI:n; låt FK2027 vara öppen till nästa bokslut.
- **Deklaration**: FK2026 är deklarerad av revisorn. FK2027 deklareras
@@ -192,7 +216,11 @@ Original entries for the struck items are in `docs/DECISIONS.md`.
historikårens P&L nettar noll pga källsystemets stängningar (AR hoppar
över "Stäng"-verifikat i flerårsöversikten); utdelning bokförs vid stämman
med mallen **Utdelning** (D 2099/K 2898); pappersoriginal finns i fysisk
- pärm (får refereras i efterhand, även i stängda år).
+ pärm (får refereras i efterhand, även i stängda år); leverantörsförskott
+ och förbrukningssaldo (Hetzner) bokförs som **D 1790/K 1930** vid
+ påfyllning och **D 6540 + D 2645 / K 2614 / K 1790** vid förbrukning;
+ kortköp bokförs på **bankens bokföringsdatum** (lättare att härleda och
+ matcha vid import).
- **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) och TUI-sektionen Lön är klara, men