Portfolio

MySimpleAccountManager 1.5.1: monthly net in any currency

MySimpleAccountManager tracks accounts in several currencies against one reference currency, with live rates. Since 1.4.0, release 1.5.0 gave it a memory and a monthly net report; release 1.5.1, fixes what that report got wrong when you change your reference currency.

Monthly net report above the account list, one month in profit, in light theme

What did 1.5.0 add?

1.5.0 turns a list of balances into a history you can read month by month.

  • Monthly net report: the month's net change, signed and coloured, above the accounts. Swipe across it to walk back through the months.
  • Operation history with its rates: every amount change is written down with the exchange rates of its day, in two new Room tables, auto-migrated.
  • Export and import carry the history, and import is now guarded by a confirmation dialog.
  • Undo an amount reset: display a snack-bar to restore the deleted amount.
  • UI improvements

What did 1.5.1 fix?

1.5.1 makes the report restate past months in the currency you ask for, instead of relabelling them. 1.5.0 summed the amount stored at write time, in whatever reference currency was current then: switch from EUR to USD and every past month kept its euro figure under a dollar sign.

The query now converts at read time, from the raw amount and the rate snapshot of the day the operation happened on. When rates are missing, the difference is clearly marked as an estimate.

Negative net difference shown as an estimate

How was it built?

Test-first, one case at a time. The missing rate fallback order was pinned by six tests written before the query changed: conversion to the account's own currency, each fallback in turn, a partly priced day, a mixed month. The suite stands at almost 250 JVM tests and more than 100 instrumented ones, with hand-written fakes and an injected clock at every month boundary. A few dozens Roborazzi screenshot references are committed as source; covering both themes. Every released export file structure has a fixture, so a file exported from 1.3.0 still imports.

The release is scripted and guarded. It refuses a dirty tree, a versionCode that Google Play has already seen and a versionName the last release already wore; the guards run under bats.

Stack: Kotlin 2.4, Jetpack Compose with Material 3, Room 2.8, Hilt, targetSdk 37, R8 with resource shrinking, detekt with Compose rules.

What is next?

A progressive migration to Compose Multiplatform, the way Training Diary 2.0.0 went. Domain, database and state layers are already free of Android imports, and logging sits behind an interface with one Android implementation, so the port is moving files rather than rewriting them.

Get MySimpleAccountManager on Google Play, or browse the rest of the portfolio.

Back


Comments

No comment yet.

A remark, a suggestion? Do not hesitate to express yourself below. Just be courteous and polite, please.

If this field is left blank, you will appear as Anonymous.