Skip to content

Percent field does not accept comma values

The percentage field does not accept comma values. How to recreate the error:

  1. create a new opportunity and enter a probability of 10.5 (using the point)
  2. reopen the opportunity in edit, the point will have become a comma (10,5)
  3. saving the opportunity again the value becomes 10.

Logically this happens even if in the first step we enter 10,5 directly (using the comma) and save

Step1: Edit

edit_step1

Step2: Edit

edit_step2

Step3: Detail

detail_step3

the problem probably is here modules/Vtiger/uitypes/Percentage.php in the getDisplayValue function, probably due to incorrect handling of the percentage field and convertToUserFormat