diff --git a/.changeset/localization-no-default-currency.md b/.changeset/localization-no-default-currency.md new file mode 100644 index 0000000000..a11e104570 --- /dev/null +++ b/.changeset/localization-no-default-currency.md @@ -0,0 +1,9 @@ +--- +'@objectstack/service-settings': minor +--- + +Localization: drop the hard-coded `USD` platform default for the workspace **Default currency** setting. + +Previously the `localization.currency` setting defaulted to `'USD'`, and that value was applied to any `currency`-typed field that omits its own code — so every code-less amount surfaced a `$`/`US$` symbol even when nothing (field, measure, or workspace) actually named a currency. The setting now has **no platform default**: a code-less currency amount renders as a plain number unless the workspace explicitly picks a default currency (or the field declares its own). + +Migration: a workspace that relied on the implicit USD default and wants to keep showing `$` should set **Settings → Localization → Default currency** to `USD` explicitly. Fields/measures that declare their own currency code are unaffected. diff --git a/packages/services/service-settings/src/manifests/localization.manifest.test.ts b/packages/services/service-settings/src/manifests/localization.manifest.test.ts index 72ee73d755..b47814f1f0 100644 --- a/packages/services/service-settings/src/manifests/localization.manifest.test.ts +++ b/packages/services/service-settings/src/manifests/localization.manifest.test.ts @@ -21,7 +21,10 @@ describe('localizationSettingsManifest', () => { const byKey = (k: string) => specs.find((s) => s.key === k); expect(byKey('timezone').default).toBe('UTC'); expect(byKey('locale').default).toBe('en-US'); - expect(byKey('currency').default).toBe('USD'); + // No platform default currency: a code-less currency field renders as a + // plain number unless the workspace explicitly sets one (avoids surfacing + // an unwanted "$"/"US$" on every amount that omits its own code). + expect(byKey('currency').default).toBeUndefined(); expect(byKey('date_format').default).toBe('YYYY-MM-DD'); expect(byKey('first_day_of_week').default).toBe('monday'); expect(byKey('fiscal_year_start').default).toBe('january'); diff --git a/packages/services/service-settings/src/manifests/localization.manifest.ts b/packages/services/service-settings/src/manifests/localization.manifest.ts index 3d9b33d070..748b782022 100644 --- a/packages/services/service-settings/src/manifests/localization.manifest.ts +++ b/packages/services/service-settings/src/manifests/localization.manifest.ts @@ -111,8 +111,13 @@ export const localizationSettingsManifest: SettingsManifest = { // ── Finance ─────────────────────────────────────────────────────────── { type: 'group', id: 'finance', label: 'Finance', required: false }, { - type: 'select', key: 'currency', label: 'Default currency', required: false, default: 'USD', - description: 'ISO 4217 code applied when a currency field omits its own.', + type: 'select', key: 'currency', label: 'Default currency', required: false, + // No platform default: when a currency field omits its own code AND the + // workspace has not set a default here, amounts render as plain numbers + // rather than inheriting a guessed symbol (previously hard-defaulted to + // 'USD', which surfaced an unwanted "$"/"US$" on every code-less amount). + // A workspace can still pick a default to apply org-wide. + description: 'ISO 4217 code applied when a currency field omits its own. Leave unset to render code-less amounts as plain numbers.', options: [ { value: 'USD', label: 'USD — US Dollar' }, { value: 'EUR', label: 'EUR — Euro' },