Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
delcroip authored Apr 2, 2023
2 parents fee109c + 3bba8d6 commit fa1854f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions htdocs/timesheet/class/TimesheetTask.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ public function saveTaskTime($Submitter, $duration, $daynote, $dayKey, $addmode
$this->timespent_note = $daynote;
$this->timespent_duration = $duration;
}

if ($item['duration']!=$this->timespent_duration ||$item_note_old!=$item_note) {
if ($this->timespent_duration>0 || !empty($item_note)) {
dol_syslog(__METHOD__." taskTimeUpdate", LOG_DEBUG);
Expand All @@ -1368,19 +1368,23 @@ public function saveTaskTime($Submitter, $duration, $daynote, $dayKey, $addmode
} else {
$resArray['updateError']++;
}

} else {
$resArray['updateError']++;
}
} else {
dol_syslog(__METHOD__." taskTimeDelete", LOG_DEBUG);
if ($this->delTimeSpent($Submitter, 0) >= 0) {
$resArray['timeSpendDeleted']++;
$this->tasklist[$dayKey]['id'] = 0;
} else {
$resArray['updateError']++;
}
}
}
} elseif ($duration>0 || !empty($daynote)) {
$this->timespent_note = $daynote;
$this->timespent_duration = $duration;

if (property_exists($this, 'timespent_datehour') && $duration>0 ) {
$this->timespent_withhour = '1';
if ($is_today) {
Expand Down

0 comments on commit fa1854f

Please sign in to comment.