aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
3 daysbokslut, INK2/SRU export and attachment markersv0.1.30Anders Betts
- bokslut.post: year-end bookings (manual entries, periodiseringsfond, skatt at a given rate, resultatdisposition) with a dry-run plan through the normal ledger path; the resultatrapport separates bokslutsdispositioner and skatt per K2. - sru.export: INFO.SRU + BLANKETTER.SRU (INK2/INK2R/INK2S) from the official 2025P4 field tables and the BAS mapping, with manual INK2S adjustments, submitter defaults and unmapped-account detection; the TUI writes both files from Rapporter -> Inkomstdeklaration. - voucher.list carries attachment_count and the voucher list marks vouchers with underlag with an x column. - date_prompt restores the cursor state so it stops blinking at the bottom after the report date prompts.
3 daysattachments: link/unlink from the TUI, multi-voucher linksv0.1.29Anders Betts
The voucher detail can attach a file to an existing voucher (^F) and the underlag picker (f) can remove a link (d, confirmed). The Underlag inbox links a highlighted item to a voucher picked from a list (k). attachment.link and attachment.unlink are new write commands (dry-run, audited); unlinked files return to the inbox. The same content may now link to several vouchers — only the same voucher/attachment pair is a CONFLICT, matching the table's primary key.
3 dayseskd: generate the momsdeklaration file (eSKDUpload 6.0)v0.1.28Anders Betts
report.vat_eskd builds the ISO-8859-1 XML from report.vat: whole kronor with öre truncated like the blankett, box 48 positive as filed, MomsBetala computed from the whole-krona boxes, and an optional upplysning converted from UTF-8, XML-escaped and capped at 300 characters. The TUI momsrapport gains "s = spara eSKD", prompting for a path and writing the bytes verbatim. Verified against the FY2027 Kapitas report: 05=703200, 10=175800, 20=1453, 30=851, 48=1030, 49=175621.
3 daysbokftui: align report columns when labels contain å/ä/öAnders Betts
printf widths count bytes, so Swedish labels shifted every following column by one per multi-byte character: Huvudbok's Ingående/Omslutning/ Utgående saldo lines, moms ruta 48/49, and the Resultatrapport, Saldobalans and Verifikationslista headers no longer lined up with their rows. pad_min() pads to display columns without truncating long moms labels and pad_hdr() right-aligns headers; the Ingående balans/saldo amounts now sit in the far-right Saldo column like the Kapitas export.
3 daysbokftui: Huvudbok/Verifikationslista views, Räkenskapsår screen, ^Enter/^Xv0.1.27Anders Betts
The report menu gains Kapitas-style Huvudbok and Verifikationslista tables. "Byt räkenskapsår" is now "Räkenskapsår": the list shows öppen/stängd and ^A closes or reopens the highlighted year (via the new fiscal_year.reopen). Menus remember the selection, Mallar opens straight into the list (Enter edit, ^N new, d arkivera), report tables get column rules and aligned sums, and text_view clears stale lines. Footer hints write control keys as ^N/^A/^C/^R/^X, ^Enter saves or posts a form and ^X clears the focused row (F9 still works as a fallback).
3 daysreports: huvudbok and verifikationslista; fiscal_year.reopenAnders Betts
report.general_ledger lists every account with activity or IB, its postings in date order with a running saldo, and Omslutning/Utgående saldo; accounts?/from?/to? narrow it. report.voucher_list lists the year's vouchers with rows and totals, with an optional series filter. fiscal_year.reopen undoes a close (owner-only, confirm:true, audited) so the Räkenskapsår screen can toggle the status.
3 daysreports: Kapitas-style TUI tables, corrected moms rules (schema v3)v0.1.26Anders Betts
The report views dumped JSON; they now render Saldobalans, Resultatrapport (previous-year column, 89xx bokfört/ej bokfört), Balansrapport (Ing balans/Ing saldo/Period/Utg balans, Beräknat resultat) and Momsrapport ruta för ruta, with Swedish amount formatting (1 234,56). The moms starter rules missed 33xx sales, sent reverse-charge VAT 2614 to box 10 instead of 30 and had box 48 positive. Rules may now share a box and report.vat sums them; box 49 is the sum of the moms boxes only. Schema v3 replaces the rules for existing orgs. Verified on a copy of the live DB: 05=703 200, 10=175 800, 20=1 453, 30=851, 48=-1 030, 49=175 621, matching the Kapitas 2027 export. Ctrl+R reload passes --socket and auto-login no longer rewrites tui.conf; pty tests now run through scripts/tui-sandbox.sh so they cannot touch the real config, cache or bw session.
3 daysscripts: bokftui-bw exports the item's login usernameAnders Betts
Password-kind items only exported BOKFD_PASSWORD, so the TUI fell back to the username saved in tui.conf (admin) and failed with AUTH_FAILED when switching accounts. The item's login username now wins unless the caller set BOKFD_USER explicitly.
3 daysscripts: bokftui-bw syncs and matches item name or login userAnders Betts
The bw CLI cache could be stale, so a newly created item was invisible. Sync before listing, match the query against both the item name and the login username (exact first), show 'name (user)' in the picker and fetch the secret by item id.
3 daysscripts: bokftui-bw item selection (argument or picker)Anders Betts
3 daysbokftui: drop the redundant fiscal-year label from the status linev0.1.25Anders Betts
3 daysbokftui: Ctrl+R actually reloads (dashboard ignored the flag)v0.1.24Anders Betts
ui_getch mapped Ctrl+R to Esc, but the dashboard treats Esc as a no-op and looped, so do_reload was never reached; from sub-screens the key merely bounced back to the dashboard. Dashboard and the early screens now honour the flag. Verified by observing the re-exec and session reuse in ~/.cache/bokf/tui.log.
3 daysbokftui: fix self-copy that emptied the username on password loginv0.1.23Anders Betts
try_login is called with a->username as the user; snprintf with overlapping source and destination is undefined and produced "" on glibc, so config_save wrote 'user=' and later reloads could not auto-login. Copy through a temporary, carry BOKFD_USER on reload and never persist an empty user.
3 daysbokftui: pad user text by display width in list columnsv0.1.22Anders Betts
Template names, org names, filenames and the account-list type column were padded with byte widths, so Swedish characters broke the alignment.
3 daysbokftui: retry auto-login for 60s on reload, log and show the reasonv0.1.21Anders Betts
- whole chain (session, token, password) is retried while the server is unreachable, with an on-screen counter - the adopted connection is taken over instead of reconnecting - failures show the server error in a box and append to ~/.cache/bokf/tui.log for later diagnosis
3 daysbokftui: caret follows field_pos in header fields (template/voucher forms)v0.1.20Anders Betts
Namn/Serie/Text (and the voucher date) drew the caret at the end of the string; editing worked but the cursor never appeared to move.
3 daysbokftui: wait for the server before auto-login (reload during deploy)v0.1.19Anders Betts
3 daysbokftui: PgUp/PgDn clamp to the first/last row in listsv0.1.18Anders Betts
select_list refused to move when fewer than a full page remained; menu already clamped. Matches the menu behaviour now.
3 daysbokftui: recover from expired sessions; carry the password across Ctrl+Rv0.1.17Anders Betts
- stale BOKFD_SESSION falls back to token/password auto-login and shows a message before the login screen when neither is available - the password typed this session is handed to the re-exec'd process
3 daysbokfd: re-exec via PATH so a bare argv[0] works; faster healthcheckv0.1.16Anders Betts
3 daysbuild: declare VERSION after the apt layers so the cache survivesv0.1.15Anders Betts
3 daysdeploy: --dev hot-reloads the daemon via docker cp + SIGHUPv0.1.14Anders Betts
- bokfd re-execs its own binary on SIGHUP, closing listeners/db first - scripts/deploy.sh --dev cross-builds and copies binaries into the running container, then verifies the reported version
3 daysdeploy: cross-compile arm64 binaries on the dev machinev0.1.13Anders Betts
The target only assembles the image from prebuilt binaries, so redeploys no longer compile sqlite/argon2 on the NAS. New deploy/Dockerfile.cross provides the gcc-aarch64-linux-gnu toolchain; the Dockerfile uses .prebuilt/ when present.
3 daysShow tui and server versions in the status line; derive version from gitv0.1.12Anders Betts
- build: VERSION defaults to git describe, deploy passes the tag via --build-arg - bokftui: srv version from meta, right-aligned next to the status line
3 daysbokftui: IB view shows effective opening balances, edits post deltas to themv0.1.11Anders Betts
Was listing the IB voucher's rows (the reconciliation deltas) and computing edits against those, which mismatched reports on years with carry-forward and could not set a target balance. Also guard the editor against more than 63 rows.
3 daysbokftui: fix heap overflow in ib_load (rows vs vouchers)v0.1.10Anders Betts
The IB list arrays were sized by voucher count but appended per row; a single IB voucher with more than one row overwrote the heap and crashed after leaving the view. Grow the arrays dynamically.
3 daysbokftui: sum the whole IB voucher, not only the visible rowsv0.1.9Anders Betts
3 daysbokftui: Ctrl+R reloads the binary and restores session, year and viewv0.1.8Anders Betts
3 daysbokftui: Företagsuppgifter screen; org.update dry-runv0.1.7Anders Betts
- owner-editable company details form (read-only for other roles) - org.update honors dry_run; covered in tests
4 dayssie: import CRLF, #RAR 0, zero rows; skip #IB with prior historyv0.1.6Anders Betts
- tokenizer treats CR as whitespace; closing brace matches with CRLF - only #RAR with year indicator 0 selects the fiscal year - zero-amount #TRANS rows are dropped instead of violating the schema - #IB becomes an IB voucher only when the year has no earlier history
4 daysImplement org.update (owner) and cover it in testsv0.1.5Anders Betts
4 daysscripts: probe and set the Node Web Crypto flag for bwAnders Betts
4 daysscripts: replace sudo credential wrapper with a Bitwarden launcherAnders Betts
brw/bw lookup in user space; optional token via custom field
4 daysbokftui: remember server/user, BOKFD_TOKEN auto-login, sudo credential launcherv0.1.4Anders Betts
4 daysdocs: export backup token before docker compose execAnders Betts
4 daysAdd token login to bokfctl and enforce admin scope for tokensv0.1.3Anders Betts
- bokfctl: --token / BOKFD_TOKEN via client_token_login - tokens must carry the admin scope for admin commands (was bypassed) - docs: token-based snapshot for restic backups
4 dayscerts: use lego v5 run subcommand flagsv0.1.2Anders Betts
4 daysAdd native TLS transport, TLS clients and lego cert sidecarv0.1.1Anders Betts
- bokfd: optional TLS listener (OpenSSL), certificate reload on change - clients: tls:host:port targets with chain and host verification - compose: port 8788 and an INWX/lego renewal sidecar - Makefile: header dependency tracking (-MMD -MP)
4 daysInitial commit: daemon, clients, docs, Docker deploy pipelinev0.1.0Anders Betts