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

Accept comma as a decimal separator #303

Open
6 tasks done
Openuser87 opened this issue Oct 26, 2024 · 2 comments
Open
6 tasks done

Accept comma as a decimal separator #303

Openuser87 opened this issue Oct 26, 2024 · 2 comments
Labels
🕷️ bug Something isn't working

Comments

@Openuser87
Copy link

First Check

  • This is not a feature request
  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • I can replicate the issue inside the Demo install.

Homebox Version

0.15.2

What is the issue you are experiencing?

When entering purchase price with comma (e.g. 19,99), the value is ignored after saving (price is 0). Would be great to accept / handle such values (have a setting for it if necessary), as this is a wide-spread standard for decimal separator in European countries.

How can the maintainer reproduce the issue?

  • create a new item
  • enter e.g. 19,99 as purchase price
  • save

Deployment

Docker (Linux)

OS Architechture

ARM64

Deployment Details

No response

@Openuser87 Openuser87 added the 🕷️ bug Something isn't working label Oct 26, 2024
@tankerkiller125
Copy link
Contributor

tankerkiller125 commented Oct 26, 2024

This is a limitation of the float field type and the number input on the browser.

Attempting to accommodate this would be an interestingly difficult task given that some countries use commas for thousand place separators, and other use it for the change. While other countries have the inverse.

Right now, as far as I can tell and while I was trying to sort other things, there is no good way to handle this, and make sure that it properly gets converted to a float (which mandates the 1245.12 format)

I should note however, that I think your browser cache may not be cleared, as the input field should not be accepting commas at all as of 0.15.2 (validated on demo), and if you did save it without noticing the comma wasn't accepted it should still save, although as 1999 instead of 19.99

Please see #204 for some info on the comma thing previously brought up.

@Openuser87
Copy link
Author

Right now, as far as I can tell and while I was trying to sort other things, there is no good way to handle this, and make sure that it properly gets converted to a float (which mandates the 1245.12 format)

Couldn't we have a setting in user's profile, and then apply some parsing on the field value according to that setting?

I should note however, that I think your browser cache may not be cleared, as the input field should not be accepting commas at all as of 0.15.2 (validated on demo), and if you did save it without noticing the comma wasn't accepted it should still save, although as 1999 instead of 19.99

Just tested again (purchase price 19,99) in a private window on Firefox at https://demo.homebox.software/ - I still get no feedback from the field about any error, and the price is 0 after saving...

Please see #204 for some info on the comma thing previously brought up.

Sorry, didn't find this one (probably searched only open issues...). The issue is slightly different though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕷️ bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants