user view: Show multiple worklog entries per day
closes #531 (Multiple worklogs on same day not displayed in users shift list (but counted in sum))
This commit is contained in:
parent
9a2f246511
commit
482721eb1b
|
@ -442,7 +442,13 @@ function User_view_myshifts(
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($its_me || $admin_user_worklog_privilege) {
|
if ($its_me || $admin_user_worklog_privilege) {
|
||||||
|
$day_counter = 1;
|
||||||
foreach ($user_worklogs as $worklog) {
|
foreach ($user_worklogs as $worklog) {
|
||||||
|
// Check if more than one worklog per day
|
||||||
|
if (isset($myshifts_table[$worklog['work_timestamp']])) {
|
||||||
|
$worklog['work_timestamp'] += $day_counter++;
|
||||||
|
}
|
||||||
|
|
||||||
$myshifts_table[$worklog['work_timestamp']] = User_view_worklog($worklog, $admin_user_worklog_privilege);
|
$myshifts_table[$worklog['work_timestamp']] = User_view_worklog($worklog, $admin_user_worklog_privilege);
|
||||||
$timeSum += $worklog['work_hours'] * 3600;
|
$timeSum += $worklog['work_hours'] * 3600;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue