Work / Aakalan / Wiki / Concepts
money-in-minor-units
Conceptcanonicalverified 2026-09-23
CONCEPT.MONEY-IN-MINOR-UNITSSummary
Every amount is an integer in its currency's minor unit, carried with the currency it was entered in, and never converted.
Why it matters
"Paise" is the INR case, not the rule: yen and won have no minor unit at all (¥100 is 100, not 10000) and the Gulf dinars have a thousand. Anything that assumes 100 is a hundredfold error waiting for the first non-INR group.
Conversion is refused outright because a rate needs a source and a timestamp, and a stale rate turns a settled debt into an argument.
Implications
- Currency is per GROUP, on the group document. A personal expense has no group to ask, so it carries its own, stamped from the home currency at entry — reading an old expense off the current setting would turn ₹450 of chai into €450 the day somebody moves abroad.
- Any total reaching across groups is a
MoneyBag, never a number. A screen that wants one figure picks the largest and lists the rest. - A group's currency is fixed once it has an expense, and the choice is gated at CREATION so nobody enters a trip's worth of bills and then meets a paywall.
- When a split does not divide evenly the leftover goes to the payer. That rule is stated to users on the add screen, so the implementation has to match it.
- Amounts are always tabular and signed by colour rather than by a minus sign.
Related
- reserved-money-direction
- group-new — where the choice is gated
- settle-receive — one payment, one currency
Sources
- src/lib/money.ts
- src/lib/currency.ts
- src/lib/money-bag.ts
Every project of mine is written down like this.
Read the résumé