Files
thetool/Layout/default/TimerecordingBilling/Overview.php
Daniel Spitzer 6b3412afe6 Zeiterfassung Update/Bugfixes
* Homeofficetage werden wenn sie in Kombination mit Arztbesuch/Anwesenheiten nun richtig berechnet
 * Verrechnungsübersicht zeigt nun historisch BP/Gutstunden und Mehrstunden
 * Aufbuchen und Mindern wird nun in Verrechnet bei den NLZs angezeigt
2024-07-08 19:31:57 +02:00

149 lines
7.6 KiB
PHP

<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
?>
<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"/>
<!-- 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">Monatsdetail Übersicht</li>
</ol>
</div>
<h4 class="page-title">Zeiterfassung Monatsdetail Übersicht</h4>
</div>
</div>
</div>
<!-- end page title -->
<div id="demo_info"></div>
<div class="card">
<div class="card-body mb-3">
<div class="row">
<div class="col-12">
<div class="float-left">
<h4 class="header-title">Übersicht aller Monate zum Monatsletzten</h4>
</div>
</div>
</div>
<table id="datatable" class="table table-hover table-sm">
<thead>
<tr class="bg-white">
<th class="text-center">Monat</th>
<th class="text-center">Mitarbeiter</th>
<th class="text-center">LZ</th>
<th class="text-center">NLZ</th>
<th class="text-center">LZ + NLZ</th>
<th class="text-center">Sollst.</th>
<th class="text-center">Sollabweichung</th>
<th class="text-center">Mehrstunden</th>
<th class="text-center">Gutstunden</th>
<?php if ($me->superexpertEnabled()): ?>
<th class="text-center min-w-70">Black P. St.</th>
<?php endif; ?>
</tr>
<tr id="filterrow">
<th class="text-center edit-width-large">Monat</th>
<th class="text-center">Mitarbeiter</th>
<th class="text-center"></th>
<th class="text-center"></th>
<th class="text-center"></th>
<th class="text-center"></th>
<th class="text-center"></th>
<th class="text-center"></th>
<th class="text-center"></th>
<?php if ($me->superexpertEnabled()): ?>
<th></th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<?php
$oldEmployee_id = "";
foreach ($timerecordingbillingsemployees as $timerecordingbillingsemployee):
$user = new User($timerecordingbillingsemployee->timerecordingEmployee->user->id);
$employee_number = (string)$user->getFlag('employee_number');
unset ($nlz);
if ($timerecordingbillingsemployee->nlz) {
$nlz_details = json_decode($timerecordingbillingsemployee->nlz, true);
foreach ($nlz_details as $key => $nlz_detail) {
if ($nlz_detail < 100) {
if ($nlz_detail > 0) {
$nlz .= $key . ": " . $nlz_detail . " Tag(e)<br>";
}
} else {
$nlz .= $key . ": " . round($nlz_detail / 3600, 2) . " Stunden<br>";
}
}
} else {
$nlz = "";
}
if ($oldEmployee_id != $timerecordingbillingsemployee->timerecordingEmployee_id) {
$bpadiff = 0;
$overtimediff = 0;
$plushoursdiff = 0;
}
$bpadiff = $bpadiff + $timerecordingbillingsemployee->transfer_bpahours;
$overtimediff = $overtimediff + $timerecordingbillingsemployee->transfer_overtime;
$plushoursdiff = $plushoursdiff + $timerecordingbillingsemployee->transfer_plushours;
?>
<tr>
<td class="text-center"><?= $timerecordingbillingsemployee->timerecordingBilling->month ?></td>
<td data-order="<?= $timerecordingbillingsemployee->timerecordingEmployee->user->name . $timerecordingbillingsemployee->timerecordingBilling->month ?>"><?= "(" . $employee_number . ") " . $timerecordingbillingsemployee->timerecordingEmployee->user->name ?></td>
<td class="text-center"><?= number_format(round($timerecordingbillingsemployee->ishours / 3600, 2), "2", ",", ".") ?></td>
<td class="text-center"><?= $nlz ?></td>
<td class="text-center"><?= number_format(round($timerecordingbillingsemployee->ishourssum / 3600, 2), "2", ",", ".") ?></td>
<td class="text-center"><?= number_format(round($timerecordingbillingsemployee->musthours / 3600, 2), "2", ",", ".") ?></td>
<td class="text-center"><?= number_format(round(($timerecordingbillingsemployee->ishourssum - $timerecordingbillingsemployee->musthours) / 3600, 2), "2", ",", ".") ?></td>
<td class="text-center"
data-order="<?= $timerecordingbillingsemployee->plushours_all + $timerecordingbillingsemployee->transfer_plushours ?>"><?= number_format(round(($timerecordingbillingsemployee->plushours_all + $timerecordingbillingsemployee->transfer_plushours) / 3600, 2), "2", ",", ".") ?></td>
<td class="text-center"
data-order="<?= $timerecordingbillingsemployee->timerecordingEmployee->overtime_now + $overtimediff?>"><?= number_format(round(($timerecordingbillingsemployee->timerecordingEmployee->overtime_now + $overtimediff) / 3600, 2), "2", ",", ".") ?></td>
<?php if ($me->superexpertEnabled()): ?>
<td class="text-center"
data-order="<?= $timerecordingbillingsemployee->timerecordingEmployee->bpahours + $bpadiff ?>"><?= number_format(round(($timerecordingbillingsemployee->timerecordingEmployee->bpahours + $bpadiff) / 3600, 2), "2", ",", ".") ?></td>
<?php endif; ?>
</tr>
<?php
$oldEmployee_id = $timerecordingbillingsemployee->timerecordingEmployee_id;
endforeach; ?>
</tbody>
</table>
</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 = [2, 3, 4, 5, 6, 7, 8, 9];
$(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"); ?>