diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index d930908c3e2..7a00f206166 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -290,9 +290,6 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us $object->fetchTimeSpent(GETPOSTINT('lineid')); $result = 0; - if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { - $result = $object->delTimeSpent($user); - } $object->fetch($id_temp, $ref); @@ -314,7 +311,7 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us $result = 0; if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { - $result = $object->addTimeSpent($user); + $result = $object->updateTimeSpent($user); if ($result >= 0) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } else {