summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-22 22:48:14 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-22 22:48:14 +0200
commitca267e6b1c727be254c6229fc1ed3e2c5a0d6065 (patch)
tree1182e2d8efa3c0c8f1103e841132230341b83cfa /src/util.h
parentfd08102a4be4e1f26c7afe005842002da923b987 (diff)
downloadbokf-0.1.67.tar.gz
bokf-0.1.67.zip
sru, tui: round every account to whole kronor; fix the årsredovisning Stäng skipv0.1.67
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index a94cf16..ccb0210 100644
--- a/src/util.h
+++ b/src/util.h
@@ -47,6 +47,11 @@ void util_date_add_months(const char *date, int months, char *out, size_t n);
void util_date_add_days(const char *date, int days, char *out, size_t n);
int util_date_valid(const char *s);
+/* Öre rounded to whole kronor (half away from zero), still in öre. The
+ annual report and the SRU export round every account with it and sum the
+ results, so their lines, totals and fields agree to the krona. */
+int64_t util_round_kr(int64_t ore);
+
/* encoding conversion for SIE files (IBM PC8 / CP437) */
size_t util_utf8_to_cp437(const char *in, unsigned char *out, size_t out_sz);
char *util_cp437_to_utf8(const unsigned char *in, size_t n);