diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-22 22:48:14 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-22 22:48:14 +0200 |
| commit | ca267e6b1c727be254c6229fc1ed3e2c5a0d6065 (patch) | |
| tree | 1182e2d8efa3c0c8f1103e841132230341b83cfa /src/util.c | |
| parent | fd08102a4be4e1f26c7afe005842002da923b987 (diff) | |
| download | bokf-ca267e6b1c727be254c6229fc1ed3e2c5a0d6065.tar.gz bokf-ca267e6b1c727be254c6229fc1ed3e2c5a0d6065.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.c')
| -rw-r--r-- | src/util.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -575,3 +575,8 @@ size_t util_utf8_to_cp437(const char *in, unsigned char *out, size_t out_sz) } return o; } + +int64_t util_round_kr(int64_t ore) +{ + return ore >= 0 ? (ore + 50) / 100 * 100 : -((-ore + 50) / 100 * 100); +} |
