You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently only entering decimals using a period . decimal separator works properly. If the selected localization uses a comma , for the decimal separator, entering values per localization settings does not work properly.
For example entering 5,45
results in 545.00 being stored, recalled and displayed
This is generally an issue in all text fields where decimals are entered.
Two issues need to be addressed
1- Localization specific validation of numbers
2- Proper conversion, storage and display in the database. The database/business logic should always use, store and return decimals using a period.
It appears what is happening is that the comma is being stripped out rather than replaced. I suspect the code is assuming the comma is used for a thousands separator, which should be stripped out when storing decimals
The text was updated successfully, but these errors were encountered:
MIght be related to #3872 . I was looking into that function today. I'm not sure if the validation actually works, it will try to parse the number in the configured locale and stop the submit in case this does not work. I had the impression that it accepted just about anything
I've made a few changes to the decimal parsing in the locale helper and wrapped a few values in the parsing functions. I still need to work through suppliers and on to find any others.
Pushed another commit to fix this issue in the sales controller. We are going to need to apply these same fixes for decimals throughout the code if we want them to be compatible with the comma for decimal separator.
Currently only entering decimals using a period
.
decimal separator works properly. If the selected localization uses a comma,
for the decimal separator, entering values per localization settings does not work properly.For example entering
5,45
results in 545.00 being stored, recalled and displayed
This is generally an issue in all text fields where decimals are entered.
Two issues need to be addressed
1- Localization specific validation of numbers
2- Proper conversion, storage and display in the database. The database/business logic should always use, store and return decimals using a period.
It appears what is happening is that the comma is being stripped out rather than replaced. I suspect the code is assuming the comma is used for a thousands separator, which should be stripped out when storing decimals
The text was updated successfully, but these errors were encountered: