Zeiterfassung Update

* Soll zeiten nun vom Startdatum abhängig
 * Neue Summierung der Sollzeiten in der Personalverwaltung
This commit is contained in:
Spitzer Daniel
2024-03-04 11:51:19 +01:00
parent c39f717267
commit cc00f70cd6
4 changed files with 92 additions and 25 deletions

View File

@@ -5,6 +5,14 @@ $type[3] = "Lehrling";
?>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
type="text/css"/>
<style>
.border-dark {
border-color: #cbcbcb !important;
}
.border-bottom {
border-bottom: 1px dotted #adadad !important;
}
</style>
<!-- start page title -->
<div class="row">
<div class="col-12">
@@ -71,6 +79,14 @@ $type[3] = "Lehrling";
} else {
$sum = "";
}
if ($timerecordingemployees[$timerecordinguser->id]['plushours_now'] < 0) {
$plusHours = $timerecordingemployees[$timerecordinguser->id]['plushours_now'] * -1;
$plusHours = "-" . sprintf('%02dh:%02dm', floor($plusHours / 3600), floor($plusHours / 60 % 60));
} else {
$plusHours = $timerecordingemployees[$timerecordinguser->id]['plushours_now'];
$plusHours = sprintf('%02dh:%02dm', floor($plusHours / 3600), floor($plusHours / 60 % 60));
}
?>
<tr>
@@ -79,9 +95,10 @@ $type[3] = "Lehrling";
<td class="text-center"><?= ($timerecordingemployees[$timerecordinguser->id]['startdate']) ? date("d.m.Y", $timerecordingemployees[$timerecordinguser->id]['startdate']) : "-" ?></td>
<td class="text-center text-nowrap"><?= ($timerecordingworkinghours) ? $timerecordingworkinghours[$timerecordinguser->id]['datetimetext'] : "" ?></td>
<td class="text-center"><?= $sum ?></td>
<td class="text-center"><?= sprintf('%02d:%02d', ($timerecordingemployees[$timerecordinguser->id]['plushours_now']/ 3600),($timerecordingemployees[$timerecordinguser->id]['plushours_now']/ 60 % 60)) ?></td>
<td class="text-center"><?= sprintf('%02d:%02d', ($timerecordingemployees[$timerecordinguser->id]['overtime_now']/ 3600),($timerecordingemployees[$timerecordinguser->id]['overtime_now']/ 60 % 60)) ?></td>
<td class="text-center"><?= ($timerecordingemployees[$timerecordinguser->id]['holidays_now']) ? $timerecordingemployees[$timerecordinguser->id]['holidays_now'].' Tage' : '' ?> </td>
<td class="text-center"
data-order="<?= ($timerecordingemployees[$timerecordinguser->id]['plushours_now']) ? $timerecordingemployees[$timerecordinguser->id]['plushours_now'] : 0 ?>"><?= $plusHours ?></td>
<td class="text-center"><?= sprintf('%02d:%02d', floor($timerecordingemployees[$timerecordinguser->id]['overtime_now'] / 3600), floor($timerecordingemployees[$timerecordinguser->id]['overtime_now'] / 60 % 60)) ?></td>
<td class="text-center"><?= ($timerecordingemployees[$timerecordinguser->id]['holidays_now']) ? $timerecordingemployees[$timerecordinguser->id]['holidays_now'] . ' Tage' : '' ?> </td>
<td class="text-center"><?= ($timerecordingemployees[$timerecordinguser->id]['auto_workinghours'] == '1') ? 'Ja' : 'Nein' ?></td>
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
<a href="<?= self::getUrl("TimerecordingEmployee", "edit", ['id' => $timerecordingemployees[$timerecordinguser->id]['id'], "userid" => $timerecordinguser->id]) ?>"><i
@@ -100,7 +117,7 @@ $type[3] = "Lehrling";
<script type="text/javascript">
var hidesearch = [3,4,5,6,7,9];
var hidesearch = [3, 4, 5, 6, 7, 9];
$(document).ready(function () {