aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/PROTOCOL.md10
-rw-r--r--docs/SCHEMA.md16
-rw-r--r--docs/STATE.md18
3 files changed, 38 insertions, 6 deletions
diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md
index 6f617fd..7052b83 100644
--- a/docs/PROTOCOL.md
+++ b/docs/PROTOCOL.md
@@ -264,6 +264,8 @@ Arguments are shown abbreviated; `describe` is authoritative.
| `org.member_add` | `org`, `username`, `role` | `{}` |
| `org.member_set_role` | `org`, `username`, `role` | `{}` |
| `org.member_remove` | `org`, `username` | `{}` |
+| `board.list` | — | `items[{id,name,title}]` (årsredovisning signatures) |
+| `board.add` / `board.update` / `board.remove` | `name`,`title?` / `id`,`name?`,`title?` / `id` | owner; audited |
| `user.create` | `username`, `password`, `display_name`, `is_admin?` | `user` (system admin) |
| `user.list` | — | `items[]` (system admin) |
| `token.create` | `label`, `scopes[]`, `org`, `expires_at?` | `token` (shown once), `id` |
@@ -285,10 +287,10 @@ Account `type` is one of `asset`, `liability`, `equity`, `revenue`, `expense`.
| Command | Args | Notes |
|---|---|---|
| `fiscal_year.list` / `fiscal_year.get` | `org?` / `id` | |
-| `fiscal_year.open` | `label`, `start_date`, `end_date` | owner |
+| `fiscal_year.open` | `label`, `start_date`, `end_date` | owner; inherits events/employees/notes from the previous year |
| `fiscal_year.close` | `id`, `confirm:true` | owner; audited |
| `fiscal_year.reopen` | `id`, `confirm:true` | owner; undoes a close |
-| `fiscal_year.update` | `id`, `dividend_ore` | bookkeeper; year metadata (proposed dividend), audited |
+| `fiscal_year.update` | `id`, any of `dividend_ore`, `events`, `agm_date`, `dividend_date`, `employees`, `notes` | bookkeeper; "Information om året", audited |
| `period.lock` | `fiscal_year`, `until`, `reason?` | owner; `until` inclusive |
| `period.unlock` | `fiscal_year`, `reason` | owner; audited with reason |
@@ -480,6 +482,10 @@ commands. Implemented screens (0.1.0-dev):
- **Bokslut** — periodiseringsfond and tax rate fields; F5 shows the posting
plan as a `bokslut.post` dry run, `^Enter` (or F9) asks for confirmation
and posts the plan.
+- **Information om året** — the per-year årsredovisning details (material
+ 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.
- **Företagsuppgifter** — the org record (name, org number, VAT number,
address, e-mail, phone, moms period, framework, fiscal-year start month),
editable in place; only owners can save, others see it read-only.
diff --git a/docs/SCHEMA.md b/docs/SCHEMA.md
index 4fc4397..2100990 100644
--- a/docs/SCHEMA.md
+++ b/docs/SCHEMA.md
@@ -68,6 +68,8 @@ CREATE TABLE orgs (
country TEXT NOT NULL DEFAULT 'SE',
email TEXT,
phone TEXT,
+ description TEXT NOT NULL DEFAULT '', -- verksamhetsbeskrivning
+ shares INTEGER NOT NULL DEFAULT 0,-- antal aktier
fiscal_year_start_month INTEGER NOT NULL DEFAULT 1 CHECK (fiscal_year_start_month BETWEEN 1 AND 12),
moms_period TEXT NOT NULL DEFAULT 'month' CHECK (moms_period IN ('month','quarter','year')),
framework TEXT NOT NULL DEFAULT 'K2' CHECK (framework IN ('K2','K3')),
@@ -86,6 +88,15 @@ CREATE TABLE users (
disabled_at TEXT
) STRICT;
+CREATE TABLE board_members ( -- signatures in the årsredovisning
+ org_id INTEGER NOT NULL REFERENCES orgs(id),
+ id INTEGER PRIMARY KEY,
+ name TEXT NOT NULL,
+ title TEXT NOT NULL, -- "Styrelseledamot", "Ordförande", …
+ created_at TEXT NOT NULL,
+ UNIQUE (org_id, id)
+) STRICT;
+
CREATE TABLE memberships (
org_id INTEGER NOT NULL REFERENCES orgs(id),
user_id INTEGER NOT NULL REFERENCES users(id),
@@ -149,6 +160,11 @@ CREATE TABLE fiscal_years (
status TEXT NOT NULL DEFAULT 'open' CHECK (status IN ('open','closed')),
locked_until TEXT, -- inclusive last locked date
dividend_ore INTEGER NOT NULL DEFAULT 0, -- board's proposed dividend
+ events TEXT NOT NULL DEFAULT '', -- väsentliga händelser (årsredovisning)
+ agm_date TEXT NOT NULL DEFAULT '', -- årsstämmodatum (YYYY-MM-DD)
+ dividend_date TEXT NOT NULL DEFAULT '', -- utbetalningsdatum (YYYY-MM-DD)
+ employees TEXT NOT NULL DEFAULT '', -- medelantal anställda
+ notes TEXT NOT NULL DEFAULT '', -- övriga upplysningar (t.ex. revisor)
created_at TEXT NOT NULL,
closed_at TEXT,
closed_by INTEGER REFERENCES users(id),
diff --git a/docs/STATE.md b/docs/STATE.md
index b0f5b4a..60c70d9 100644
--- a/docs/STATE.md
+++ b/docs/STATE.md
@@ -88,10 +88,20 @@ server/protocol/ledger only.
(`k`).
- K2/SRU is complete: `sru.export` with the INK2 view, `bokslut.post` with
the Bokslut screen, and a K2 årsredovisning text draft with a save action
- in Rapporter. The draft asks for the board's proposed dividend and keeps it
- per fiscal year (`fiscal_year.update`, schema v4); the stämma decision is
- posted with a `Utdelning` template (D 2099/K 2898). Still missing before
- filing: a command/TUI to edit the moms `report_rules` per org (below).
+ in Rapporter. The draft follows the filed reports (whole kronor, no
+ account numbers, säte, förvaltningsberättelse with the org's static
+ verksamhetsbeskrivning, flerårsöversikt and changes-in-equity from the
+ books, resultatdisposition, styrelsens yttrande, fastställelseintyg,
+ board signatures) and needs no prompting: everything comes from the
+ books, the org record (Företagsuppgifter) and the per-year
+ **Information om året** (`fiscal_year.update`, schema v6: events, AGM
+ and payment dates, proposed dividend, employees, notes — inherited from
+ the previous year when a year is opened). Board members are a list per
+ org (`board.*`, edited under Företagsuppgifter) and the stämma decision
+ is posted with a `Utdelning` template (D 2099/K 2898). Imported history
+ years are read with their "Stäng" closings skipped, so comparisons and
+ the flerårsöversikt show real figures. Still missing before filing: a
+ command/TUI to edit the moms `report_rules` per org (below).
- Moms `report_rules` seed is a corrected starter mapping (schema v3), but
there is still no command/TUI to edit rules per org; add one before filing
if the mapping needs adjustments (SCHEMA.md §10 promises owner editing).