change default end date on creating shifts

main
Philip Häusler 9 years ago
parent 1cd6a4f4f6
commit 3d7e378b67

@ -10,7 +10,7 @@ function admin_shifts() {
$rid = 0; $rid = 0;
$start = DateTime::createFromFormat("Y-m-d H:i", date("Y-m-d") . " 00:00")->getTimestamp(); $start = DateTime::createFromFormat("Y-m-d H:i", date("Y-m-d") . " 00:00")->getTimestamp();
$end = $start + 24 * 60 * 60; $end = $start;
$mode = 'single'; $mode = 'single';
$angelmode = 'manually'; $angelmode = 'manually';
$length = ''; $length = '';

@ -159,15 +159,15 @@ function User_view($user_source, $admin_user_privilege, $freeloader, $user_angel
$myshift['actions'] = table_buttons($myshift['actions']); $myshift['actions'] = table_buttons($myshift['actions']);
if ($shift['freeloaded']) if ($shift['freeloaded'])
$timesum += - 2 * ($shift['end'] - $shift['start']); $timesum += (- 2 * ($shift['end'] - $shift['start']));
else else
$timesum += $shift['end'] - $shift['start']; $timesum += ($shift['end'] - $shift['start']);
$myshifts_table[] = $myshift; $myshifts_table[] = $myshift;
} }
if (count($myshifts_table) > 0) if (count($myshifts_table) > 0)
$myshifts_table[] = array( $myshifts_table[] = array(
'date' => '<b>' . _("Sum:") . '</b>', 'date' => '<b>' . _("Sum:") . '</b>',
'time' => "<b>" . round($timesum / (60 * 60), 1) . " h</b>", 'time' => "<b>" . round($timesum / 3600, 1) . " h</b>",
'room' => "", 'room' => "",
'shift_info' => "", 'shift_info' => "",
'comment' => "", 'comment' => "",

Loading…
Cancel
Save