Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number of Decimals setting is not used anymore #7556

Open
1 task
martynasbakanas opened this issue Sep 26, 2024 · 0 comments
Open
1 task

Number of Decimals setting is not used anymore #7556

martynasbakanas opened this issue Sep 26, 2024 · 0 comments
Labels
type: bug Existing functionality is broken

Comments

@martynasbakanas
Copy link

martynasbakanas commented Sep 26, 2024

User Story

As a admin, I want decimal config be working in frontend.

Details

In plugin currency setting we have Number of Decimals config. If I set it to 0, in frontend it still shows 2 decimal places.
I see that useCurrencyFormater is DonationAmountLevels and it uses Intl.NumberFormat which accepts minimumFractionDigits option.
This option is used in Currency Switcher already so it should be implemented and used in other amount fields.

Expected Behavior

Number of Decimals actually does what it is supposed to do

Steps to Reproduce

  1. Create a form
  2. Make Number of Decimals setting 0 or 1
  3. Add form to page
  4. See that form amount decimals are not the same as in settings

Acceptance Criteria

  • Number of Decimals actually does what it is supposed to do
@martynasbakanas martynasbakanas added the type: bug Existing functionality is broken label Sep 26, 2024
@martynasbakanas martynasbakanas changed the title [Broken functionality] should... Number of Decimals setting is ignored Sep 26, 2024
@martynasbakanas martynasbakanas changed the title Number of Decimals setting is ignored Number of Decimals setting is not used anymore Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Existing functionality is broken
Projects
None yet
Development

No branches or pull requests

1 participant