Merge branch 'spidev' into 'master'

Zeiterfassung Feature Jobrad

See merge request fronk/thetool!456
This commit is contained in:
Daniel Spitzer
2024-07-09 15:26:29 +00:00
8 changed files with 90 additions and 10 deletions
@@ -269,6 +269,12 @@ class TimerecordingBillingController extends mfBaseController
if ($timerecordingBillingEmployee->overtime50free > 64800) {
$bodyarray = [$monthbmd, "1", $employee_number, "3110", "18", "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
if ($timerecordingBillingEmployee->timerecordingEmployee->jobbike == 1) {
$bodyarray = [$monthbmd, "1", $employee_number, "3115", "18", "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
$bodyarray = [$monthbmd, "1", $employee_number, "3116", "18", "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
}
$diffsum = $timerecordingBillingEmployee->overtime50free - 64800;
$diffsum = $diffsum / 3600;
$diffsum = round($diffsum, 2);
@@ -279,6 +285,12 @@ class TimerecordingBillingController extends mfBaseController
$overtime50free = str_replace(".", ",", $overtime50free);
$bodyarray = [$monthbmd, "1", $employee_number, "3110", $overtime50free, "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
if ($timerecordingBillingEmployee->timerecordingEmployee->jobbike == 1) {
$bodyarray = [$monthbmd, "1", $employee_number, "3115", $overtime50free, "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
$bodyarray = [$monthbmd, "1", $employee_number, "3116", $overtime50free, "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
}
}
@@ -291,6 +303,12 @@ class TimerecordingBillingController extends mfBaseController
if ($timerecordingBillingEmployee->overtime100free > 64800) {
$bodyarray = [$monthbmd, "1", $employee_number, "3160", "18", "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
if ($timerecordingBillingEmployee->timerecordingEmployee->jobbike == 1) {
$bodyarray = [$monthbmd, "1", $employee_number, "3165", "18", "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
$bodyarray = [$monthbmd, "1", $employee_number, "3166", "18", "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
}
$diffsum = $timerecordingBillingEmployee->overtime100free - 64800;
$diffsum = $diffsum / 3600;
$diffsum = round($diffsum, 2);
@@ -300,6 +318,12 @@ class TimerecordingBillingController extends mfBaseController
} else {
$bodyarray = [$monthbmd, "1", $employee_number, "3160", $overtime100free, "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
if ($timerecordingBillingEmployee->timerecordingEmployee->jobbike == 1) {
$bodyarray = [$monthbmd, "1", $employee_number, "3165", $overtime100free, "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
$bodyarray = [$monthbmd, "1", $employee_number, "3166", $overtime100free, "", "", "", "", "", ""];
fputcsv($file, $bodyarray, ";");
}
}
}
@@ -123,6 +123,7 @@ class TimerecordingEmployeeController extends mfBaseController
$data = [];
$data['user_id'] = trim($r->user_id);
$data['auto_workinghours'] = trim($r->auto_workinghours);
$data['jobbike'] = trim($r->jobbike);
$data['holidays'] = trim($r->holidays);
$data['plushours'] = $plushours;
$data['startdate'] = strtotime($r->startdate);
@@ -172,6 +173,9 @@ class TimerecordingEmployeeController extends mfBaseController
if (!$data['auto_workinghours']) {
$data['auto_workinghours'] = 0;
}
if (!$data['jobbike']) {
$data['jobbike'] = 0;
}
if ($mode == "edit") {
$timerecordingemployees->update($data);
@@ -19,6 +19,7 @@ class TimerecordingEmployeeModel
private $startdate;
private $enddate;
private $bmd_active;
private $jobbike;
private $birthday;
public static $employeetypesbmd = array('1' => '1000', '2' => '1200', '3' => '1400');