Incorrect rounding up with priceset fields
How to reproduce
- Set decimal separator to , [comma]
- Set thousand separator to . [dot]
- Go to administer --> CiviContribute --> Manage Price Fields
- Add a price set
- Add a price field of type option
- Add an option with value 12,987654321
- Add an option with value 9,87
- Add an option with value 123.456.789,987654321
Actual result
- The option in step 6 becomes 12,00
- The option of step 7 becomes 9,00
- The option of step 8 becomes 123.456.789,99
Note the rounding with zero's for step 6 and 7 and the correct but unwanted rounding of step 8.
Expected result
- The option in step 6 stays 12,987654321
- The option of step 7 stays 9,87
- The option of step 8 stays 123.456.789,987654321
See also
We discovered this issue whilst we were testing PR 18297
Tested in
dmaster (5.31.alpha1)