Skip to content

refactor: currency from the parser config, frontend currency block removed - #4111

Merged
Kadrian merged 3 commits into
developfrom
refactor/currency-from-parser-config
Oct 21, 2026
Merged

Kadrian merged 3 commits into
developfrom
refactor/currency-from-parser-config

Conversation

@Kadrian

@Kadrian Kadrian commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

One source of truth for the currency: the frontend gets the ISO code of the parser currency, frontend.currency is gone.

Stacked on #4108. The old block (unit, separators, decimalScale) was shaped after a frontend library's props; both sides kept derived values of preprocessor.parsers.currency by hand, and the store read money with the frontend scale while the parser wrote it with the currency's fraction digits.

  • /config/frontend sends currency: "EUR"; the frontend formats money with Intl in the app locale (history, preview, money range field) and derives symbol and decimals from the code
  • backend reads scale and fraction digits from the parser currency everywhere: money filter values, MoneyIntStore, the arrow printer (no hard-coded 2)
  • the API is unchanged: money filter values still go to the backend as integers in cents, arrow results still come back that way, so stored queries and saved form configs keep working
  • config: frontend.currency is ignored when a deployment config still sets it (@JsonIgnoreProperties, review request), so configs can drop the block at their own pace
  • downstream: package.json unchanged; its backend reads the old block in two places and gets the same one-line change with the submodule bump
  • second commit: three pre-existing errors in openapi.yaml the linter now reports (unquoted NULL enum value, uniqueItems on items instead of the arrays); the file had not changed since 2024, so the lint job never ran on it

@Kadrian
Kadrian added this pull request to stack #4109 October 21, 2026 11:03
@Kadrian Kadrian changed the title one currency: the frontend gets the ISO code of the parser currency, the frontend currency block is gone refactor: currency from the parser config, frontend currency block removed Oct 21, 2026
Base automatically changed from chore/drop-react-number-format to develop October 21, 2026 11:15
@Kadrian
Kadrian force-pushed the refactor/currency-from-parser-config branch 2 times, most recently from 51ed567 to 1350c84 Compare October 21, 2026 11:18
@Kadrian
Kadrian force-pushed the refactor/currency-from-parser-config branch from 1350c84 to ead9670 Compare October 21, 2026 11:20
@Kadrian
Kadrian marked this pull request as ready for review October 21, 2026 11:21
@Kadrian

Kadrian commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

Hey @awildturtok this would be my proposal for how to simplify currency across backend & frontend, curious what you think!

@awildturtok awildturtok left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somit verhinderst du das crashen der neuen Instanzen und wir können vermeiden alle deployments direkt zu migrieren

@Kadrian
Kadrian added this pull request to the merge queue Oct 21, 2026
Merged via the queue into develop with commit 1ce2dc4 Oct 21, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants