Zeiterfassung Update

* ZA Anzeige beim genehmigen gefixt
This commit is contained in:
Spi
2024-05-07 14:09:59 +02:00
parent 2f81e1d77e
commit ba8d96b231
2 changed files with 35 additions and 3 deletions
@@ -1,6 +1,12 @@
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); <?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
?> ?>
<i class="fa-regular fa-arrow-left-from-bracket"></i>
<i class="fa-regular fa-arrow-right-from-bracket"></i>
<i class="fa-solid fa-arrow-left-from-bracket"></i>
<i class="fa-light fa-arrow-left-from-bracket"></i>
<i class="fa-regular fa-umbrella-beach"></i>
<i class="far fa-arrow-to-left"></i>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet" <link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/> type="text/css"/>
<style> <style>
@@ -10,6 +16,21 @@
color: #2238d1; color: #2238d1;
cursor: pointer; cursor: pointer;
} }
.fa-arrow-to-left {
margin-top: 2px;
margin-left: 10px;
color: #d12222;
cursor: pointer;
font-size:16px;
}
.fa-arrow-from-left {
margin-top: 2px;
margin-right: 10px;
color: #2238d1;
cursor: pointer;
font-size:16px;
}
.filler { .filler {
width: 30px; width: 30px;
@@ -125,14 +146,14 @@
<td class="text-center overtimeplushours-td" data-overtimeplushours="<?= number_format(round(($timerecording->overtime_plushours) / 3600, 2), "2", ",", ".") ?>"><?= number_format(round(($timerecording->ishourssum-$timerecording->musthours) / 3600, 2), "2", ",", ".") ?> <span class="text-danger font-weight-500"><?= ($timerecording->overtime_plushours) ? "(".number_format(round(($timerecording->overtime_plushours) / 3600, 2), "2", ",", ".").")" : '' ?></span></td> <td class="text-center overtimeplushours-td" data-overtimeplushours="<?= number_format(round(($timerecording->overtime_plushours) / 3600, 2), "2", ",", ".") ?>"><?= number_format(round(($timerecording->ishourssum-$timerecording->musthours) / 3600, 2), "2", ",", ".") ?> <span class="text-danger font-weight-500"><?= ($timerecording->overtime_plushours) ? "(".number_format(round(($timerecording->overtime_plushours) / 3600, 2), "2", ",", ".").")" : '' ?></span></td>
<td class="text-center"><?= ($timerecording->plushours_all == 0) ? '<div class="filler-0 float-left"></div>' : '' ?><?= number_format(round(($timerecording->plushours_all) / 3600, 2), "2", ",", ".") ?> <td class="text-center"><?= ($timerecording->plushours_all == 0) ? '<div class="filler-0 float-left"></div>' : '' ?><?= number_format(round(($timerecording->plushours_all) / 3600, 2), "2", ",", ".") ?>
<?= ($timerecording->plushours_all > 0) ? '<i class="float-right fa-regular fa-arrow-right-from-bracket change-difference" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round(($timerecording->plushours_all) / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '<div class="filler float-right"></div>' ?></td> <?= ($timerecording->plushours_all > 0) ? '<i class="float-right fas fa-arrow-from-left change-difference" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round(($timerecording->plushours_all) / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '<div class="filler float-right"></div>' ?></td>
<td class="text-center"><?= ($timerecording->timerecordingEmployee->overtime_now == 0) ? '<div class="filler-0 float-left"></div>' : '' ?><?= number_format(round($timerecording->timerecordingEmployee->overtime_now / 3600, 2), "2", ",", ".") ?> <td class="text-center"><?= ($timerecording->timerecordingEmployee->overtime_now == 0) ? '<div class="filler-0 float-left"></div>' : '' ?><?= number_format(round($timerecording->timerecordingEmployee->overtime_now / 3600, 2), "2", ",", ".") ?>
<?= ($timerecording->timerecordingEmployee->overtime_now > 0) ? '<i class="float-right fa-regular fa-arrow-right-from-bracket change-overtime" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round($timerecording->timerecordingEmployee->overtime_now / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '<div class="filler float-right"></div>' ?></td> <?= ($timerecording->timerecordingEmployee->overtime_now > 0) ? '<i class="float-right fas fa-arrow-from-left change-overtime" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round($timerecording->timerecordingEmployee->overtime_now / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '<div class="filler float-right"></div>' ?></td>
<?php if ($me->superexpertEnabled()): ?> <?php if ($me->superexpertEnabled()): ?>
<td class="text-center"><?= number_format(round($timerecording->timerecordingEmployee->bpahours / 3600, 2), "2", ",", ".") ?></td> <td class="text-center"><?= number_format(round($timerecording->timerecordingEmployee->bpahours / 3600, 2), "2", ",", ".") ?></td>
<?php endif; ?> <?php endif; ?>
<td class="text-center"><?= number_format(round($timerecording->plushours25 / 3600, 2), "2", ",", ".") ?></td> <td class="text-center"><?= number_format(round($timerecording->plushours25 / 3600, 2), "2", ",", ".") ?></td>
<td class="text-center"><?= number_format(round($timerecording->overtime50free / 3600, 2), "2", ",", ".") ?></td> <td class="text-center"><?= ($timerecording->overtime50free > 0) ? '<i class="float-left fas fa-arrow-to-left change-overtime" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round($timerecording->overtime50free / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '<div class="filler float-left"></div>' ?> <?= number_format(round($timerecording->overtime50free / 3600, 2), "2", ",", ".") ?></td>
<td class="text-center"><?= number_format(round($timerecording->overtime100free / 3600, 2), "2", ",", ".") ?></td> <td class="text-center"><?= number_format(round($timerecording->overtime100free / 3600, 2), "2", ",", ".") ?></td>
<td class="text-center"><?= number_format($timerecording->diet, 2, ',', '.') . " €" ?></td> <td class="text-center"><?= number_format($timerecording->diet, 2, ',', '.') . " €" ?></td>
<td class="text-center"><?= $timerecording->homeoffice ?> Tag(e)</td> <td class="text-center"><?= $timerecording->homeoffice ?> Tag(e)</td>
@@ -128,6 +128,17 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
$start = "-"; $start = "-";
$end = "-"; $end = "-";
$day = $daysgerm[date("w", $timerecording->start)]; $day = $daysgerm[date("w", $timerecording->start)];
} else if ($timerecording->timerecordingCategory->hourday == 6) {
$date = date("d.m.Y", $timerecording->start);
$datadate = date("Y-m-d", $timerecording->start);
$start = date("H:i", $timerecording->start);
$end = date("H:i", $timerecording->end);
$seconds = ($timerecording->end - $timerecording->start);
$minutes = floor(($seconds % 3600) / 60);
$hours = floor($seconds / 3600);
$sum = sprintf("%02d", $hours) . ":" . sprintf("%02d", $minutes);
$day = $daysgerm[date("w", $timerecording->start)];
$isSeconds = $isSeconds + $seconds;
} }
if ($timerecording->timerecordingCategory->approval == 1 && $timerecording->approved == 0) { if ($timerecording->timerecordingCategory->approval == 1 && $timerecording->approved == 0) {