Zeiterfassung
Neue Features: * BP Stunden Aufbuchen/Mindern * Spezialbuchungen ohne Verechnungstechnische relevanz
This commit is contained in:
@@ -23,6 +23,8 @@ class TimerecordingReportController extends mfBaseController
|
||||
$this->layout()->setTemplate("TimerecordingReport/Index");
|
||||
$timerecordingCategoriess = TimerecordingCategoryModel::getAll();
|
||||
$this->layout()->set("timerecordingCategoriess", $timerecordingCategoriess);
|
||||
$timerecordingEmployees = TimerecordingEmployeeModel::getAllArray();
|
||||
$this->layout()->set("timerecordingEmployees", $timerecordingEmployees);
|
||||
$timerecordingusers = UserModel::search(['employee' => 'true']);
|
||||
$this->layout()->set("timerecordingusers", $timerecordingusers);
|
||||
$timerecordings = TimerecordingModel::getAll();
|
||||
@@ -81,6 +83,7 @@ class TimerecordingReportController extends mfBaseController
|
||||
$plusHours = $employee[0]->plushours;
|
||||
|
||||
}
|
||||
$employeeArray = TimerecordingEmployeeModel::getAllArray();
|
||||
$workinghours = TimerecordingEmployeeWorkingHourModel::getAll();
|
||||
foreach ($workinghours as $workinghour) {
|
||||
|
||||
@@ -164,6 +167,9 @@ class TimerecordingReportController extends mfBaseController
|
||||
$timerecordings = TimerecordingModel::search($searchArray);
|
||||
$responsecount = count($timerecordings);
|
||||
foreach ($timerecordings as $timerecording):
|
||||
if ($employeeArray[$timerecording->user_id]['only_admin'] == 1 && !$this->me->superexpertEnabled()) {
|
||||
continue;
|
||||
}
|
||||
$hiderecording = 0;
|
||||
$state = "";
|
||||
$enddate = "";
|
||||
@@ -310,6 +316,21 @@ class TimerecordingReportController extends mfBaseController
|
||||
}
|
||||
|
||||
}
|
||||
} else if ($timerecording->timerecordingCategory->hourday == 8) {
|
||||
$date = date("d.m.Y", $timerecording->start);
|
||||
$start = "-";
|
||||
$end = "-";
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
$day = $daysgerm[date("w", $timerecording->start)];
|
||||
// $hoursbpa = number_format($timerecording->hours_bpa / 60 / 60, "2", ",", '');
|
||||
$hoursbpa = round($timerecording->hours_bpa / 60 / 60, 2);
|
||||
$hoursbpa = str_replace(".", ",", $hoursbpa);
|
||||
|
||||
if ($timerecording->hours_bpa > 0) {
|
||||
$sum = "+" . $hoursbpa . " St";
|
||||
} else {
|
||||
$sum = $hoursbpa . " St";
|
||||
}
|
||||
} else if ($timerecording->timerecordingCategory->hourday == 6) {
|
||||
$date = date("d.m.Y", $timerecording->start);
|
||||
$datadate = date("Y-m-d", $timerecording->start);
|
||||
@@ -363,6 +384,11 @@ class TimerecordingReportController extends mfBaseController
|
||||
|
||||
if ($timerecording->completed == 0):
|
||||
if ($timerecording->approved == 0) :
|
||||
$ddays = $timerecording->days;
|
||||
if ($timerecording->timerecordingCategory->hourday == 8) {
|
||||
$ddays = round($timerecording->hours_bpa / 60 / 60, 2);
|
||||
}
|
||||
|
||||
$edit = '<i class="far fa-edit edit-button" data-id="' . $timerecording->id . '"
|
||||
data-date="' . $datadate . '"
|
||||
data-category="' . $timerecording->timerecordingCategory->id . '"
|
||||
@@ -374,7 +400,7 @@ class TimerecordingReportController extends mfBaseController
|
||||
data-businesstrip="' . $timerecording->businesstrip . '"
|
||||
data-businesstripinfo="' . $timerecording->businesstrip_info . '"
|
||||
data-homeoffice="' . $timerecording->homeoffice . '"
|
||||
data-days="' . $timerecording->days . '"
|
||||
data-days="' . $ddays . '"
|
||||
data-car="' . $timerecording->timerecordingCar_id . '"
|
||||
data-mileagestart="' . $timerecording->mileage_start . '"
|
||||
data-mileageend="' . $timerecording->mileage_end . '"
|
||||
@@ -384,9 +410,9 @@ class TimerecordingReportController extends mfBaseController
|
||||
endif;
|
||||
$edit .= '<i data-id="' . $timerecording->id . '" class="fas fa-trash text-danger delete-item" ></i>';
|
||||
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 || $timerecording->timerecordingCategory->hourday == 8)) {
|
||||
} else if ($hiderecording == 1) {
|
||||
} else {
|
||||
} else if (($timerecording->timerecordingCategory->hourday == 8 && $this->me->superexpertEnabled()) || $timerecording->timerecordingCategory->hourday != 8) {
|
||||
if (!$enddatecend) {
|
||||
$enddatecend = $enddate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user