summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-18 09:22:29 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-18 09:22:29 +0200
commit8ae421b348d74c0c31a52e686afbdb369d9300f6 (patch)
tree947a3b2d6632ca1b9d6642aadb225e3e0cd464df
parentc9bf881ba455a321928d8c49deafca13dc662ab6 (diff)
downloadbokf-0.1.9.tar.gz
bokf-0.1.9.zip
bokftui: sum the whole IB voucher, not only the visible rowsv0.1.9
-rw-r--r--clients/bokftui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clients/bokftui.c b/clients/bokftui.c
index a8b582c..4ce5a62 100644
--- a/clients/bokftui.c
+++ b/clients/bokftui.c
@@ -3565,6 +3565,8 @@ static void ib_screen(struct app *a)
mvaddstr(4, 62, "Belopp");
attroff(A_BOLD);
int64_t sum = 0;
+ for (int i = 0; i < n; i++)
+ sum += amts[i];
if (n == 0) {
mvaddstr(6, 2, "Ingen ingående balans registrerad ännu.");
}
@@ -3577,7 +3579,6 @@ static void ib_screen(struct app *a)
snprintf(nbuf, sizeof nbuf, "%s", nm ? nm : "");
pad_field(nbuf, sizeof nbuf, 50);
mvprintw(6 + i, 2, "%-6s %s %14s", accs[idx], nbuf, amount);
- sum += amts[idx];
}
char sumbuf[32];
kr_format(sum, sumbuf, sizeof sumbuf);