Thousands-separator corrupts price field values (comma)
This issue appears with price field values of 1000 and above. It is reproducible as follows on dmaster:
I start by visiting Administer CiviCRM > Localization > Languages, Currency, Locations, and ensure the following settings:
- Thousands Separator: ,
- Decimal Delimiter: .
Then I take these steps:
- Create a price field with an amount of 1200.00, and click Save
- In the list of price fields, observe that the amount is correct: "1,200.00".
- Edit that price field, and in the Edit form, the amount is displayed with decimal and thousands-separators, as "1,200.00"
- Remove the comma and click Save.
- In the list of price fields, observe that the amount is correct: "1,200.00".
- Again edit that price field, and in the Edit form, the amount is again displayed with decimal and thousands-separators, as "1,200.00"
- Change nothing in this form and merely press Save.
- In the list of price fields, observe that the amount is now "1.00".
My guess is that the comma is being treated as a decimal, even though the localization settings specify that it is the thousands-separator.
Perhaps we could just do without thousands-separators in editable price fields, and sidestep the issue of processing them; but then someone would enter them manually and be surprised at the result. So omitting them is probably not enough.