Zeiterfassung Update
* Berechnungen BP * Möglichkeit Mehrstunden in Gutstunden umzuwandeln
This commit is contained in:
@@ -108,8 +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 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>
|
||||
@@ -124,6 +125,7 @@
|
||||
<?php if ($me->superexpertEnabled()): ?>
|
||||
hidesearch = [2, 3, 4, 5, 6, 7, 9, 10];
|
||||
<?php endif; ?>
|
||||
var pageLength = 100;
|
||||
$(document).ready(function () {
|
||||
$('.buttons-excel').closest('div').append('<div ><button id="month-complete" class="btn btn-danger margina">Monats Abschluss</button></div>');
|
||||
$('.buttons-excel').closest('div').append('<div ><button id="bmd-export" class="btn btn-info margina">BMD Import</button></div>');
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<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"><?= number_format(round(($timerecording->ishourssum-$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 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>
|
||||
@@ -219,6 +219,7 @@
|
||||
<?php if ($me->superexpertEnabled()): ?>
|
||||
hidesearch = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,12,13];
|
||||
<?php endif; ?>
|
||||
var pageLength = 100;
|
||||
$(document).ready(function () {
|
||||
<?php if ($me->superexpertEnabled()): ?>
|
||||
$('.buttons-excel').closest('div').prepend('<div ><button id="month-abort" class="btn btn-danger margina">Abschluss Abbrechen</button></div>');
|
||||
@@ -245,12 +246,20 @@
|
||||
});
|
||||
$('#overtimeModal').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
|
||||
console.log(button.closest('tr').html());
|
||||
if (button.hasClass('change-difference')) {
|
||||
$('#overtimeModal-title').text('Mehrstunden Transfer');
|
||||
$('#overtimeModal').data('id', button.data('id'));
|
||||
var overtimeplushours=button.closest('tr').find('.overtimeplushours-td').data('overtimeplushours');
|
||||
|
||||
$('#overtimes').html('<th>Mehrstunden:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + '</td>');
|
||||
if (overtimeplushours != "0,00") {
|
||||
var overtimeplushourstext='<span class="text-danger font-weight-500 ml-1">('+ button.closest('tr').find('.overtimeplushours-td').data('overtimeplushours')+ ')</span>';
|
||||
} else {
|
||||
var overtimeplushourstext="";
|
||||
}
|
||||
|
||||
|
||||
$('#overtimes').html('<th>Mehrstunden:</th> <td id="overtime-hours" data-hours="' + button.data('hours') + '">' + button.data('hours') + overtimeplushourstext + '</td>');
|
||||
$('#submit-button').data('type', 'difference');
|
||||
$('.overtime-modal-div').show();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch = [7];
|
||||
|
||||
var pageLength = 100;
|
||||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
|
||||
@@ -401,6 +401,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
|
||||
|
||||
<script type="text/javascript">
|
||||
var hidesearch = [2, 3, 4, 7];
|
||||
var pageLength = 100;
|
||||
let insertUrl = "<?= self::getUrl("Timerecording", "save") ?>";
|
||||
let deleteUrl = "<?= self::getUrl("Timerecording", "delete") ?>";
|
||||
let requestUrl = "<?= self::getUrl("TimerecordingReport", "api", ['do' => 'getTimerecordings']) ?>";
|
||||
|
||||
@@ -528,9 +528,9 @@ class TimerecordingBillingController extends mfBaseController
|
||||
}
|
||||
|
||||
|
||||
$data['transfer_plushours'] = $data['transfer_plushours'] - $data['overtime50free'] ;
|
||||
$data['overtime50free'] = 0;
|
||||
|
||||
$data['transfer_plushours'] = $data['transfer_plushours'] - $data['overtime50free'];
|
||||
$data['overtime_plushours'] = $data['overtime50free'];
|
||||
$data['overtime50free'] = 0;
|
||||
|
||||
|
||||
if ($data['transfer_plushours'] > 0) {
|
||||
|
||||
@@ -14,6 +14,7 @@ class TimerecordingBillingEmployeeModel
|
||||
private $overtime50free;
|
||||
private $overtime100;
|
||||
private $overtime100free;
|
||||
private $overtime_plushours;
|
||||
private $homeoffice;
|
||||
private $diet;
|
||||
private $nlz;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class TimerecordingBillingEmployeeAddFieldsOvertimePlusHours extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("TimerecordingBillingEmployee", ["signed" => true]);
|
||||
$table->addColumn("overtime_plushours", "integer", ["null" => false, "default" => 0, "after" => "overtime100free"]);
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$this->table("TimerecordingBillingEmployee")->removeColumn("overtime_plushours")->save();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,12 @@ if (typeof hidesearch === "undefined") {
|
||||
hidesearch = [100];
|
||||
}
|
||||
|
||||
|
||||
if (typeof pageLength === "undefined") {
|
||||
var pageLength;
|
||||
pageLength = 25;
|
||||
}
|
||||
|
||||
if (typeof cstmdom === "undefined") {
|
||||
var cstmdom;
|
||||
cstmdom = "flBrtip";
|
||||
@@ -46,6 +52,7 @@ table = $('#datatable').DataTable({
|
||||
{name: 'phone', width: 480}
|
||||
]
|
||||
},
|
||||
pageLength: pageLength,
|
||||
buttons: [
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
|
||||
@@ -57,6 +57,7 @@ table = $('#datatable').DataTable({
|
||||
], columnDefs: [
|
||||
columndefs
|
||||
],
|
||||
pageLength: 100,
|
||||
"language": {
|
||||
"url": "/datatables/json/german.json?v1"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user