pluginsGLPI / customfields

customfields plugin for GLPI
GNU General Public License v2.0
13 stars 4 forks source link

Decimal separator for a Currency custom field #60

Open dethegeek opened 9 years ago

dethegeek commented 9 years ago

v1.7 for GLPI 0.85

If I enter a custom field, typed Currency, with a comma (,) as decimal separator, I get an Sql error (extract hereafter). It would be nice to manage the translation of the decimal separator to the correct value (a dot .) before insert into the db, just like it is done for amounts entered in the 'financial and admin information' tab.

SQL: UPDATE glpi_plugin_customfields_monitors SET typecurrency = \'4,13\' WHERE id =\'1\' Error: Incorrect decimal value: '4,13' for column 'typecurrency' at row 1 Backtrace : inc/commondbtm.class.php:353
inc/commondbtm.class.php:1108 CommonDBTM->updateInDB() plugins/customfields/front/field.form.php:49 CommonDBTM->update()

( redmine : https://forge.glpi-project.org/issues/5423 )