Merge branch 'spidev' into 'master'
Zeiterfassung Update Monatsabschluss/Verrechnung See merge request fronk/thetool!351
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="col-12" id="page-header">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Mitarbeiter</h4>
|
||||
</div>
|
||||
@@ -108,6 +108,9 @@
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<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 generiert...</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -135,6 +138,9 @@
|
||||
});
|
||||
$('body').on('click', '#month-complete', function () {
|
||||
if (confirm('Monat ' + $('#month').data('month') + ' wirklich abschließen?')) {
|
||||
$('#datatable_wrapper').hide();
|
||||
$('#page-header').hide();
|
||||
$('.spinner-big').show();
|
||||
$.post("<?= self::getUrl("TimerecordingBilling", "api", ['do' => 'completemonth']) ?>", {
|
||||
month: $.trim($('#month').data('month')),
|
||||
ajax: 1
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="col-12" id="page-header">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Mitarbeiter</h4>
|
||||
</div>
|
||||
@@ -64,15 +64,17 @@
|
||||
<th class="text-center">Mitarbeiter/PersNr.</th>
|
||||
<th class="text-center">Leistungszeiten</th>
|
||||
<th class="text-center">Nichtleistungszeiten</th>
|
||||
<th class="text-center">Iststunden (NLZ+LZ)</th>
|
||||
<th class="text-center">Istst.(NLZ+LZ)</th>
|
||||
<th class="text-center">Sollstunden</th>
|
||||
<th class="text-center">Sollabweichung</th>
|
||||
<th class="text-center">Gesamt Überstunden</th>
|
||||
<th class="text-center">Mehrstunden</th>
|
||||
<th class="text-center">Ges. Überst.</th>
|
||||
<?php if ($me->superexpertEnabled()): ?>
|
||||
<th class="text-center">Black P. Stunden</th>
|
||||
<?php endif; ?>
|
||||
<th class="text-center">Ü50</th>
|
||||
<th class="text-center">Ü100</th>
|
||||
<th title="Mehrstunden 25%" class="text-center">M25</th>
|
||||
<th title="Überstunden 50%" class="text-center">Ü50</th>
|
||||
<th title="Überstunden 100%" class="text-center">Ü100</th>
|
||||
<th class="text-center">Diäten</th>
|
||||
<th class="text-center">Homeoffice</th>
|
||||
</tr>
|
||||
@@ -83,6 +85,7 @@
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<?php if ($me->superexpertEnabled()): ?>
|
||||
<th></th>
|
||||
<?php endif; ?>
|
||||
@@ -91,6 +94,7 @@
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -113,19 +117,21 @@
|
||||
}
|
||||
?>
|
||||
<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"><?= $nlz ?></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"><?= (($timerecording->ishourssum - $timerecording->musthours) == 0) ? '<div class="filler-0 float-left"></div>' : '' ?><?= number_format(round(($timerecording->ishourssum - $timerecording->musthours) / 3600, 2), "2", ",", ".") ?>
|
||||
<?= (($timerecording->ishourssum - $timerecording->musthours) > 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->ishourssum - $timerecording->musthours) / 3600, 2), "2", ",", ".") . '" data-id="' . $timerecording->id . '"></i>' : '<div class="filler float-right"></div>' ?></td>
|
||||
<td class="text-center"><?= number_format(round(($timerecording->ishourssum-$timerecording->musthours) / 3600, 2), "2", ",", ".") ?></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", ",", ".") ?>
|
||||
<?= ($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>
|
||||
<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", ",", ".") ?>
|
||||
<?= ($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>
|
||||
<?php if ($me->superexpertEnabled()): ?>
|
||||
<td class="text-center"><?= number_format(round($timerecording->timerecordingEmployee->bpahours / 3600, 2), "2", ",", ".") ?></td>
|
||||
<?php endif; ?>
|
||||
<td class="text-center"><?= number_format(round($timerecording->plushours25 / 3600, 2), "2", ",", ".") ?></td>
|
||||
<td class="text-center"><?= number_format(round($timerecording->overtime50free / 3600, 2), "2", ",", ".") ?></td>
|
||||
<td class="text-center"><?= number_format(round($timerecording->overtime100free / 3600, 2), "2", ",", ".") ?></td>
|
||||
<td class="text-center"><?= number_format($timerecording->diet, 2, ',', '.') . " €" ?></td>
|
||||
@@ -134,7 +140,9 @@
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -157,6 +165,12 @@
|
||||
<table class="table ">
|
||||
<tr id="overtimes">
|
||||
</tr>
|
||||
<tr id="plushours25_div" style="display:none">
|
||||
<th class="align-middle">Mehrstunden 25</th>
|
||||
<td><input type="number" step="any" class="form-control change-overtime-value"
|
||||
name="plushours25"
|
||||
id="plushours25"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="align-middle">Überstunden 50</th>
|
||||
<td><input type="number" step="any" class="form-control change-overtime-value"
|
||||
@@ -195,12 +209,14 @@
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||
var hidesearch = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12];
|
||||
<?php if ($me->superexpertEnabled()): ?>
|
||||
hidesearch = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
||||
hidesearch = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,12,13];
|
||||
<?php endif; ?>
|
||||
$(document).ready(function () {
|
||||
// $('.buttons-excel').closest('div').append('<div ><button id="month-complete" class="btn btn-danger margina">Monats Abschluss</button></div>');
|
||||
<?php if ($me->superexpertEnabled()): ?>
|
||||
$('.buttons-excel').closest('div').prepend('<div ><button id="month-abort" class="btn btn-danger margina">Abschluss Abbrechen</button></div>');
|
||||
<?php endif; ?>
|
||||
$('.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>');
|
||||
|
||||
@@ -221,24 +237,42 @@
|
||||
}
|
||||
|
||||
});
|
||||
$('#overtimeModal').on('shown.bs.modal', function (event) {
|
||||
$('#overtimeModal').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
|
||||
if (button.hasClass('change-difference')) {
|
||||
$('#overtimeModal-title').text('Mehrstunden Transfer');
|
||||
$('#overtimeModal').data('id', button.data('id'));
|
||||
|
||||
$('#overtimes').html('<th>Mehrstunden:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + ' (6,5)</td>');
|
||||
$('#overtimes').html('<th>Mehrstunden:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + '</td>');
|
||||
$('#submit-button').data('type', 'difference');
|
||||
$('#plushours25_div').show();
|
||||
}
|
||||
if (button.hasClass('change-overtime')) {
|
||||
$('#overtimeModal-title').text('Überstunden Transfer');
|
||||
$('#overtimes').html('<th>Überstunden:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + '</td>');
|
||||
$('#submit-button').data('type', 'overtime');
|
||||
$('#overtimeModal').data('id', button.data('id'));
|
||||
$('#plushours25_div').hide();
|
||||
}
|
||||
$('.change-overtime-value').val('');
|
||||
});
|
||||
|
||||
$('body').on('click', '#month-abort', function () {
|
||||
if (confirm('Monatsabschluss ' + $('#month').data('month') + ' wirklich rückgängig machen?')) {
|
||||
$('#datatable_wrapper').hide();
|
||||
$('#page-header').hide();
|
||||
$('.spinner-big').show();
|
||||
$.post("<?= self::getUrl("TimerecordingBilling", "api", ['do' => 'abortmonth']) ?>", {
|
||||
month: $.trim($('#month').data('month')),
|
||||
ajax: 1
|
||||
}).done(function (data) {
|
||||
window.location.href = "<?= self::getUrl("TimerecordingBilling", "detail", ['month' => $month]) ?>";
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('body').on('change', '.change-overtime-value', function () {
|
||||
//$('#overtime-hours').data('hours') to float
|
||||
var difference = 0;
|
||||
@@ -278,12 +312,14 @@
|
||||
});
|
||||
$('body').on('click', '#submit-button', function () {
|
||||
var id = $('#overtimeModal').data('id');
|
||||
var plushours25 = $('#plushours25').val();
|
||||
var overtime50 = $('#overtime50').val();
|
||||
var overtime100 = $('#overtime100').val();
|
||||
var overtimebpa = $('#overtimebpa').val();
|
||||
$.post("<?= self::getUrl("TimerecordingBilling", "api", ['do' => 'saveovertime']) ?>", {
|
||||
id: id,
|
||||
type: $(this).data('type'),
|
||||
plushours25: plushours25,
|
||||
overtime50: overtime50,
|
||||
overtime100: overtime100,
|
||||
overtimebpa: overtimebpa,
|
||||
|
||||
@@ -143,25 +143,25 @@ $daysSelect .= "</select>";
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="form-group row">
|
||||
<div class="form-group row" style="display:none">
|
||||
<label class="col-lg-2 col-form-label" for="holidays">Initiale Urlaubstage</label>
|
||||
<div class="col-lg-1">
|
||||
<input required="required" type="number" id="holidays" name="holidays"
|
||||
<input type="number" id="holidays" name="holidays"
|
||||
class="form-control"
|
||||
value="<?= $timerecordingemployees->holidays ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="form-group row" style="display:none">
|
||||
<label class="col-lg-2 col-form-label" for="plushours">Initiale Gutstunden</label>
|
||||
<div class="col-lg-1">
|
||||
<input required="required" type="text" id="plushours" name="plushours"
|
||||
<input type="text" id="plushours" name="plushours"
|
||||
class="form-control"
|
||||
value="<?= str_replace(".", ",", $timerecordingemployees->plushours / 3600) ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="form-group row" style="display:none">
|
||||
<label class="col-lg-2 col-form-label" for="overtime">Initiale Überstunden</label>
|
||||
<div class="col-lg-1">
|
||||
<input type="text" id="overtime" name="overtime"
|
||||
|
||||
Reference in New Issue
Block a user