From 79b27457125dc2e259783359085021eea1d26e3a Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Wed, 23 Sep 2026 09:34:16 +0200 Subject: tui: "Byt bolag" in the main menu Reopens the org picker (cursor on the current org) and switches the running session: the org's name, role, current fiscal year and series are reloaded and the remembered list selections cleared. The context reload now clears the previous org's values first. Co-Authored-By: Claude Opus 5.5 --- clients/ui.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clients/ui.c') diff --git a/clients/ui.c b/clients/ui.c index cda0883..2eb2dfe 100644 --- a/clients/ui.c +++ b/clients/ui.c @@ -183,6 +183,12 @@ void replace_x_into(const char *src, double x, char *dst, size_t cap) void app_refresh_context(struct app *a) { + a->org_name[0] = '\0'; + a->role[0] = '\0'; + a->fy = 0; + a->fy_label[0] = '\0'; + a->fy_start[0] = '\0'; + a->fy_end[0] = '\0'; char args[64]; snprintf(args, sizeof args, "{\"org\":%lld}", (long long)a->org); char *resp = client_rpc(&a->conn, "session.use_org", a->session, 0, args); -- cgit v1.3