Merge branch 'spidev' into 'master'
Zeiterfassungs Update See merge request fronk/thetool!303
This commit is contained in:
@@ -13,7 +13,6 @@ $monthger[10] = "Oktober";
|
||||
$monthger[11] = "November";
|
||||
$monthger[12] = "Dezember";
|
||||
$time = time();
|
||||
|
||||
for ($i = 1; $i <= 25; $i++) {
|
||||
$kw = date('W', $time);
|
||||
$year = date('Y', $time);
|
||||
@@ -196,7 +195,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 mb-2 businesstrip-div">
|
||||
<div class="col-lg-2 mb-2 businesstrip-div businesstrip-check-div ">
|
||||
|
||||
<div class="form-check text-center mt-1">
|
||||
<input class="form-check-input" type="checkbox" name="businesstrip"
|
||||
@@ -211,6 +210,30 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
|
||||
placeholder="Ort"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
<div class="col-lg-2 car-div car-div-car" style="display:none">
|
||||
|
||||
<select id="timerecordingCar_id" name="timerecordingCar_id"
|
||||
class="select2 form-control">
|
||||
<option value="">Auto auswählen</option>
|
||||
<?php foreach ($timerecordingCars as $timerecordingCar): ?>
|
||||
|
||||
<option value="<?= $timerecordingCar->id ?>"
|
||||
data-mileagenow="<?= $timerecordingCar->mileage_now ?>"><?= $timerecordingCar->number_plate . " (" . $timerecordingCar->brand." ".$timerecordingCar->model . ")" ?></option>
|
||||
</option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-1 car-div " style="display:none">
|
||||
<input style="" type="number" id="mileage_start" name="mileage_start"
|
||||
placeholder="KM Start"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
<div class="col-lg-1 car-div" style="display:none">
|
||||
<input style="" type="number" id="mileage_end" name="mileage_end"
|
||||
placeholder="KM Ende"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" row mt-2">
|
||||
<div class="col-lg-3 ">
|
||||
|
||||
131
Layout/default/TimerecordingBilling/Detail.php
Normal file
131
Layout/default/TimerecordingBilling/Detail.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
||||
?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" 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">Zeiterfassung Verrechnung</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 id="month" data-month="<?= $month ?>" class="page-title">Verrechnung/Abrechnung <?= $month ?></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 Mitarbeiter</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="datatable" class="table table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Mitarbeiter</th>
|
||||
<th class="text-center">Personal Nr.</th>
|
||||
<th class="text-center">Sollstunden</th>
|
||||
<th class="text-center">Iststunden</th>
|
||||
<th class="text-center">Sollabweichung</th>
|
||||
<th class="text-center">Akuelle Gutstunden</th>
|
||||
<th class="text-center">Akuelle Überstunden</th>
|
||||
<th class="text-center">Nichtleistungszeiten</th>
|
||||
<th class="text-center">Diäten</th>
|
||||
<th class="text-center">Homeoffice Tage</th>
|
||||
</tr>
|
||||
<tr id="filterrow">
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($timerecordings as $timerecording):
|
||||
if (!empty($timerecording['data']['time']['daysum'])) {
|
||||
$offdays = "";
|
||||
$counter = 1;
|
||||
foreach ($timerecording['data']['time']['daysum'] as $category => $value) {
|
||||
if ($counter > 1) {
|
||||
$offdays .= "</div>";
|
||||
}
|
||||
$offdays .= "<div>";
|
||||
if ($value < 100) {
|
||||
$offdays .= $category . ": " . $value . " Tag(e) ";
|
||||
} else {
|
||||
|
||||
$offdays .= $category . ": " . sprintf('%02dh:%02dm', floor($value / 3600), floor($value / 60 % 60));
|
||||
}
|
||||
$counter++;
|
||||
}
|
||||
$offdays .= "</div>";
|
||||
} else {
|
||||
$offdays = "keine";
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?= $timerecording['user_name'] ?></td>
|
||||
<td class="text-center edit-width-large"><?= $timerecording['employee_number'] ?></td>
|
||||
<td data-order="<?= $timerecording['data']['time']['mustorder'] ?>"
|
||||
class="text-center"><?= $timerecording['data']['time']['must'] ?></td>
|
||||
<td data-order="<?= $timerecording['data']['time']['isorder'] ?>"
|
||||
class="text-center"><?= $timerecording['data']['time']['is'] ?></td>
|
||||
<td data-order="<?= $timerecording['data']['time']['summsecondsorder'] ?>"
|
||||
class="text-center"><?= $timerecording['data']['time']['summseconds'] ?></td>
|
||||
<td data-order="<?= $timerecording['data']['time']['plushours_noworder'] ?>"
|
||||
class="text-center"><?= $timerecording['data']['time']['plushours_now'] ?></td>
|
||||
<td data-order="<?= $timerecording['data']['time']['overtime_noworder'] ?>"
|
||||
class="text-center"><?= $timerecording['data']['time']['overtime_now'] ?></td>
|
||||
<td class=""><?= $offdays ?></td>
|
||||
<td class="text-center"><?= number_format($timerecording['data']['time']['diet'], 2, ',', '.') . " €" ?></td>
|
||||
<td class="text-center"><?= $timerecording['data']['time']['homeoffice'] ?> Tag(e)</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch = [2, 3, 4, 5, 6, 8, 9];
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.buttons-excel').closest('div').append('<div ><button id="bmd-export" class="btn btn-info margina">BMD Import</button></div>');
|
||||
$('.buttons-excel').closest('div').append('<div ><button id="bmd-export-nlz" class="btn btn-info margina">BMD NLZ Import</button></div>');
|
||||
|
||||
$('body').on('click', '#bmd-export', function () {
|
||||
|
||||
window.open('<?= self::getUrl("TimerecordingBilling", "api", ['do' => 'generatebmdexport']) ?>&month=' + $('#month').data('month'), '_blank');
|
||||
});
|
||||
$('body').on('click', '#bmd-export-nlz', function () {
|
||||
|
||||
window.open('<?= self::getUrl("TimerecordingBilling", "api", ['do' => 'generatebmdexportnlz']) ?>&month=' + $('#month').data('month'), '_blank');
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
77
Layout/default/TimerecordingBilling/Index.php
Normal file
77
Layout/default/TimerecordingBilling/Index.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
||||
?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" 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">Zeiterfassung Verrechnung</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Zeiterfassung Verrechnung/Abrechnung</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 Abrechnungsmonate</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="datatable" class="table table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Monat</th>
|
||||
<th class="text-center">Abgeschlossen</th>
|
||||
<th class="text-center">Abgeschlossen am</th>
|
||||
<th class="text-center">Abgeschlossen von</th>
|
||||
</tr>
|
||||
<tr id="filterrow">
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($months as $month): ?>
|
||||
<tr>
|
||||
<td class="text-center"><a href="<?= self::getUrl("TimerecordingBilling", "detail", ["month" => $month]) ?>"> <?= $month ?></a></td>
|
||||
<td class="text-center"></td>
|
||||
<td class="text-center"></td>
|
||||
<td class="text-center"></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"); ?>
|
||||
199
Layout/default/TimerecordingCar/Detail.php
Normal file
199
Layout/default/TimerecordingCar/Detail.php
Normal file
@@ -0,0 +1,199 @@
|
||||
<?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>Fahrtenbuch</th>
|
||||
<td><?= ($timerecordingcar->timerecording) ? "Ja" : "Nein" ?></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>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"); ?>
|
||||
151
Layout/default/TimerecordingCar/Form.php
Normal file
151
Layout/default/TimerecordingCar/Form.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
||||
if (isset($_GET['returnto']) && $_GET['returnto'] == "detail") {
|
||||
$cancelUrl = self::getUrl("TimerecordingCar", "Detail", ["id" => $timerecordingcars->id]);
|
||||
} else {
|
||||
$cancelUrl = self::getUrl("TimerecordingCar");
|
||||
}
|
||||
?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= date('U') ?>" 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"><a
|
||||
href="<?= self::getUrl("TimerecordingCar") ?>">Fahrzeuge</a></li>
|
||||
<li class="breadcrumb-item active"><?= ($timerecordingcars->id) ? "bearbeiten" : "Neu" ?></li>
|
||||
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title"><?= ($timerecordingcars->id) ? "Fahrzeug bearbeiten" : "Neues Fahrzeug" ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title mb-2"><?= ($timerecordingcars->id) ? "Fahrzeug bearbeiten" : "Neues Fahrzeug" ?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post"
|
||||
action="<?= self::getUrl("TimerecordingCar", "save", ["returnto" => $_GET["returnto"]]) ?>">
|
||||
<div class="card no-shadow">
|
||||
<div class="card-body">
|
||||
<input type="hidden" name="id" value="<?= $timerecordingcars->id ?>"/>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="number_plate">Kennzeichen *</label>
|
||||
<div class="col-lg-1">
|
||||
<input required="required" type="text" id="number_plate" name="number_plate"
|
||||
class="form-control"
|
||||
value="<?= $timerecordingcars->number_plate ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="brand">Marke *</label>
|
||||
<div class="col-lg-3">
|
||||
<input required="required" type="text" id="brand" name="brand"
|
||||
class="form-control"
|
||||
value="<?= $timerecordingcars->brand ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="model">Model/Typ *</label>
|
||||
<div class="col-lg-3">
|
||||
<input required="required" type="text" id="model" name="model"
|
||||
class="form-control"
|
||||
value="<?= $timerecordingcars->model ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="initial_approval">Erstzulassung</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="month" id="initial_approval"
|
||||
name="initial_approval"
|
||||
class="form-control"
|
||||
value="<?= ($timerecordingcars->initial_approval) ? date('Y-m', $timerecordingcars->initial_approval) : "" ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="first_approval">Erste §57a nach</label>
|
||||
<div class="col-lg-2">
|
||||
<select id="first_approval" name="first_approval" class="select2 form-control">
|
||||
<option value=" "> </option>
|
||||
<option value="1" <?= ($timerecordingcars->first_approval == "1") ? "selected='selected'" : "" ?>>
|
||||
1 Jahr
|
||||
</option>
|
||||
<option value="2" <?= ($timerecordingcars->first_approval == "2") ? "selected='selected'" : "" ?>>
|
||||
2 Jahren
|
||||
</option>
|
||||
<option value="3" <?= ($timerecordingcars->first_approval == "3") ? "selected='selected'" : "" ?>>
|
||||
3 Jahren
|
||||
</option>
|
||||
<option value="4" <?= ($timerecordingcars->first_approval == "4") ? "selected='selected'" : "" ?>>
|
||||
4 Jahren
|
||||
</option>
|
||||
<option value="5" <?= ($timerecordingcars->first_approval == "5") ? "selected='selected'" : "" ?>>
|
||||
5 Jahren
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="mileage">Kilometerstand</label>
|
||||
<div class="col-lg-1">
|
||||
<input type="number" id="mileage" name="mileage"
|
||||
class="form-control"
|
||||
value="<?= $timerecordingcars->mileage ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label"
|
||||
for="timerecording">Digitales Fahrtenbuch</label>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-check">
|
||||
<input id="timerecording"
|
||||
class="form-check-input" <?= ($timerecordingcars->timerecording) ? 'checked="checked"' : '' ?>
|
||||
type="checkbox" name="timerecording" value="1"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2"></label>
|
||||
<div class="col-lg-10">
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
<a href="<?= $cancelUrl ?>">
|
||||
<button type="button" class="btn btn-secondary">Abbrechen</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(".select2").select2({placeholder: ""});
|
||||
|
||||
// disable mousewheel on a input number field when in focus
|
||||
$('form').on('focus', 'input[type=number]', function (e) {
|
||||
$(this).on('wheel.disableScroll', function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
});
|
||||
$('form').on('blur', 'input[type=number]', function (e) {
|
||||
$(this).off('wheel.disableScroll')
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
120
Layout/default/TimerecordingCar/Index.php
Normal file
120
Layout/default/TimerecordingCar/Index.php
Normal file
@@ -0,0 +1,120 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<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 active">Fahrzeuge</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Fahrzeuge</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 Fahrzeuge</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary mb-2" href="<?= self::getUrl("TimerecordingCar", "add") ?>"><i
|
||||
class="fas fa-plus"></i> Neues Fahrzeug anlegen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="datatable" class="table table-striped table-hover table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Kennzeichen</th>
|
||||
<th class="text-center">Marke</th>
|
||||
<th class="text-center">Model/Typ</th>
|
||||
<th class="text-center">Erstzulassssung</th>
|
||||
<th class="text-center">$57a</th>
|
||||
<th class="text-center">Fahrtenbuch</th>
|
||||
<th class="text-center">Kilometerstand</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 ($timerecordingcars as $timerecordingcar):
|
||||
$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);
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?= self::getUrl("TimerecordingCar", "detail", ["id" => $timerecordingcar->id]) ?>"> <?= $timerecordingcar->number_plate ?></a>
|
||||
</td>
|
||||
<td><?= $timerecordingcar->brand ?></td>
|
||||
<td><?= $timerecordingcar->model ?></td>
|
||||
<td class="text-center"><?= ($timerecordingcar->initial_approval) ? date("m/Y", $timerecordingcar->initial_approval) : "-" ?></td>
|
||||
<td class="text-center"><?= ($timerecordingcar->initial_approval) ? $approval : "-" ?></td>
|
||||
<td class="text-center"><?= ($timerecordingcar->timerecording) ? "Ja" : "Nein" ?></td>
|
||||
<td class="text-center"><?= ($timerecordingcar->mileage_now) ? number_format($timerecordingcar->mileage_now, 0, ',', '.')." KM" : "-" ?>
|
||||
</td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?= self::getUrl("TimerecordingCar", "edit", ["id" => $timerecordingcar->id]) ?>"><i
|
||||
class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?= self::getUrl("TimerecordingCar", "delete", ["id" => $timerecordingcar->id]) ?>"
|
||||
onclick="if(!confirm('Fahrzeug 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];
|
||||
|
||||
var columnfilter = [5];
|
||||
var columnoptions = '<option value=""></option><option value="Ja">Ja</option><option value="Nein">Nein</option>';
|
||||
$(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"); ?>
|
||||
@@ -93,6 +93,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label"
|
||||
for="businesstrip">Unbezahlt</label>
|
||||
<div class="col-lg-3">
|
||||
<div class="form-check">
|
||||
<input id="businesstrip"
|
||||
class="form-check-input" <?php if ($timerecordingcategoriess->unpaid) echo 'checked="checked"'; ?>
|
||||
type="checkbox" name="unpaid" value="1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="only_admin">Nur für Buchhaltung zu
|
||||
buchen</label>
|
||||
|
||||
@@ -121,7 +121,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
|
||||
<input id="id" type="hidden" name="id" value=""/>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-lg-2">
|
||||
<label class="col-form-label" for="user_id">Buchungsart</label>
|
||||
<label class="col-form-label" for="user_id">Mitarbeiter</label>
|
||||
|
||||
<select id="user_id_select" name="user_id"
|
||||
class="select2 form-control" required="required">
|
||||
@@ -220,7 +220,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 mb-2 businesstrip-div">
|
||||
<div class="col-lg-2 mb-2 businesstrip-div businesstrip-check-div ">
|
||||
|
||||
<div class="form-check text-center mt-1">
|
||||
<input class="form-check-input" type="checkbox" name="businesstrip"
|
||||
@@ -235,6 +235,31 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
|
||||
placeholder="Ort"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
<div class="col-lg-2 car-div car-div-car" style="display:none">
|
||||
|
||||
<select id="timerecordingCar_id" name="timerecordingCar_id"
|
||||
class="select2 form-control">
|
||||
<option value="">Auto auswählen</option>
|
||||
<?php foreach ($timerecordingCars as $timerecordingCar): ?>
|
||||
|
||||
<option value="<?= $timerecordingCar->id ?>"
|
||||
data-mileagenow="<?= $timerecordingCar->mileage_now ?>"><?= $timerecordingCar->number_plate . " (" . $timerecordingCar->brand." ".$timerecordingCar->model . ")" ?></option>
|
||||
</option>
|
||||
<?php
|
||||
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-1 car-div " style="display:none">
|
||||
<input style="" type="text" id="mileage_start" name="mileage_start"
|
||||
placeholder="KM Start"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
<div class="col-lg-1 car-div" style="display:none">
|
||||
<input style="" type="text" id="mileage_end" name="mileage_end"
|
||||
placeholder="KM Ende"
|
||||
class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" row mt-2">
|
||||
|
||||
@@ -40,9 +40,11 @@
|
||||
<?php if ($me->can('Fibu')): ?>
|
||||
<li><a href="<?=self::getUrl("TimerecordingPermit")?>"><i class="far fa-fw fa-calendar-check text-info"></i> Freigaben</a></li>
|
||||
<li><a href="<?=self::getUrl("TimerecordingReport")?>"><i class="far fa-fw fa-chart-pie text-info"></i> Auswertung/Korrektur</a></li>
|
||||
<li><a href="<?=self::getUrl("TimerecordingBilling")?>"><i class="far fa-fw fa-money-bill-1-wave text-info"></i> Verrechnung</a></li>
|
||||
<li><a href="<?=self::getUrl("TimerecordingCategory")?>"><i class="far fa-fw fa-list text-info"></i> Buchungsarten</a></li>
|
||||
<li><a href="<?=self::getUrl("TimerecordingHoliday")?>"><i class="far fa-fw fa-umbrella-beach text-info"></i> Feiertage</a></li>
|
||||
<li><a href="<?=self::getUrl("TimerecordingEmployee")?>"><i class="far fa-fw fa-user text-info"></i> Personaladministration</a></li>
|
||||
<li><a href="<?=self::getUrl("TimerecordingCar")?>"><i class="far fa-fw fa-sharp fa-regular fa-cars text-info"></i> Fahrzeugverwaltung</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -96,6 +98,9 @@
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","lineworker"]) && $me->can("Linework")): ?><li><a href="<?=self::getUrl("Linework")?>"><i class="fas fa-fw fa-ethernet text-info"></i> Leitungsbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","netoperator","lineworker"]) && $me->can("Patching")): ?><li class="has-sub-submenu"><a href="<?=self::getUrl("Patching")?>"><i class="fas fa-fw fa-plug text-info"></i> Patchungen</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","lineplanner","pipeworker","netoperator","lineworker"]) && $me->can("Filestore")): ?><li><a href="<?=self::getUrl("Filestore")?>"><i class="fas fa-fw fa-file text-info"></i> Dateiablage</a></li><?php endif; ?>
|
||||
<!-- //Vorbereitend für Faserplanung --><?php //if($me->is(["Admin","netowner","pipeplanner","pipeplanner"]) && $me->is("employee")): ?><!--<li><a href="--><?php //=self::getUrl("FiberPlanDispatcher")?><!--"><i class="fas fa-building-circle-arrow-right text-info"></i> Verteiler und Schächte</a></li>--><?php //endif; ?>
|
||||
<!-- //Vorbereitend für Faserplanung --><?php //if($me->is(["Admin","netowner","lineplanner","lineworker"]) && $me->is("employee")): ?><!--<li><a href="--><?php //=self::getUrl("FiberPlanPipe")?><!--"><i class="fas fa-pipe text-info pl-1"></i> Rohrverzeichnis</a></li>--><?php //endif; ?>
|
||||
<!-- //Vorbereitend für Faserplanung --><?php //if($me->is(["Admin","netowner","lineplanner","lineworker"]) && $me->is("employee")): ?><!--<li><a href="--><?php //=self::getUrl("FiberPlanCable")?><!--"><i class="fas fa-pipe text-info pl-1"></i> Kabelverzeichnis</a></li>--><?php //endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user