Skip to content

feat: customizable currency symbol/position and locale-aware separator parsing #693

Closed as not planned

Description

@khaira777

Summary

In Colombia and other Latin American countries, the official currency symbol is $, but displaying prices as $ 11.000 causes confusion with US Dollars. Additionally, in countries where . is the thousands grouping separator and , is the decimal separator, typing 11.000 or importing spreadsheets with 11.000 causes numbers to be parsed as 11 instead of 11000, leading zero-decimal currencies like COP to display as $ 11.

Requirements

  1. Customizable Currency Symbol & Position in Settings:
    • Allow merchants to edit currency_symbol in Business Settings (defaulting to the country profile's symbol, e.g. $, but editable to COP, Col$, etc.).
    • Allow choosing position: prefix (e.g. COP 11.000 / $11.000) or suffix (e.g. 11.000 COP).
    • Clean spacing rules (automatic space for text codes/suffixes, customary spacing for symbol prefixes).
  2. Auto-Derived Delimiters:
    • Derive thousands and decimal separators from the tenant's country profile locale (es-CO uses . for thousands and , for decimal; en-US uses , for thousands and . for decimal).
  3. Dedicated Localized Currency Input Component:
    • Replace raw <input type="number"> in price forms.
    • Format live with thousands grouping as digits are typed.
    • Suppress/block decimal input when maxDecimals === 0 (e.g. COP, JPY, KRW), eliminating accidental decimal interpretations.
  4. Smart Locale-Aware CSV Price Parser:
    • Strip currency symbols and whitespace in menu-csv.ts.
    • Parse . and , according to tenant country locale and currency fraction digits (e.g. 11.000 -> 11000).
  5. Thermal Receipt & UI Parity:
    • Ensure thermal receipt templates and on-screen UI formatters both respect the configured symbol and prefix/suffix position.

Activity

  1. added
    enhancement
    area:frontend
    area:backend
    Ready-For-PR
    on Sep 10, 2026
  2. khaira777 commented on Sep 10, 2026

    @khaira777
    ContributorAuthor

    Work is in progress.

  3. self-assigned this
    on Sep 10, 2026
  4. khaira777 commented on Sep 10, 2026

    @khaira777
    ContributorAuthor

    Speaking as khaira777's autonomous worker: @itsbkm

    I saw that PR #697 was closed and that PR #705 was opened:
    #705

    Is #705 intended to be the replacement or first slice for this issue, or is it separate work? If it is related, could you link the “Phase 3 ACTIVE DESIGN” / regional-snapshot contract and clarify:

    I will leave the preserved #697 implementation untouched and will not start a new PR until you confirm the direction.

  5. added
    ready-for-dev
    priority:normal
    and removed
    ready-for-dev
    priority:normal
    on Sep 18, 2026
  6. itsbkm commented on Sep 21, 2026

    @itsbkm
    Contributor

    Closing — this shipped in two parts via the regional-snapshot stack (#777–#786):

    Requirements 2–5 (auto-derived delimiters, locale-aware currency input, CSV parser, thermal/UI parity) are implemented, via resolveRegionalSnapshot() in main/countries.ts:

    • Thousands/decimal separators are derived from the tenant's country locale (currency-input.ts, useAmountFormat).
    • The currency input component blocks decimal entry for 0-fraction-digit currencies (COP, JPY, KRW) and formats with live locale-aware grouping.
    • menu-csv.ts's price parser and formatAmountForCsv use the same locale-derived rules.
    • Thermal receipts and on-screen UI resolve the same symbol/position from the same source (fix(regional): resolve receipt currency symbol from CLDR only, not a stored override #786 fixed the last divergence — receipts were preferring a stored override over the CLDR-derived symbol).
    • Contract tests for COP/0, KWD/3, and other archetypes are in tests/regional-snapshot.test.ts.

    Requirement 1 (merchant-editable currency symbol and merchant-selectable prefix/suffix) is explicitly not implemented, by decision — see docs/business-decisions.md, "Regional settings come from signup, never from a fallback":

    What this rules out: merchant-editable currency symbols and merchant-selectable prefix/suffix placement (both asked for in issue #693). If a locale's rendering is wrong, the fix is the country profile in main/countries.ts, which corrects every store in that country.

    If the COP-vs-USD $ ambiguity described in the original report still needs a merchant-facing fix, please open a fresh issue scoped to that specific case rather than reopening this one — the design intentionally rules out a general per-store override.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Ready-For-PRarea:backendarea:frontendenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions