* neue Migration für Personaladministration (Aktive Verrechnung) * Verrechnung Anpassungen Black P. * superexpertEnabled Implementation Verrechnung/Personaladministration * Personaladministration (Aktive Verrechnung/Zeiterfassung Enddatum)
204 lines
8.5 KiB
PHP
204 lines
8.5 KiB
PHP
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
|
$initialApproval = date("Y-m-d H:i:s", $timerecordingcar->initial_approval);
|
|
$initialApprovalMonth = date("m", $timerecordingcar->initial_approval);
|
|
$firstApproval = strtotime('+' . $timerecordingcar->first_approval . 'years', strtotime($initialApproval));
|
|
if ($firstApproval < time()) {
|
|
$firstApproval = strtotime(date("Y-$initialApprovalMonth-01", time()));
|
|
if ($firstApproval < time()) {
|
|
$firstApproval = strtotime(date("Y-$initialApprovalMonth-01", strtotime('+1 year')));
|
|
}
|
|
}
|
|
$approval = date("m/Y", $firstApproval);
|
|
?>
|
|
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
|
type="text/css"/>
|
|
<style>
|
|
table.dataTable.table-sm > thead > tr > th:not(.sorting_disabled) {
|
|
padding-right: 10px;
|
|
}
|
|
</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"><a href="<?= self::getUrl("TimerecordingCar") ?>">Fahrzeuge</a>
|
|
</li>
|
|
<li class="breadcrumb-item active"><?= $timerecordingcar->number_plate ?></li>
|
|
</ol>
|
|
</div>
|
|
<h4 class="page-title"><?= $timerecordingcar->brand . "/" . $timerecordingcar->model . " (" . $timerecordingcar->number_plate . ")" ?>
|
|
Detail
|
|
<span class="ml-2">
|
|
<a href="<?= self::getUrl("TimerecordingCar", "edit", ["id" => $timerecordingcar->id, 'returnto' => "detail"]) ?>">
|
|
<button class="btn btn-primary">Bearbeiten</button>
|
|
</a>
|
|
</span>
|
|
</h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end page title -->
|
|
|
|
<div class="card">
|
|
<div class="card-body mb-3">
|
|
<div class="row">
|
|
<div class="col-12 col-lg-5 card-border">
|
|
<div>
|
|
<h4>Fahrzeug Informationen </h4>
|
|
|
|
</div>
|
|
<div>
|
|
<table class="table table-sm">
|
|
<tbody>
|
|
<tr>
|
|
<th class="w-30">Marke</th>
|
|
<td><?= $timerecordingcar->brand ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Model/Typ</th>
|
|
<td><?= $timerecordingcar->model ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Erste §57a nach</th>
|
|
<td><?= ($timerecordingcar->first_approval) ? $timerecordingcar->first_approval . " Jahr(en)" : "-" ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Fahrzeugverwalter</th>
|
|
<td><?= ($timerecordingcar->user_id) ? $timerecordingcar->user->name : "-" ?></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<div class="col-12 col-lg-5 card-border">
|
|
<div>
|
|
<h4> </h4>
|
|
|
|
</div>
|
|
<div>
|
|
<table class="table table-sm">
|
|
<tbody>
|
|
<tr>
|
|
<th>Fahrtenbuch</th>
|
|
<td><?= ($timerecordingcar->timerecording) ? "Ja" : "Nein" ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Erstzulassung</th>
|
|
<td><?= ($timerecordingcar->initial_approval) ? date("m/Y", $timerecordingcar->initial_approval) : "-" ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Nächste $57a</th>
|
|
<td><?= ($timerecordingcar->initial_approval) ? $approval : "-" ?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th class="w-30">Kilometerstand</th>
|
|
<td><?= ($timerecordingcar->mileage_now) ? $timerecordingcar->mileage_now . " KM" : "-" ?></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</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">Fahrtenbuch</h4>
|
|
</div>
|
|
<div class="float-right">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<table id="datatable" class="table table-striped table-hover table-sm">
|
|
<thead>
|
|
<tr>
|
|
<th class="text-center">Startkilometer</th>
|
|
<th class="text-center">Endkilometer</th>
|
|
<th class="text-center">Kilometer</th>
|
|
<th class="text-center">Fahrer</th>
|
|
<th class="text-center">Datum</th>
|
|
<th class="text-center">Zeit</th>
|
|
|
|
<th class="text-center">Ort</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>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($timerecordings as $timerecording): ?>
|
|
<tr>
|
|
<td class="text-center"><?= $timerecording->mileage_start ?> KM</td>
|
|
<td class="text-center"><?= $timerecording->mileage_end ?> KM</td>
|
|
<td class="text-center"><?= $timerecording->mileage_end - $timerecording->mileage_start ?>KM
|
|
<td class="text-center"><?= $timerecording->user->name ?></td>
|
|
<td data-order="<?= $timerecording->start ?>"
|
|
class="text-center"><?= date("d.m.Y", $timerecording->start) ?></td>
|
|
<td class="text-center"><?= date("H:i", $timerecording->start) . " - " . date("H:i", $timerecording->end) ?></td>
|
|
|
|
</td>
|
|
<td class="text-center"><?= $timerecording->businesstrip_info ?></td>
|
|
|
|
</td>
|
|
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
|
<!-- <a href="-->
|
|
<?php //= self::getUrl("TimerecordingCar", "edit", ["id" => $timerecordingcar->id]) ?><!--"><i-->
|
|
<!-- class="far fa-edit" title="Bearbeiten"></i></a>-->
|
|
<!-- <a href="-->
|
|
<?php //= self::getUrl("TimerecordingCar", "delete", ["id" => $timerecordingcar->id]) ?><!--"-->
|
|
<!-- onclick="if(!confirm('Auto wirklich löschen?')) return false;" class="text-danger"-->
|
|
<!-- title="Löschen"><i class="fas fa-trash"></i></a>-->
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
var hidesearch = [7];
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
});
|
|
</script>
|
|
<script type="text/javascript"
|
|
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
|
|
|
|
|
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|