Skip to content

design: dual-currency display at an owner-set exchange rate #1342

Open

Description

@khaira777

Parent: #830 (S9). state: needs decision. The maintainer deferred this scope on 23 Oct; logged here. Verified against main @ 8e39053.

Problem

Stores in dual-currency economies want totals shown in a second currency at a rate they set, for example a Lebanon store pricing in USD and also showing LBP, or PKR (+961 and +92 on 22 Sep).

Already done

Picking a currency independently of the country is shipped. Setup offers any supported currency, and the country's currency is only a recommendation (frontend/src/app/setup/page.tsx, CurrencySelect; main/routes/auth.ts ~L907). Later changes go through the safe reset (#832, #839). A Lebanon store can choose USD today.

Current behavior (verified)

There is no second currency or exchange rate anywhere. exchange.?rate|secondary.?currency|dual.?currency returns 0 hits in main, shared and frontend/src.

Options to decide

  1. Display only, phase 1 (recommended when picked up). The owner enters the rate by hand (no online FX lookup, so it works offline). The converted total is shown on the payment screen, the customer display and the receipt, and the rate is saved on each bill for audit.
  2. Display plus taking cash in the second currency, with change given in the base currency (needs changes to the cash shift and reports).
  3. Not supported.

Notes for whoever picks it up

  • Build on the minor-unit money helpers (Architecture [Needs Review]: Integer minor-unit Money foundation (main/core/money.ts) #285).
  • Touch points: settings validation (main/routes/settings.ts), the settings UI, PaymentModal.tsx, the customer display, and receipts (shared/print/document.ts, main/printers/document-*.ts).
  • Not verified: a money mismatch between RevFlo mobile and the PC (+55 BR, 23 Sep). That is a proprietary app and needs a vendor repro.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:backendBackend (Express/SQLite)area:frontendFrontend (React/Next.js)state:needs-designNeeds a design/scope decision before work startstype:designArchitecture/design decision needed before implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions