Zeiterfassung Update
* Transfer Überstunden50/100,Mehrstunden20 zurück in Gutstunden/Mehrstunden * Textuelle Anzeige von transferierten Stunden * Kalender Anzeige verbesserungen * Offene Krankenstände werden virtuell 2 Wochen in die Zukunft angezeit im Kalender
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||||
type="text/css"/>
|
type="text/css"/>
|
||||||
<style>
|
<style>
|
||||||
@@ -11,16 +12,52 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fa-arrow-to-left {
|
||||||
|
color: #d12222;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 16px;
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
left: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-arrow-from-left {
|
||||||
|
color: #2238d1;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 16px;
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.filler {
|
.filler {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.filler-left {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.filler-0 {
|
.filler-0 {
|
||||||
width: 7px;
|
width: 7px;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.filler-1 {
|
||||||
|
width: 10px;
|
||||||
|
height: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.min-w-70 {
|
||||||
|
min-width: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.min-w-100 {
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
#overtimeModal .table td, #overtimeModal .table th {
|
#overtimeModal .table td, #overtimeModal .table th {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
@@ -31,6 +68,34 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sm-text-left {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 5px;
|
||||||
|
position: absolute;
|
||||||
|
top: 18px;
|
||||||
|
|
||||||
|
color: #008b0b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sm-text-right-ot {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 5px;
|
||||||
|
position: absolute;
|
||||||
|
top: 18px;
|
||||||
|
right: 30px;
|
||||||
|
|
||||||
|
color: #008b0b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sm-text-right {
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 5px;
|
||||||
|
position: absolute;
|
||||||
|
top: 18px;
|
||||||
|
right: 30px;
|
||||||
|
color: #f1556c;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<!-- start page title -->
|
<!-- start page title -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -64,19 +129,19 @@
|
|||||||
<th class="text-center">Mitarbeiter/PersNr.</th>
|
<th class="text-center">Mitarbeiter/PersNr.</th>
|
||||||
<th class="text-center">Leistungszeiten</th>
|
<th class="text-center">Leistungszeiten</th>
|
||||||
<th class="text-center">Nichtleistungszeiten</th>
|
<th class="text-center">Nichtleistungszeiten</th>
|
||||||
<th class="text-center">Istst.(NLZ+LZ)</th>
|
<th class="text-center">NLZ+LZ</th>
|
||||||
<th class="text-center">Sollstunden</th>
|
<th class="text-center">Sollst.</th>
|
||||||
<th class="text-center">Sollabweichung</th>
|
<th class="text-center">Sollabweichung</th>
|
||||||
<th class="text-center">Mehrstunden</th>
|
<th class="text-center min-w-100">Mehrst.</th>
|
||||||
<th class="text-center">Ges. Überst.</th>
|
<th class="text-center min-w-100">Ges. Überst.</th>
|
||||||
<?php if ($me->superexpertEnabled()): ?>
|
<?php if ($me->superexpertEnabled()): ?>
|
||||||
<th class="text-center">Black P. Stunden</th>
|
<th class="text-center min-w-70">Black P. St.</th>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<th title="Mehrstunden 25%" class="text-center">M25</th>
|
<th title="Mehrstunden 25%" class="text-center min-w-70">M25</th>
|
||||||
<th title="Überstunden 50%" class="text-center">Ü50</th>
|
<th title="Überstunden 50%" class="text-center min-w-70">Ü50</th>
|
||||||
<th title="Überstunden 100%" class="text-center">Ü100</th>
|
<th title="Überstunden 100%" class="text-center min-w-70">Ü100</th>
|
||||||
<th class="text-center">Diäten</th>
|
<th class="text-center">Diäten</th>
|
||||||
<th class="text-center">Homeoffice</th>
|
<th class="text-center">HO</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="filterrow">
|
<tr id="filterrow">
|
||||||
<th></th>
|
<th></th>
|
||||||
@@ -115,33 +180,50 @@
|
|||||||
} else {
|
} else {
|
||||||
$nlz = "";
|
$nlz = "";
|
||||||
}
|
}
|
||||||
|
if ($timerecording->transfer_overtime > 0) {
|
||||||
|
$overtimeclass = "sm-text-right";
|
||||||
|
} else {
|
||||||
|
$overtimeclass = "sm-text-right-ot";
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-nowrap">(<?= $employee_number ?>) <?= $timerecording->timerecordingEmployee->user->name ?> </td>
|
<td class="text-nowrap">(<?= $employee_number ?>
|
||||||
|
) <?= $timerecording->timerecordingEmployee->user->name ?> </td>
|
||||||
<td class="text-center"><?= number_format(round($timerecording->ishours / 3600, 2), "2", ",", ".") ?></td>
|
<td class="text-center"><?= number_format(round($timerecording->ishours / 3600, 2), "2", ",", ".") ?></td>
|
||||||
<td class="text-center"><?= $nlz ?></td>
|
<td class="text-center"><?= $nlz ?></td>
|
||||||
<td class="text-center"><?= number_format(round($timerecording->ishourssum / 3600, 2), "2", ",", ".") ?></td>
|
<td class="text-center"><?= number_format(round($timerecording->ishourssum / 3600, 2), "2", ",", ".") ?></td>
|
||||||
<td class="text-center"><?= number_format(round($timerecording->musthours / 3600, 2), "2", ",", ".") ?></td>
|
<td class="text-center"><?= number_format(round($timerecording->musthours / 3600, 2), "2", ",", ".") ?></td>
|
||||||
<td class="text-center overtimeplushours-td" data-overtimeplushours="<?= number_format(round(($timerecording->overtime_plushours) / 3600, 2), "2", ",", ".") ?>"><?= number_format(round(($timerecording->ishourssum-$timerecording->musthours) / 3600, 2), "2", ",", ".") ?> <span class="text-danger font-weight-500"><?= ($timerecording->overtime_plushours) ? "(".number_format(round(($timerecording->overtime_plushours) / 3600, 2), "2", ",", ".").")" : '' ?></span></td>
|
<td data-order="<?= $timerecording->overtime_plushours ?>"
|
||||||
|
class="text-center overtimeplushours-td"
|
||||||
<td class="text-center"><?= ($timerecording->plushours_all == 0) ? '<div class="filler-0 float-left"></div>' : '' ?><?= number_format(round(($timerecording->plushours_all) / 3600, 2), "2", ",", ".") ?>
|
data-overtimeplushours="<?= number_format(round(($timerecording->overtime_plushours) / 3600, 2), "2", ",", ".") ?>"><?= number_format(round(($timerecording->ishourssum - $timerecording->musthours) / 3600, 2), "2", ",", ".") ?>
|
||||||
<?= ($timerecording->plushours_all > 0) ? '<i class="float-right fa-regular fa-arrow-right-from-bracket change-difference" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round(($timerecording->plushours_all) / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '<div class="filler float-right"></div>' ?></td>
|
<span class="text-danger font-weight-500"><?= ($timerecording->overtime_plushours) ? "(" . number_format(round(($timerecording->overtime_plushours) / 3600, 2), "2", ",", ".") . ")" : '' ?></span>
|
||||||
<td class="text-center"><?= ($timerecording->timerecordingEmployee->overtime_now == 0) ? '<div class="filler-0 float-left"></div>' : '' ?><?= number_format(round($timerecording->timerecordingEmployee->overtime_now / 3600, 2), "2", ",", ".") ?>
|
</td>
|
||||||
<?= ($timerecording->timerecordingEmployee->overtime_now > 0) ? '<i class="float-right fa-regular fa-arrow-right-from-bracket change-overtime" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round($timerecording->timerecordingEmployee->overtime_now / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '<div class="filler float-right"></div>' ?></td>
|
<td data-order="<?= $timerecording->plushours_all ?>"
|
||||||
|
data-transfer="<?= round($timerecording->transfer_plushours / 3600, 2) ?>"
|
||||||
|
class="text-center transfer_plushours_info position-relative"><?= '<span class="filler-left">' . number_format(round($timerecording->plushours_all / 3600, 2), "2", ",", ".") ?></span><?= ($timerecording->plushours_all > 0) ? '<i class="fas fa-arrow-from-left change-difference" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round($timerecording->plushours_all / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '' ?><?= ($timerecording->transfer_plushours) ? '<span class="sm-text-right ">' . round($timerecording->transfer_plushours * -1 / 3600, 2) . '</span>' : '' ?></td>
|
||||||
|
<td data-transfer="<?= round($timerecording->transfer_overtime / 3600, 2) ?>"
|
||||||
|
data-order="<?= $timerecording->timerecordingEmployee->overtime_now ?>"
|
||||||
|
class="text-center position-relative transfer_overtime_info"><?= '<span class="filler-left">' . number_format(round($timerecording->timerecordingEmployee->overtime_now / 3600, 2), "2", ",", ".") ?></span><?= ($timerecording->timerecordingEmployee->overtime_now > 0) ? '<i class="fas fa-arrow-from-left change-overtime" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round($timerecording->timerecordingEmployee->overtime_now / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '' ?><?= ($timerecording->transfer_overtime) ? '<span class=" ' . $overtimeclass . '">' . round($timerecording->transfer_overtime * -1 / 3600, 2) . '</span>' : '' ?></span></td>
|
||||||
<?php if ($me->superexpertEnabled()): ?>
|
<?php if ($me->superexpertEnabled()): ?>
|
||||||
<td class="text-center"><?= number_format(round($timerecording->timerecordingEmployee->bpahours / 3600, 2), "2", ",", ".") ?></td>
|
<td data-order="<?= $timerecording->timerecordingEmployee->bpahours ?>"
|
||||||
|
class="text-center position-relative"><?= ($timerecording->transfer_bpahours * -1 > 0) ? '<i class="fas fa-arrow-to-left change-bpa" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round($timerecording->transfer_bpahours * -1 / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '' ?> <?= '<span class="filler-left">' . number_format(round($timerecording->timerecordingEmployee->bpahours / 3600, 2), "2", ",", ".") ?><?= ($timerecording->transfer_bpahours) ? '<span class="sm-text-left">' . (round($timerecording->transfer_bpahours * -1 / 3600, 2)) . '</span>' : '' ?> </span></td>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<td class="text-center"><?= number_format(round($timerecording->plushours25 / 3600, 2), "2", ",", ".") ?></td>
|
<td data-order="<?= $timerecording->plushours25 ?>"
|
||||||
<td class="text-center"><?= number_format(round($timerecording->overtime50free / 3600, 2), "2", ",", ".") ?></td>
|
class="text-center position-relative"><?= ($timerecording->plushours25 > 0) ? '<i class="fas fa-arrow-to-left change-overtime-25" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round($timerecording->plushours25 / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '' ?> <?= '<span class="filler-left">' . number_format(round($timerecording->plushours25 / 3600, 2), "2", ",", ".") ?></span></td>
|
||||||
<td class="text-center"><?= number_format(round($timerecording->overtime100free / 3600, 2), "2", ",", ".") ?></td>
|
<td data-order="<?= $timerecording->overtime50free ?>"
|
||||||
<td class="text-center"><?= number_format($timerecording->diet, 2, ',', '.') . " €" ?></td>
|
class="text-center position-relative"><?= ($timerecording->overtime50free > 0) ? '<i class="fas fa-arrow-to-left change-overtime-50" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round($timerecording->overtime50free / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '' ?> <?= '<span class="filler-left">' . number_format(round($timerecording->overtime50free / 3600, 2), "2", ",", ".") ?></span></td>
|
||||||
<td class="text-center"><?= $timerecording->homeoffice ?> Tag(e)</td>
|
<td data-order="<?= $timerecording->overtime100free ?>"
|
||||||
|
class="text-center position-relative"><?= ($timerecording->overtime100free > 0) ? '<i class="fas fa-arrow-to-left change-overtime-100" data-toggle="modal" data-target="#overtimeModal" data-hours="' . number_format(round($timerecording->overtime100free / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '' ?> <?= '<span class="filler-left">' . number_format(round($timerecording->overtime100free / 3600, 2), "2", ",", ".") ?></span></td>
|
||||||
|
<td data-order="<?= $timerecording->diet ?>"
|
||||||
|
class="text-center"><?= number_format($timerecording->diet, 2, ',', '.') . " €" ?></td>
|
||||||
|
<td class="text-center"><?= $timerecording->homeoffice ?> T</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="spinner-big text-info mt-3 ml-5" style="display: none">
|
<div class="spinner-big text-info mt-3 ml-5" style="display: none">
|
||||||
<i class="fas fa-spinner fa-spin spinner-ico font-24 align-middle "></i> <span class="text-dark ml-2 font-weight-500 font-18 d-inline-block">Monatsabschluss wird rückgängig gemacht...</span>
|
<i class="fas fa-spinner fa-spin spinner-ico font-24 align-middle "></i> <span
|
||||||
|
class="text-dark ml-2 font-weight-500 font-18 d-inline-block">Monatsabschluss wird rückgängig gemacht...</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -165,32 +247,38 @@
|
|||||||
<table class="table ">
|
<table class="table ">
|
||||||
<tr id="overtimes">
|
<tr id="overtimes">
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="overtime-modal-div" style="display:none">
|
<tr class="transfer-tr transfer-tr tr-plushours" style="display: none">
|
||||||
<th class="align-middle">Gutstundenkonto</th>
|
<th class="text-nowrap align-middle">Mehrstunden <span class="info"></span></th>
|
||||||
|
<td><input type="number" step="any" class="form-control change-overtime-value"
|
||||||
|
name="plushours"
|
||||||
|
id="plushours"></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="overtime-modal-div transfer-tr tr-overtimehours" style="display:none">
|
||||||
|
<th class="align-middle">Gutstunden <span class="info"></span></th>
|
||||||
<td><input type="number" step="any" class="form-control change-overtime-value"
|
<td><input type="number" step="any" class="form-control change-overtime-value"
|
||||||
name="overtimehours"
|
name="overtimehours"
|
||||||
id="overtimehours"></td>
|
id="overtimehours"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="overtime-modal-div" style="display:none">
|
<tr class="overtime-modal-div transfer-tr tr-plushours25" style="display:none">
|
||||||
<th class="align-middle">Mehrstunden 25</th>
|
<th class="align-middle">Mehrstunden 25</th>
|
||||||
<td><input type="number" step="any" class="form-control change-overtime-value"
|
<td><input type="number" step="any" class="form-control change-overtime-value"
|
||||||
name="plushours25"
|
name="plushours25"
|
||||||
id="plushours25"></td>
|
id="plushours25"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="transfer-tr tr-overtime50">
|
||||||
<th class="align-middle">Überstunden 50</th>
|
<th class="align-middle">Überstunden 50</th>
|
||||||
<td><input type="number" step="any" class="form-control change-overtime-value"
|
<td><input type="number" step="any" class="form-control change-overtime-value"
|
||||||
name="overtime50"
|
name="overtime50"
|
||||||
id="overtime50"></td>
|
id="overtime50"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="transfer-tr tr-overtime100">
|
||||||
<th class="text-nowrap align-middle">Überstunden 100</th>
|
<th class="text-nowrap align-middle">Überstunden 100</th>
|
||||||
<td><input type="number" step="any" class="form-control change-overtime-value"
|
<td><input type="number" step="any" class="form-control change-overtime-value"
|
||||||
name="overtime100"
|
name="overtime100"
|
||||||
id="overtime100"></td>
|
id="overtime100"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if ($me->superexpertEnabled()): ?>
|
<?php if ($me->superexpertEnabled()): ?>
|
||||||
<tr>
|
<tr class="transfer-tr tr-overtimebpa">
|
||||||
<th class="text-nowrap align-middle ">Blackpig</th>
|
<th class="text-nowrap align-middle ">Blackpig</th>
|
||||||
<td><input type="number" step="any" class="form-control change-overtime-value"
|
<td><input type="number" step="any" class="form-control change-overtime-value"
|
||||||
name="overtimebpa"
|
name="overtimebpa"
|
||||||
@@ -246,7 +334,11 @@
|
|||||||
});
|
});
|
||||||
$('#overtimeModal').on('show.bs.modal', function (event) {
|
$('#overtimeModal').on('show.bs.modal', function (event) {
|
||||||
var button = $(event.relatedTarget);
|
var button = $(event.relatedTarget);
|
||||||
console.log(button.closest('tr').html());
|
|
||||||
|
$('.change-overtime-value').val('');
|
||||||
|
$('.change-overtime-value').attr('max', '');
|
||||||
|
$('.info').text('');
|
||||||
|
$('.transfer-tr').hide();
|
||||||
if (button.hasClass('change-difference')) {
|
if (button.hasClass('change-difference')) {
|
||||||
$('#overtimeModal-title').text('Mehrstunden Transfer');
|
$('#overtimeModal-title').text('Mehrstunden Transfer');
|
||||||
$('#overtimeModal').data('id', button.data('id'));
|
$('#overtimeModal').data('id', button.data('id'));
|
||||||
@@ -257,20 +349,68 @@
|
|||||||
} else {
|
} else {
|
||||||
var overtimeplushourstext = "";
|
var overtimeplushourstext = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$('#overtimes').html('<th>Mehrstunden:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + overtimeplushourstext + '</td>');
|
$('#overtimes').html('<th>Mehrstunden:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + overtimeplushourstext + '</td>');
|
||||||
$('#submit-button').data('type', 'difference');
|
$('#submit-button').data('type', 'difference');
|
||||||
$('.overtime-modal-div').show();
|
$('.tr-plushours25').show();
|
||||||
}
|
$('.tr-overtimehours').show();
|
||||||
if (button.hasClass('change-overtime')) {
|
$('.tr-overtimebpa').show();
|
||||||
|
$('.tr-overtime50').show();
|
||||||
|
$('.tr-overtime100').show();
|
||||||
|
} else if (button.hasClass('change-overtime')) {
|
||||||
$('#overtimeModal-title').text('Überstunden Transfer');
|
$('#overtimeModal-title').text('Überstunden Transfer');
|
||||||
$('#overtimes').html('<th>Überstunden:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + '</td>');
|
$('#overtimes').html('<th>Überstunden:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + '</td>');
|
||||||
$('#submit-button').data('type', 'overtime');
|
$('#submit-button').data('type', 'overtime');
|
||||||
$('#overtimeModal').data('id', button.data('id'));
|
$('#overtimeModal').data('id', button.data('id'));
|
||||||
$('.overtime-modal-div').hide();
|
$('.tr-overtime50').show();
|
||||||
|
$('.tr-overtimebpa').show();
|
||||||
|
$('.tr-overtime100').show();
|
||||||
|
} else if (button.hasClass('change-overtime-25')) {
|
||||||
|
$('.tr-plushours').show();
|
||||||
|
$('.tr-plushours').find('.info').text('(' + button.closest('tr').find('.transfer_plushours_info').data('transfer') + ')');
|
||||||
|
$('.tr-overtimehours').show();
|
||||||
|
$('.tr-overtimehours').find('.info').text('(' + button.closest('tr').find('.transfer_overtime_info').data('transfer') + ')');
|
||||||
|
$('#plushours').attr('max', button.closest('tr').find('.transfer_plushours_info').data('transfer'));
|
||||||
|
$('#overtimehours').attr('max', button.closest('tr').find('.transfer_overtime_info').data('transfer'));
|
||||||
|
$('#overtimeModal-title').text('Mehrstunden 25% Transfer');
|
||||||
|
$('#overtimes').html('<th>Mehrst. 25%:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + '</td>');
|
||||||
|
$('#submit-button').data('type', 'plushours25');
|
||||||
|
$('#overtimeModal').data('id', button.data('id'));
|
||||||
|
} else if (button.hasClass('change-overtime-50')) {
|
||||||
|
$('.tr-plushours').show();
|
||||||
|
$('.tr-plushours').find('.info').text('(' + button.closest('tr').find('.transfer_plushours_info').data('transfer') + ')');
|
||||||
|
$('.tr-overtimehours').show();
|
||||||
|
$('.tr-overtimehours').find('.info').text('(' + button.closest('tr').find('.transfer_overtime_info').data('transfer') + ')');
|
||||||
|
$('#plushours').attr('max', button.closest('tr').find('.transfer_plushours_info').data('transfer'));
|
||||||
|
$('#overtimehours').attr('max', button.closest('tr').find('.transfer_overtime_info').data('transfer'));
|
||||||
|
$('#overtimeModal-title').text('Überstunden 50% Transfer');
|
||||||
|
$('#overtimes').html('<th>Überst. 50%:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + '</td>');
|
||||||
|
$('#submit-button').data('type', 'overtime50free');
|
||||||
|
$('#overtimeModal').data('id', button.data('id'));
|
||||||
|
} else if (button.hasClass('change-overtime-100')) {
|
||||||
|
$('.tr-plushours').show();
|
||||||
|
$('.tr-plushours').find('.info').text('(' + button.closest('tr').find('.transfer_plushours_info').data('transfer') + ')');
|
||||||
|
$('.tr-overtimehours').show();
|
||||||
|
$('.tr-overtimehours').find('.info').text('(' + button.closest('tr').find('.transfer_overtime_info').data('transfer') + ')');
|
||||||
|
$('#plushours').attr('max', button.closest('tr').find('.transfer_plushours_info').data('transfer'));
|
||||||
|
$('#overtimehours').attr('max', button.closest('tr').find('.transfer_overtime_info').data('transfer'));
|
||||||
|
$('#overtimeModal-title').text('Überstunden 100% Transfer');
|
||||||
|
$('#overtimes').html('<th>Überst.100%:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + '</td>');
|
||||||
|
$('#submit-button').data('type', 'overtime100free');
|
||||||
|
$('#overtimeModal').data('id', button.data('id'));
|
||||||
|
} else if (button.hasClass('change-bpa')) {
|
||||||
|
$('.tr-plushours').show();
|
||||||
|
$('.tr-plushours').find('.info').text('(' + button.closest('tr').find('.transfer_plushours_info').data('transfer') + ')');
|
||||||
|
$('.tr-overtimehours').show();
|
||||||
|
$('.tr-overtimehours').find('.info').text('(' + button.closest('tr').find('.transfer_overtime_info').data('transfer') + ')');
|
||||||
|
$('#plushours').attr('max', button.closest('tr').find('.transfer_plushours_info').data('transfer'));
|
||||||
|
$('#overtimehours').attr('max', button.closest('tr').find('.transfer_overtime_info').data('transfer'));
|
||||||
|
$('#overtimeModal-title').text('Black P. Transfer');
|
||||||
|
$('#overtimes').html('<th>Black P:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + '</td>');
|
||||||
|
$('#submit-button').data('type', 'bpa');
|
||||||
|
$('#overtimeModal').data('id', button.data('id'));
|
||||||
}
|
}
|
||||||
$('.change-overtime-value').val('');
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('body').on('click', '#month-abort', function () {
|
$('body').on('click', '#month-abort', function () {
|
||||||
@@ -287,15 +427,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
$('body').on('change keyup ', '.change-overtime-value', function () {
|
||||||
$('body').on('change', '.change-overtime-value', function () {
|
|
||||||
//$('#overtime-hours').data('hours') to float
|
//$('#overtime-hours').data('hours') to float
|
||||||
|
|
||||||
|
|
||||||
var difference = 0;
|
var difference = 0;
|
||||||
|
|
||||||
$(".change-overtime-value").each(function (index) {
|
$(".change-overtime-value").each(function (index) {
|
||||||
//check if float
|
//check if float
|
||||||
var value = $(this).val().replace(",", ".");
|
var value = $(this).val().replace(",", ".");
|
||||||
// console.log(value);
|
if ($(this).attr('max') != '') {
|
||||||
|
if (parseFloat(value) > parseFloat($(this).attr('max'))) {
|
||||||
|
$(this).val($(this).attr('max'));
|
||||||
|
}
|
||||||
|
}
|
||||||
if (isNaN(parseFloat(value))) {
|
if (isNaN(parseFloat(value))) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -304,13 +449,11 @@
|
|||||||
});
|
});
|
||||||
var valdiff = difference - parseFloat($(this).val());
|
var valdiff = difference - parseFloat($(this).val());
|
||||||
valdiff = Math.round(valdiff * 100) / 100;
|
valdiff = Math.round(valdiff * 100) / 100;
|
||||||
console.log("valdif" + valdiff);
|
|
||||||
var hours = $('#overtime-hours').data('hours').replace(",", ".");
|
var hours = $('#overtime-hours').data('hours').replace(",", ".");
|
||||||
|
|
||||||
if (parseFloat(hours) < difference) {
|
if (parseFloat(hours) < difference) {
|
||||||
difference = difference - parseFloat(hours)
|
difference = difference - parseFloat(hours)
|
||||||
difference = Math.round(difference * 100) / 100;
|
difference = Math.round(difference * 100) / 100;
|
||||||
console.log(difference);
|
|
||||||
if (valdiff == 0) {
|
if (valdiff == 0) {
|
||||||
$(this).val(hours);
|
$(this).val(hours);
|
||||||
} else if (valdiff == parseFloat(hours)) {
|
} else if (valdiff == parseFloat(hours)) {
|
||||||
@@ -328,6 +471,7 @@
|
|||||||
$('body').on('click', '#submit-button', function () {
|
$('body').on('click', '#submit-button', function () {
|
||||||
var id = $('#overtimeModal').data('id');
|
var id = $('#overtimeModal').data('id');
|
||||||
var plushours25 = $('#plushours25').val();
|
var plushours25 = $('#plushours25').val();
|
||||||
|
var plushours = $('#plushours').val();
|
||||||
var overtime50 = $('#overtime50').val();
|
var overtime50 = $('#overtime50').val();
|
||||||
var overtime100 = $('#overtime100').val();
|
var overtime100 = $('#overtime100').val();
|
||||||
var overtimebpa = $('#overtimebpa').val();
|
var overtimebpa = $('#overtimebpa').val();
|
||||||
@@ -335,6 +479,7 @@
|
|||||||
$.post("<?= self::getUrl("TimerecordingBilling", "api", ['do' => 'saveovertime']) ?>", {
|
$.post("<?= self::getUrl("TimerecordingBilling", "api", ['do' => 'saveovertime']) ?>", {
|
||||||
id: id,
|
id: id,
|
||||||
type: $(this).data('type'),
|
type: $(this).data('type'),
|
||||||
|
plushours: plushours,
|
||||||
plushours25: plushours25,
|
plushours25: plushours25,
|
||||||
overtimehours: overtimehours,
|
overtimehours: overtimehours,
|
||||||
overtime50: overtime50,
|
overtime50: overtime50,
|
||||||
@@ -343,32 +488,8 @@
|
|||||||
ajax: 1
|
ajax: 1
|
||||||
}).done(function (data) {
|
}).done(function (data) {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
ö
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
//$.post(insertUrl, {
|
|
||||||
// id: $.trim($('#id').val()),
|
|
||||||
// timerecordingCategory_id: $.trim($('#timerecordingCategory_id').val()),
|
|
||||||
// date: $.trim($('#date').val()),
|
|
||||||
// enddate: $.trim($('#enddate').val()),
|
|
||||||
// start: $.trim($('#start').val()),
|
|
||||||
// end: $.trim($('#end').val()),
|
|
||||||
// comment: $.trim($('#comment').val()),
|
|
||||||
// businesstrip: businesstrip,
|
|
||||||
// businesstrip_info: $.trim($('#businesstrip_info').val()),
|
|
||||||
// timerecordingCar_id: $.trim($('#timerecordingCar_id').val()),
|
|
||||||
// mileage_start: $.trim($('#mileage_start').val()),
|
|
||||||
// mileage_end: $.trim($('#mileage_end').val()),
|
|
||||||
// homeoffice: homeoffice,
|
|
||||||
// hourday: $.trim($('#timerecordingCategory_id').find(':selected').data('hourday')),
|
|
||||||
// ajax: 1
|
|
||||||
//}).done(function (data) {
|
|
||||||
// if (data.success) {
|
|
||||||
// window.location.href = '<?php //= self::getUrl("Timerecording") ?>//';
|
|
||||||
// } else {
|
|
||||||
// $('#error').html(data.error);
|
|
||||||
// }
|
|
||||||
//});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
|
|||||||
@@ -152,6 +152,13 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fc .fc-daygrid-day.fc-day-today {
|
||||||
|
background-color: rgb(239 240 255);
|
||||||
|
}
|
||||||
|
.fc-event-title {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
src="<?= self::getResourcePath() ?>assets/js/calendar/moment/moment.min.js?<?= date('U') ?>"></script>
|
src="<?= self::getResourcePath() ?>assets/js/calendar/moment/moment.min.js?<?= date('U') ?>"></script>
|
||||||
@@ -209,7 +216,7 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
|
|||||||
$.getJSON(requestUrl, function (data) {
|
$.getJSON(requestUrl, function (data) {
|
||||||
|
|
||||||
}).done(function (json) {
|
}).done(function (json) {
|
||||||
var bgcolors = ['rgba(251, 71, 71,0.2)', 'rgba(253, 126, 20, 0.25)', 'rgba(91, 71, 251, 0.2)', 'rgba(71, 251, 151, 0.2)', 'rgba(251, 71, 194, 0.2)', 'rgba(20, 251, 253, 0.25)'];
|
var bgcolors = ['rgb(71 93 251 / 34%)', 'rgb(228 187 249 / 65%)', 'rgb(243 251 117 / 68%)', 'rgb(71 251 176 / 68%)', 'rgb(119 206 247 / 65%)', 'rgb(251 196 71 / 68%)','rgb(251 171 216 / 69%)','rgb(152 155 243 / 65%)','rgb(243 152 109 / 68%)','rgb(255 187 187 / 65%)','rgb(131 245 60 / 68%)','rgb(144 241 245 / 65%)'];
|
||||||
//read data from json
|
//read data from json
|
||||||
var json = json.data;
|
var json = json.data;
|
||||||
var holidays = [];
|
var holidays = [];
|
||||||
@@ -218,7 +225,7 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
|
|||||||
$.each(json, function (index, value) {
|
$.each(json, function (index, value) {
|
||||||
if (oldname != value.user.user) {
|
if (oldname != value.user.user) {
|
||||||
colorcount++;
|
colorcount++;
|
||||||
if (colorcount > 5) {
|
if (colorcount > 11) {
|
||||||
colorcount = 0;
|
colorcount = 0;
|
||||||
}
|
}
|
||||||
oldname = value.user.user;
|
oldname = value.user.user;
|
||||||
@@ -275,6 +282,7 @@ $daysgerm = array("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa");
|
|||||||
var calendarEl = document.getElementById('calendar');
|
var calendarEl = document.getElementById('calendar');
|
||||||
var calendar = new FullCalendar.Calendar(calendarEl, {
|
var calendar = new FullCalendar.Calendar(calendarEl, {
|
||||||
locale: 'de',
|
locale: 'de',
|
||||||
|
themeSystem: 'bootstrap4',
|
||||||
headerToolbar: {
|
headerToolbar: {
|
||||||
left: "prev,today,next",
|
left: "prev,today,next",
|
||||||
center: 'title',
|
center: 'title',
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ $daysSelect .= "</select>";
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row" style="display:none">
|
<div class="form-group row" style="">
|
||||||
<label class="col-lg-2 col-form-label" for="plushours">Initiale Gutstunden</label>
|
<label class="col-lg-2 col-form-label" for="plushours">Initiale Gutstunden</label>
|
||||||
<div class="col-lg-1">
|
<div class="col-lg-1">
|
||||||
<input type="text" id="plushours" name="plushours"
|
<input type="text" id="plushours" name="plushours"
|
||||||
@@ -161,7 +161,7 @@ $daysSelect .= "</select>";
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row" style="display:none">
|
<div class="form-group row" style="">
|
||||||
<label class="col-lg-2 col-form-label" for="overtime">Initiale Überstunden</label>
|
<label class="col-lg-2 col-form-label" for="overtime">Initiale Überstunden</label>
|
||||||
<div class="col-lg-1">
|
<div class="col-lg-1">
|
||||||
<input type="text" id="overtime" name="overtime"
|
<input type="text" id="overtime" name="overtime"
|
||||||
|
|||||||
@@ -690,6 +690,75 @@ class TimerecordingBillingController extends mfBaseController
|
|||||||
$timerecordingEmployee->update($dataemployee);
|
$timerecordingEmployee->update($dataemployee);
|
||||||
$timerecordingEmployee->save();
|
$timerecordingEmployee->save();
|
||||||
}
|
}
|
||||||
|
} else if ($type == "bpa") {
|
||||||
|
$sum = 0;
|
||||||
|
$data = [];
|
||||||
|
if ($this->request->plushours) {
|
||||||
|
$timerecordingbillingsemployee->timerecordingEmployee->id;
|
||||||
|
$timerecordingEmployee = new TimerecordingEmployee($timerecordingbillingsemployee->timerecordingEmployee->id);
|
||||||
|
$dataemployee = [];
|
||||||
|
$dataemployee['plushours_now'] = $timerecordingEmployee->plushours_now + $this->request->plushours * 3600;
|
||||||
|
$dataemployee['plushours'] = $timerecordingEmployee->plushours + $this->request->plushours * 3600;
|
||||||
|
$data['transfer_plushours'] = $timerecordingbillingsemployee->transfer_plushours - $this->request->plushours * 3600;
|
||||||
|
$data['plushours_all'] = $timerecordingbillingsemployee->plushours_all + $this->request->plushours * 3600;
|
||||||
|
$sum += $this->request->plushours * 3600;
|
||||||
|
$timerecordingEmployee->update($dataemployee);
|
||||||
|
$timerecordingEmployee->save();
|
||||||
|
}
|
||||||
|
if ($this->request->overtimehours) {
|
||||||
|
$timerecordingbillingsemployee->timerecordingEmployee->id;
|
||||||
|
$timerecordingEmployee = new TimerecordingEmployee($timerecordingbillingsemployee->timerecordingEmployee->id);
|
||||||
|
$dataemployee = [];
|
||||||
|
$dataemployee['overtime_now'] = $timerecordingEmployee->overtime_now + $this->request->overtimehours * 3600;
|
||||||
|
$dataemployee['overtime'] = $timerecordingEmployee->overtime + $this->request->overtimehours * 3600;
|
||||||
|
$data['transfer_overtime'] = $timerecordingbillingsemployee->transfer_overtime - $this->request->overtimehours * 3600;
|
||||||
|
$sum += $this->request->overtimehours * 3600;
|
||||||
|
$timerecordingEmployee->update($dataemployee);
|
||||||
|
$timerecordingEmployee->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($data) {
|
||||||
|
$data['transfer_bpahours'] = $timerecordingbillingsemployee->transfer_bpahours + $sum;
|
||||||
|
$timerecordingbillingsemployee->update($data);
|
||||||
|
$timerecordingbillingsemployee->save();
|
||||||
|
$dataemployee = [];
|
||||||
|
$dataemployee['bpahours'] = $timerecordingEmployee->bpahours - $sum;
|
||||||
|
$timerecordingEmployee->update($dataemployee);
|
||||||
|
$timerecordingEmployee->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if ($type == "plushours25" || $type == "overtime50free" || $type == "overtime100free") {
|
||||||
|
$sum = 0;
|
||||||
|
$data = [];
|
||||||
|
if ($this->request->plushours) {
|
||||||
|
$timerecordingbillingsemployee->timerecordingEmployee->id;
|
||||||
|
$timerecordingEmployee = new TimerecordingEmployee($timerecordingbillingsemployee->timerecordingEmployee->id);
|
||||||
|
$dataemployee = [];
|
||||||
|
$dataemployee['plushours_now'] = $timerecordingEmployee->plushours_now + $this->request->plushours * 3600;
|
||||||
|
$dataemployee['plushours'] = $timerecordingEmployee->plushours + $this->request->plushours * 3600;
|
||||||
|
$data['transfer_plushours'] = $timerecordingbillingsemployee->transfer_plushours - $this->request->plushours * 3600;
|
||||||
|
$data['plushours_all'] = $timerecordingbillingsemployee->plushours_all + $this->request->plushours * 3600;
|
||||||
|
$sum += $this->request->plushours * 3600;
|
||||||
|
$timerecordingEmployee->update($dataemployee);
|
||||||
|
$timerecordingEmployee->save();
|
||||||
|
}
|
||||||
|
if ($this->request->overtimehours) {
|
||||||
|
$timerecordingbillingsemployee->timerecordingEmployee->id;
|
||||||
|
$timerecordingEmployee = new TimerecordingEmployee($timerecordingbillingsemployee->timerecordingEmployee->id);
|
||||||
|
$dataemployee = [];
|
||||||
|
$dataemployee['overtime_now'] = $timerecordingEmployee->overtime_now + $this->request->overtimehours * 3600;
|
||||||
|
$dataemployee['overtime'] = $timerecordingEmployee->overtime + $this->request->overtimehours * 3600;
|
||||||
|
$data['transfer_overtime'] = $timerecordingbillingsemployee->transfer_overtime - $this->request->overtimehours * 3600;
|
||||||
|
$sum += $this->request->overtimehours * 3600;
|
||||||
|
$timerecordingEmployee->update($dataemployee);
|
||||||
|
$timerecordingEmployee->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($data) {
|
||||||
|
$data[$type] = $timerecordingbillingsemployee->{$type} - $sum;
|
||||||
|
$timerecordingbillingsemployee->update($data);
|
||||||
|
$timerecordingbillingsemployee->save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$response['state'] = "success";
|
$response['state'] = "success";
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ private $holidays ;
|
|||||||
$enddate = "";
|
$enddate = "";
|
||||||
$sum = "-";
|
$sum = "-";
|
||||||
$day = "";
|
$day = "";
|
||||||
|
$enddatecend="";
|
||||||
$orderdate = $timerecording->start;
|
$orderdate = $timerecording->start;
|
||||||
if ($timerecording->timerecordingCategory->hourday == 1) {
|
if ($timerecording->timerecordingCategory->hourday == 1) {
|
||||||
$date = date("d.m.Y", $timerecording->start);
|
$date = date("d.m.Y", $timerecording->start);
|
||||||
@@ -224,6 +225,7 @@ private $holidays ;
|
|||||||
$enddatetemp = date("Y-m-d", time());
|
$enddatetemp = date("Y-m-d", time());
|
||||||
$enddatetemp = strtotime($enddatetemp . " 23:59:59");
|
$enddatetemp = strtotime($enddatetemp . " 23:59:59");
|
||||||
$enddate = date("Y-m-d", $enddatetemp + 7200);
|
$enddate = date("Y-m-d", $enddatetemp + 7200);
|
||||||
|
$enddatecend= date("Y-m-d", $enddatetemp + 1216800);
|
||||||
$start = "-";
|
$start = "-";
|
||||||
$end = "-";
|
$end = "-";
|
||||||
$day = $daysgerm[date("w", $timerecording->start)];
|
$day = $daysgerm[date("w", $timerecording->start)];
|
||||||
@@ -355,6 +357,11 @@ private $holidays ;
|
|||||||
endif;
|
endif;
|
||||||
if ($datatype == 3 && ($timerecording->timerecordingCategory->hourday == 1 || $timerecording->timerecordingCategory->hourday == 7 || $timerecording->timerecordingCategory->hourday == 5)) {
|
if ($datatype == 3 && ($timerecording->timerecordingCategory->hourday == 1 || $timerecording->timerecordingCategory->hourday == 7 || $timerecording->timerecordingCategory->hourday == 5)) {
|
||||||
} else {
|
} else {
|
||||||
|
if (!$enddatecend)
|
||||||
|
{
|
||||||
|
$enddatecend=$enddate;
|
||||||
|
}
|
||||||
|
|
||||||
$rows[] = array(
|
$rows[] = array(
|
||||||
'user' => array('user' => $timerecording->user->name, 'order' => $timerecording->user->name),
|
'user' => array('user' => $timerecording->user->name, 'order' => $timerecording->user->name),
|
||||||
'date' => array('date' => $state . $day . " " . $date, 'order' => $orderdate),
|
'date' => array('date' => $state . $day . " " . $date, 'order' => $orderdate),
|
||||||
@@ -362,7 +369,7 @@ private $holidays ;
|
|||||||
'end' => array('end' => $end, 'order' => $end),
|
'end' => array('end' => $end, 'order' => $end),
|
||||||
'sum' => array('sum' => $sum, 'order' => $sum),
|
'sum' => array('sum' => $sum, 'order' => $sum),
|
||||||
'cstart' => array('cstart' => $datadate, 'order' => $datadate),
|
'cstart' => array('cstart' => $datadate, 'order' => $datadate),
|
||||||
'cend' => array('cend' => $enddate, 'order' => $enddate),
|
'cend' => array('cend' => $enddatecend, 'order' => $enddatecend),
|
||||||
'ccategory' => array('ccategory' => $timerecording->timerecordingCategory->name, 'order' => $timerecording->timerecordingCategory->name),
|
'ccategory' => array('ccategory' => $timerecording->timerecordingCategory->name, 'order' => $timerecording->timerecordingCategory->name),
|
||||||
'category' => array('category' => $category, 'order' => $timerecording->timerecordingCategory->name),
|
'category' => array('category' => $category, 'order' => $timerecording->timerecordingCategory->name),
|
||||||
'comment' => array('comment' => $timerecording->comment, 'order' => $timerecording->comment),
|
'comment' => array('comment' => $timerecording->comment, 'order' => $timerecording->comment),
|
||||||
|
|||||||
Reference in New Issue
Block a user