Every new trip is stored with base currency USD, even when the user's (and the instance's) default currency is something else. The new-trip form has no currency field, so the user can't avoid it; they have to fix the base currency afterwards on the edit page.
src/lib/server/repositories/tripsRepo.ts:243: createTrip stores base_currency: input.baseCurrency ?? 'USD', and none of the creation paths (form, import, email ingestion, templates, copy, MCP) pass a currency. The column default is also 'USD' (src/lib/server/db/mongrelSchema.ts:625).
- Several inputs prefill a hardcoded
'USD' instead of the user's defaultCurrency:
- add expense on the trip page (
src/routes/trips/[id]/+page.svelte:1043, value="USD")
- new insurance policy (
src/routes/insurance/new/+page.svelte:82)
- add card benefit (
src/routes/cards/[id]/edit/+page.svelte:264)
- trip edit fallback (
src/routes/trips/[id]/edit/+page.svelte:113)
Steps: set Profile → Default currency to EUR, create a trip, open its edit page → base currency is USD.
Suggestion: fall back to the owner's default_currency in createTrip, and prefill the inputs from the signed-in user's default currency. Note: the root layout currently only passes { id, email, displayName, role } of the user to pages, so defaultCurrency would need to be added there, or loaded per page. Happy to send a PR; I've been running this change locally.
🤖 Generated with Claude Code
Every new trip is stored with base currency USD, even when the user's (and the instance's) default currency is something else. The new-trip form has no currency field, so the user can't avoid it; they have to fix the base currency afterwards on the edit page.
src/lib/server/repositories/tripsRepo.ts:243:createTripstoresbase_currency: input.baseCurrency ?? 'USD', and none of the creation paths (form, import, email ingestion, templates, copy, MCP) pass a currency. The column default is also'USD'(src/lib/server/db/mongrelSchema.ts:625).'USD'instead of the user'sdefaultCurrency:src/routes/trips/[id]/+page.svelte:1043,value="USD")src/routes/insurance/new/+page.svelte:82)src/routes/cards/[id]/edit/+page.svelte:264)src/routes/trips/[id]/edit/+page.svelte:113)Steps: set Profile → Default currency to EUR, create a trip, open its edit page → base currency is USD.
Suggestion: fall back to the owner's
default_currencyincreateTrip, and prefill the inputs from the signed-in user's default currency. Note: the root layout currently only passes{ id, email, displayName, role }of the user to pages, sodefaultCurrencywould need to be added there, or loaded per page. Happy to send a PR; I've been running this change locally.🤖 Generated with Claude Code