diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 3676a87567d..939c50e68d9 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -115,7 +115,7 @@ else if ($action == 'add' && $user->rights->deplacement->creer) $error=0; $object->date = dol_mktime(12, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int')); - $object->km = GETPOST('km','int'); + $object->km = price2num(GETPOST('km','alpha'), 'MU'); // Not 'int', it may be a formated amount $object->type = GETPOST('type','alpha'); $object->socid = GETPOST('socid','int'); $object->fk_user = GETPOST('fk_user','int'); @@ -174,7 +174,7 @@ else if ($action == 'update' && $user->rights->deplacement->creer) $result = $object->fetch($id); $object->date = dol_mktime(12, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int')); - $object->km = GETPOST('km','int'); + $object->km = price2num(GETPOST('km','alpha'), 'MU'); // Not 'int', it may be a formated amount $object->type = GETPOST('type','alpha'); $object->socid = GETPOST('socid','int'); $object->fk_user = GETPOST('fk_user','int');