Files
thetool/Layout/default/TimerecordingEmployee/Index.php
Daniel Spitzer 085d8facdc Zeiterfassung
Neue Features:
* BP Stunden Aufbuchen/Mindern
* Spezialbuchungen ohne Verechnungstechnische relevanz
2024-12-29 20:24:36 +01:00

184 lines
11 KiB
PHP

<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
$type[1] = "Angestellter";
$type[2] = "Arbeiter";
$type[3] = "Lehrling";
?>
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= $git_merge_ts ?>" rel="stylesheet"
type="text/css"/>
<link href="<?= self::getResourcePath() ?>datatables/DataTables-2x/datatables.min.css?<?= $git_merge_ts ?>"
rel="stylesheet"
type="text/css"/>
<style>
.border-dark {
border-color: #cbcbcb !important;
}
.border-bottom {
border-bottom: 1px dotted #adadad !important;
}
.inactive_empoyee {
background-color: #ff75756e !important;
}
</style>
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="<?= self::getUrl("Dashboard") ?>"><?= MFAPPNAME_SLUG ?></a>
</li>
<li class="breadcrumb-item active">Personaladministration</li>
</ol>
</div>
<h4 class="page-title">Personaladministration</h4>
</div>
</div>
</div>
<!-- end page title -->
<div class="card">
<div class="card-body mb-3">
<div class="row">
<div class="col-12">
<div class="float-left">
<h4 class="header-title">Liste aller Personaladministration</h4>
</div>
<div class="float-right">
</div>
</div>
</div>
<div class="col-lg-12">
<table id="datatable" class="table table-hover table-sm">
<thead>
<tr class="bg-white">
<th class="text-center edit-width-medium">Aktiv</th>
<th class="text-center">Mitarbeiter</th>
<th class="text-center">Geburtstag</th>
<th class="text-center">Vertragsart</th>
<th title="Zeiterfassung Start" class="text-center">ZE Start</th>
<th title="Zeiterfassung Ende" class="text-center">ZE Ende</th>
<th class="text-center">Sollzeiten</th>
<th title="Sollstunden" class="text-center">Sollst.</th>
<th class="text-center">Mehrstunden</th>
<th class="text-center">Überstunden</th>
<?php if ($me->superexpertEnabled()): ?>
<th title="Black Pig Stunden" class="text-center edit-width-medium">B. P. St.</th>
<?php endif; ?>
<th class="text-center" title="Offene Urlaube">Urlaubstage</th>
<th class="text-center edit-width">Schnellb.</th>
<th class="text-center edit-width">Jobrad</th>
<th class="edit-width"></th>
</tr>
<tr id="filterrow">
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<?php if ($me->superexpertEnabled()): ?>
<th></th>
<?php endif; ?>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach ($timerecordingusers as $timerecordinguser):
if ($timerecordingemployees[$timerecordinguser->id]['only_admin'] == 1 && !$me->superexpertEnabled()) {
continue;
}
if ($timerecordingworkinghours) {
$seconds = $timerecordingworkinghours[$timerecordinguser->id]['secondcounter'];
$minutes = floor(($seconds % 3600) / 60);
$hours = floor($seconds / 3600);
$sum = sprintf("%02d", $hours) . ":" . sprintf("%02d", $minutes);
} 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));
}
if ($timerecordingemployees[$timerecordinguser->id]['overtime_now'] < 0) {
$overTime = $timerecordingemployees[$timerecordinguser->id]['overtime_now'] * -1;
$overTime = "-" . sprintf('%02dh:%02dm', floor($overTime / 3600), floor($overTime / 60 % 60));
} else {
$overTime = $timerecordingemployees[$timerecordinguser->id]['overtime_now'];
$overTime = sprintf('%02dh:%02dm', floor($overTime / 3600), floor($overTime / 60 % 60));
}
?>
<tr class="<?= ($timerecordingemployees[$timerecordinguser->id]['bmd_active'] == "1") ? "" : "inactive_empoyee" ?>">
<td class="text-center pr-3"><?= ($timerecordingemployees[$timerecordinguser->id]['bmd_active'] == "1") ? "Ja" : "Nein" ?></td>
<td><?= $timerecordinguser->name ?></td>
<td class="text-center"
data-order="<?= $timerecordingemployees[$timerecordinguser->id]['birthday'] ?>"><?= ($timerecordingemployees[$timerecordinguser->id]['birthday']) ? date("d.m.Y", $timerecordingemployees[$timerecordinguser->id]['birthday']) : "-" ?></td>
<td><?= $type[$timerecordingemployees[$timerecordinguser->id]['type']] ?></td>
<td class="text-center"
data-order="<?= $timerecordingemployees[$timerecordinguser->id]['startdate'] ?>"><?= ($timerecordingemployees[$timerecordinguser->id]['startdate']) ? date("d.m.Y", $timerecordingemployees[$timerecordinguser->id]['startdate']) : "-" ?></td>
<td class="text-center"
data-order="<?= $timerecordingemployees[$timerecordinguser->id]['enddate'] ?>"><?= ($timerecordingemployees[$timerecordinguser->id]['enddate']) ? date("d.m.Y", $timerecordingemployees[$timerecordinguser->id]['enddate']) : "-" ?></td>
<td class="text-center text-nowrap"><?= ($timerecordingworkinghours) ? $timerecordingworkinghours[$timerecordinguser->id]['datetimetext'] : "" ?></td>
<td class="text-center"><?= $sum ?></td>
<td class="text-center"
data-order="<?= ($timerecordingemployees[$timerecordinguser->id]['plushours_now']) ? $timerecordingemployees[$timerecordinguser->id]['plushours_now'] : 0 ?>"><?= $plusHours ?></td>
<td class="text-center"
data-order="<?= $timerecordingemployees[$timerecordinguser->id]['overtime_now'] ?>"><?= $overTime ?></td>
<?php if ($me->superexpertEnabled()): ?>
<td class="text-center"
data-order="<?= $timerecordingemployees[$timerecordinguser->id]['bpahours'] ?>"><?= sprintf('%02dh:%02dm', floor($timerecordingemployees[$timerecordinguser->id]['bpahours'] / 3600), floor($timerecordingemployees[$timerecordinguser->id]['bpahours'] / 60 % 60)) ?></td>
<?php endif; ?>
<td class="text-center"
data-order="<?= ($timerecordingemployees[$timerecordinguser->id]['holidays_now']) ? $timerecordingemployees[$timerecordinguser->id]['holidays_now'] : $timerecordingemployees[$timerecordinguser->id]['holidays_now'] ?>"><?= ($timerecordingemployees[$timerecordinguser->id]['holidays_now']) ? $timerecordingemployees[$timerecordinguser->id]['holidays_now'] . ' Tage' : '0 Tage' ?> </td>
<td class="text-center pr-3"><?= ($timerecordingemployees[$timerecordinguser->id]['auto_workinghours'] == '1') ? 'Ja' : 'Nein' ?></td>
<td class="text-center pr-3"><?= ($timerecordingemployees[$timerecordinguser->id]['jobbike'] == '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
class="far fa-edit" title="Bearbeiten"></i></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript"
src="<?= self::getResourcePath() ?>datatables/DataTables-2x/datatables.min.js?<?= $git_merge_ts ?>"></script>
<script type="text/javascript">
var hidesearch = [6, 7, 8, 9, 10, 13];
var columnfilter = [0, 11, 12];
<?php if ($me->superexpertEnabled()): ?>
var columnfilter = [0, 12, 13];
hidesearch = [6, 7, 8, 9, 10, 11, 14];
<?php endif; ?>
var columnoptions = '<option value=""></option><option value="Ja">Ja</option><option value="Nein">Nein</option>';
var pageLength = 100;
$(document).ready(function () {
});
</script>
<script type="text/javascript"
src="<?= self::getResourcePath() ?>assets/js/datatables-std2.js?<?= $git_merge_ts ?>"></script>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>