Skip to content

respect field's currency when normalising the number#15566

Merged
brandonkelly merged 4 commits into4.xfrom
bugfix/15565-money-field-currency-formatting
Aug 21, 2024
Merged

respect field's currency when normalising the number#15566
brandonkelly merged 4 commits into4.xfrom
bugfix/15565-money-field-currency-formatting

Conversation

@i-just
Copy link
Copy Markdown
Contributor

@i-just i-just commented Aug 20, 2024

Description

When constructing a Money field and normalising the number for the defaultValue, min and max, we need to explicitly pass the currency to the _normalizeNumber() method. Otherwise, the default USD value will be used as, at that point, the field’s currency property hasn’t been set yet.

Before:
Screenshot 2024-08-20 at 15 10 36
Screenshot 2024-08-20 at 15 10 24

After:
Screenshot 2024-08-20 at 15 09 50
Screenshot 2024-08-20 at 15 10 02

Related issues

#15565

@brandonkelly brandonkelly merged commit 058b152 into 4.x Aug 21, 2024
@brandonkelly brandonkelly deleted the bugfix/15565-money-field-currency-formatting branch August 21, 2024 18:55
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