Hi, I’m working on some calculations with JS and was wondering how I could stop SuiteCRM from automatically adding commas in the thousands place as this messes up the parsing of my values.
Hi,
there is a user profile setting that indicates how many decimals are shown for currencies:
But: this is a user setting, so each user could use a different amount of decimals and even different separators (dot or comma). You should keep that in mind when creating JS-customizations that do business tasks.
Is there a way I can globally change the 1000s separator? Seems odd that it’s a user setting
In the database and in internal representations, there are no such formatting characters. Your problem stems from doing calculations on the front-end, from presentation-formatted data.
Consider doing your calculus from the back-end, and then just sending the final number to the front-end.
If you really need to work with formatted numbers, it shouldn’t be too difficult to just do a search and replace to remove the unwanted commas…