Zeiterfassung Update/Bugfixes
* Homeofficetage werden wenn sie in Kombination mit Arztbesuch/Anwesenheiten nun richtig berechnet * Verrechnungsübersicht zeigt nun historisch BP/Gutstunden und Mehrstunden * Aufbuchen und Mindern wird nun in Verrechnet bei den NLZs angezeigt
This commit is contained in:
@@ -157,7 +157,7 @@ private $holidays ;
|
||||
$enddate = "";
|
||||
$sum = "-";
|
||||
$day = "";
|
||||
$enddatecend="";
|
||||
$enddatecend = "";
|
||||
$orderdate = $timerecording->start;
|
||||
if ($timerecording->timerecordingCategory->hourday == 1) {
|
||||
$date = date("d.m.Y", $timerecording->start);
|
||||
@@ -225,7 +225,7 @@ private $holidays ;
|
||||
$enddatetemp = date("Y-m-d", time());
|
||||
$enddatetemp = strtotime($enddatetemp . " 23:59:59");
|
||||
$enddate = date("Y-m-d", $enddatetemp + 7200);
|
||||
$enddatecend= date("Y-m-d", $enddatetemp + 1216800);
|
||||
$enddatecend = date("Y-m-d", $enddatetemp + 1216800);
|
||||
$start = "-";
|
||||
$end = "-";
|
||||
$day = $daysgerm[date("w", $timerecording->start)];
|
||||
@@ -266,6 +266,7 @@ private $holidays ;
|
||||
$date = date("d.m.Y", $timerecording->start);
|
||||
$start = "-";
|
||||
$end = "-";
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
$day = $daysgerm[date("w", $timerecording->start)];
|
||||
if ($timerecording->days > 0) {
|
||||
if ($timerecording->days == 1) {
|
||||
@@ -357,9 +358,8 @@ private $holidays ;
|
||||
endif;
|
||||
if ($datatype == 3 && ($timerecording->timerecordingCategory->hourday == 1 || $timerecording->timerecordingCategory->hourday == 7 || $timerecording->timerecordingCategory->hourday == 5)) {
|
||||
} else {
|
||||
if (!$enddatecend)
|
||||
{
|
||||
$enddatecend=$enddate;
|
||||
if (!$enddatecend) {
|
||||
$enddatecend = $enddate;
|
||||
}
|
||||
|
||||
$rows[] = array(
|
||||
@@ -588,7 +588,7 @@ private $holidays ;
|
||||
$O100pfl = 0;
|
||||
$O50free = 0;
|
||||
$O50pfl = 0;
|
||||
$Osum=0;
|
||||
$Osum = 0;
|
||||
foreach ($timerecordings as $timerecording):
|
||||
|
||||
$state = "";
|
||||
@@ -599,9 +599,10 @@ private $holidays ;
|
||||
if ($oldday != date('Y-m-d', $timerecording->start)) {
|
||||
|
||||
if ($homeoffice == 1) {
|
||||
$homeofficesum++;
|
||||
$homeofficesum ++;
|
||||
$homeoffice = false;
|
||||
}
|
||||
$homeoffice = false;
|
||||
if ($diet > 10800) {
|
||||
if ($diet >= 43200) {
|
||||
$diet = 43200;
|
||||
@@ -613,14 +614,13 @@ private $holidays ;
|
||||
$diet = 0;
|
||||
|
||||
}
|
||||
|
||||
if ($timerecording->homeoffice == 1 && (!$homeoffice || $homeoffice == 1)) {
|
||||
|
||||
$homeoffice = 1;
|
||||
} else {
|
||||
$homeoffice = 0;
|
||||
} else if ($timerecording->timerecordingCategory_id != '9') { //Speziallösung für Arztbesuch (zusätzlich Homeoffice erlaubt)
|
||||
$homeoffice = 'NOK';
|
||||
}
|
||||
|
||||
|
||||
if ($timerecording->businesstrip == 1 && $timerecording->timerecordingCategory->hourday == 1) {
|
||||
$diet = $diet + $timerecording->end - $timerecording->start;
|
||||
}
|
||||
@@ -664,7 +664,7 @@ private $holidays ;
|
||||
$O100free = $O100free + $overtimes['O100free'];
|
||||
$O50free = $O50free + $overtimes['O50free'];
|
||||
$O50pfl = $O50pfl + $overtimes['O50pfl'];
|
||||
$Osum=$Osum+$overtimes['sum'];
|
||||
$Osum = $Osum + $overtimes['sum'];
|
||||
}
|
||||
} else if ($timerecording->timerecordingCategory->hourday == 2 || ($timerecording->timerecordingCategory->hourday == 3 && $timerecording->end)) {
|
||||
$date = date("d.m.", $timerecording->start) . " - " . $daysgerm[date("w", $timerecording->end)] . " " . date("d.m.Y", $timerecording->end);
|
||||
@@ -760,7 +760,8 @@ private $holidays ;
|
||||
$sum = sprintf("%02d", $hours) . ":" . sprintf("%02d", $minutes);
|
||||
|
||||
} else if ($timerecording->timerecordingCategory->hourday == 5) {
|
||||
|
||||
$date = date("d.m.Y", $timerecording->start);
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
$start = "-";
|
||||
$end = "-";
|
||||
$day = $daysgerm[date("w", $timerecording->start)];
|
||||
@@ -770,7 +771,12 @@ private $holidays ;
|
||||
} else {
|
||||
$daysum[$timerecording->timerecordingCategory->name] = $daysum[$timerecording->timerecordingCategory->name] + $timerecording->days;
|
||||
}
|
||||
|
||||
$nlzTimes[$timerecording->id]['start'] = date("d.m.Y", $timerecording->start);
|
||||
$nlzTimes[$timerecording->id]['end'] = date("d.m.Y", $timerecording->end);
|
||||
$nlzTimes[$timerecording->id]['days'] = $sumdays;
|
||||
$nlzTimes[$timerecording->id]['unpaid'] = $timerecording->timerecordingCategory->unpaid;
|
||||
$nlzTimes[$timerecording->id]['category'] = $timerecording->timerecordingCategory->name;
|
||||
$nlzTimes[$timerecording->id]['categoryshort'] = '99';
|
||||
} else if ($timerecording->timerecordingCategory->hourday == 6) {
|
||||
$date = date("d.m.Y", $timerecording->start);
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
@@ -826,7 +832,6 @@ private $holidays ;
|
||||
endforeach;
|
||||
if ($homeoffice == 1) {
|
||||
$homeofficesum++;
|
||||
$homeoffice = 0;
|
||||
}
|
||||
if ($diet > 10800) {
|
||||
if ($diet >= 43200) {
|
||||
@@ -883,7 +888,7 @@ private $holidays ;
|
||||
$json['time']['daysum'] = $daysum;
|
||||
$json['recordsFiltered'] = $responsecount;
|
||||
$json['recordsTotal'] = $responsecount;
|
||||
$json['time']['overtimes'] = ['O100free' => $O100free, 'O100pfl' => $O100pfl, 'O50free' => $O50free, 'O50pfl' => $O50pfl,'Osum'=>$Osum];
|
||||
$json['time']['overtimes'] = ['O100free' => $O100free, 'O100pfl' => $O100pfl, 'O50free' => $O50free, 'O50pfl' => $O50pfl, 'Osum' => $Osum];
|
||||
|
||||
if ($ajax == 1) {
|
||||
$json = json_encode($json);
|
||||
|
||||
Reference in New Issue
Block a user