Zeiterfassung Update
* Berechnungen für Austritte implementiert.
This commit is contained in:
@@ -411,6 +411,11 @@ class TimerecordingReportController extends mfBaseController
|
||||
$overtime_now = $employee[0]->overtime_now;
|
||||
$auto_workinghours = $employee[0]->auto_workinghours;
|
||||
$startdate = $employee[0]->startdate;
|
||||
if ($employee[0]->enddate) {
|
||||
$enddate = strtotime(date('Y-m-d', $employee[0]->enddate) . " 23:59:59");
|
||||
} else {
|
||||
$enddate = 2208985200;
|
||||
}
|
||||
$bpahours = $employee[0]->bpahours;
|
||||
}
|
||||
$workinghours = TimerecordingEmployeeWorkingHourModel::search(['user_id' => $user_id]);
|
||||
@@ -445,7 +450,7 @@ class TimerecordingReportController extends mfBaseController
|
||||
$dDate = date('Y-m-d', $timestamp);
|
||||
$dDay = date('w', $timestamp);
|
||||
|
||||
if (!$holiDay[$dDate] && $dDate >= date('Y-m-d', $startdate)) {
|
||||
if (!$holiDay[$dDate] && $dDate >= date('Y-m-d', $startdate) && $dDate <= date('Y-m-d', $enddate)) {
|
||||
$mustSeconds = $mustSeconds + $workingHours[$dDay];
|
||||
}
|
||||
|
||||
@@ -466,7 +471,7 @@ class TimerecordingReportController extends mfBaseController
|
||||
for ($i = 1; $i <= $daycount; $i++) {
|
||||
$dDate = date('Y-m-d', $timestamp);
|
||||
$dDay = date('w', $timestamp);
|
||||
if (!$holiDay[$dDate] && $dDate >= date('Y-m-d', $startdate)) {
|
||||
if (!$holiDay[$dDate] && $dDate >= date('Y-m-d', $startdate) && $dDate <= date('Y-m-d', $enddate)) {
|
||||
$mustSeconds = $mustSeconds + $workingHours[$dDay];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user