This commit is contained in:
atm-corentin 2025-02-20 15:37:59 +01:00 committed by GitHub
commit 2002c19ad9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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