diff --git a/application/TimerecordingEmployee/TimerecordingEmployeeModel.php b/application/TimerecordingEmployee/TimerecordingEmployeeModel.php index 913b19bb1..2de108268 100644 --- a/application/TimerecordingEmployee/TimerecordingEmployeeModel.php +++ b/application/TimerecordingEmployee/TimerecordingEmployeeModel.php @@ -6,7 +6,10 @@ class TimerecordingEmployeeModel private $type; private $auto_workinghours; private $holidays; + private $holidays_now; private $plushours; + private $plushours_now; + private $overtime; private $startdate; diff --git a/application/TimerecordingReport/TimerecordingReportController.php b/application/TimerecordingReport/TimerecordingReportController.php index 0077c2402..c4e3423ae 100644 --- a/application/TimerecordingReport/TimerecordingReportController.php +++ b/application/TimerecordingReport/TimerecordingReportController.php @@ -100,7 +100,7 @@ class TimerecordingReportController extends mfBaseController $dDate = date('Y-m-d', $timestamp); $dDay = date('w', $timestamp); if (!$holiDay[$dDate]) { - $mustSeconds = $mustSeconds + $workingHours[$dDay]; + // $mustSeconds = $mustSeconds + $workingHours[$dDay]; } $timestamp = $timestamp + 86400; @@ -117,7 +117,7 @@ class TimerecordingReportController extends mfBaseController $dDate = date('Y-m-d', $timestamp); $dDay = date('w', $timestamp); if (!$holiDay[$dDate]) { - $mustSeconds = $mustSeconds + $workingHours[$dDay]; + // $mustSeconds = $mustSeconds + $workingHours[$dDay]; } $timestamp = $timestamp + 86400; } @@ -133,7 +133,7 @@ class TimerecordingReportController extends mfBaseController $dDate = date('Y-m-d', $timestamp); $dDay = date('w', $timestamp); if (!$holiDay[$dDate]) { - $mustSeconds = $mustSeconds + $workingHours[$dDay]; + //$mustSeconds = $mustSeconds + $workingHours[$dDay]; } $timestamp = $timestamp + 86400; diff --git a/db/migrations/20240222175444_timerecording_employee_add_field_overtime.php b/db/migrations/20240222175444_timerecording_employee_add_field_overtime.php new file mode 100644 index 000000000..dcbb61f15 --- /dev/null +++ b/db/migrations/20240222175444_timerecording_employee_add_field_overtime.php @@ -0,0 +1,33 @@ +getEnvironment() == "thetool") { + $table = $this->table("TimerecordingEmployee", ["signed" => true]); + $table->addColumn("overtime", "integer", ["null" => false, "default" => '0', "after" => "plushours_now"]); + $table->changeColumn('holidays_now', 'integer', ["null" => false, "default" => '0']); + $table->changeColumn('plushours_now', 'integer', ["null" => false, "default" => '0']); + $table->update(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } + + public function down(): void + { + if($this->getEnvironment() == "thetool") { + $this->table("TimerecordingEmployee")->removeColumn("overtime")->save(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } +}