From 482721eb1ba0ee21a3f75a8465fcf53ae08a1603 Mon Sep 17 00:00:00 2001 From: Clemens Date: Fri, 21 Dec 2018 21:18:14 +0100 Subject: 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)) --- includes/view/User_view.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'includes/view/User_view.php') diff --git a/includes/view/User_view.php b/includes/view/User_view.php index 275a31ca..c2bf4a06 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -442,7 +442,13 @@ function User_view_myshifts( } if ($its_me || $admin_user_worklog_privilege) { + $day_counter = 1; 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); $timeSum += $worklog['work_hours'] * 3600; } -- cgit v1.2.3