Currency
Hoikka is single-currency in practice: everything is EUR. Multi-currency exists only as a schema placeholder — there is no conversion logic wired up anywhere, so treat EUR as effectively hardcoded.
What is real
- All prices are EUR, stored in cents (minor units) as integers to avoid
floating-point errors —
2999means29,99 €. - Formatting goes through the shared
formatPricehelper.
import { formatPrice } from "$lib/utils";
formatPrice(2999); // "29,99 €"formatPrice(cents, currencyCode = BASE_CURRENCY) formats via Intl.NumberFormat
with a per-currency locale built into $lib/utils (fi-FI for EUR); unknown codes
fall back to "29.99 XXX". A getCurrencySymbol(code) helper exists as well.
Because nothing ever passes a non-EUR currency, you will only see EUR output in
practice.
What is a placeholder
The orders table has two currency columns:
currency_code TEXT DEFAULT 'EUR' NOT NULL, -- always 'EUR'
exchange_rate NUMERIC DEFAULT '1' NOT NULL -- always 1New orders are created with currencyCode: "EUR" and exchangeRate: "1", and
nothing ever changes them. There is no currency selector, no rate lookup, no
conversion helper, and no place in the checkout or pricing path that converts
amounts.
If you want real multi-currency
You would need to build it: a way to select/detect a currency, a source of exchange rates, conversion at display and at order creation (stamping the locked rate onto the order), and formatting per currency. The schema columns are a starting point, not a working feature.