-
-
-
-
-
Arbeitszeiten
-
-
+
+
+
+
+
+
+
+
+
+
+
+ | Arbeitszeiten |
+ Wochenstunden |
+ Bis |
+ |
+
+
+
+ $timerecordingworkinghours):
+ if (!$timerecordingworkinghours['workinghours']) {
+ $historyworkingkours = '0 Stunden';
+ $historyworkingkoursText = "keine";
+ } else {
+ $historyworkingkoursText = $timerecordingworkinghours['workinghours'];
+ $hours = $timerecordingworkinghours['workingtime'] / 3600;
+ $historyworkingkours = $hours . ' Stunden';
+ }
+ ?>
+
+ | = $historyworkingkoursText ?> |
+ = $historyworkingkours ?> |
+ = date('d.m.Y', $key) ?> |
+
+ |
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
-
+ $('body').on('click', '.remove-wh-history', function () {
+
+ let reqworkingHoursSaveUrl = '= self::getUrl("TimerecordingEmployee", "api", ['do' => 'deleteWorkingHours']) ?>';
+ let id = $(this).data('id');
+ if (!confirm('Arbeitszeitänderung löschen?')) {
+ return;
+ }
+ $.ajax({
+ url: reqworkingHoursSaveUrl,
+ type: 'POST',
+ data: {
+ id: id,
+ userid: = $timerecordinguser[0]->id ?>
+ },
+ success: function (data) {
+ location.reload();
+ }
+ });
+ });
+ });
+
diff --git a/application/TimerecordingEmployee/TimerecordingEmployeeController.php b/application/TimerecordingEmployee/TimerecordingEmployeeController.php
index 3f6a056b7..f3a2fa271 100644
--- a/application/TimerecordingEmployee/TimerecordingEmployeeController.php
+++ b/application/TimerecordingEmployee/TimerecordingEmployeeController.php
@@ -167,6 +167,7 @@ class TimerecordingEmployeeController extends mfBaseController
$data['user_id'] = trim($r->user_id);
$data['auto_workinghours'] = trim($r->auto_workinghours);
$data['jobbike'] = trim($r->jobbike);
+ $data['night_allowance'] = trim($r->night_allowance);
$data['holidays'] = trim($r->holidays);
$data['plushours'] = $plushours;
$data['startdate'] = strtotime($r->startdate);
@@ -235,6 +236,9 @@ class TimerecordingEmployeeController extends mfBaseController
if (!$data['jobbike']) {
$data['jobbike'] = 0;
}
+ if (!$data['night_allowance']) {
+ $data['night_allowance'] = 0;
+ }
if ($mode == "edit") {
$timerecordingemployees->update($data);
diff --git a/application/TimerecordingEmployee/TimerecordingEmployeeModel.php b/application/TimerecordingEmployee/TimerecordingEmployeeModel.php
index 0988e6be7..f37be75d5 100644
--- a/application/TimerecordingEmployee/TimerecordingEmployeeModel.php
+++ b/application/TimerecordingEmployee/TimerecordingEmployeeModel.php
@@ -12,6 +12,7 @@ class TimerecordingEmployeeModel
private $plushours_now;
private $plushours_timestamp;
private $overtime;
+ private $night_allowance;
private $overtime_now;
private $overtime_timestamp;
private $bpahours;
diff --git a/application/TimerecordingReport/TimerecordingReportController.php b/application/TimerecordingReport/TimerecordingReportController.php
index 2444602cb..6a2676032 100644
--- a/application/TimerecordingReport/TimerecordingReportController.php
+++ b/application/TimerecordingReport/TimerecordingReportController.php
@@ -564,7 +564,7 @@ class TimerecordingReportController extends mfBaseController
die();
}
- private function checkOvertime($timerecording)
+ private function checkOvertime($timerecording,$night_allowance=0)
{
$start = $timerecording->start;
$end = $timerecording->end;
@@ -583,10 +583,10 @@ class TimerecordingReportController extends mfBaseController
$end = $timerecording->end;
$startday = date('Y-m-d', $start);
- if (date('w', $start) == 0 || $holiDay[$startday]) {
+ if ((date('w', $start) == 0 || $holiDay[$startday]) && $night_allowance==0) {
$O100free = $O100free + $timerecording->end - $timerecording->start;
} else {
- if ($start < $O100end || $start > $O100start || $end < $O100end || $end > $O100start) {
+ if (($start < $O100end || $start > $O100start || $end < $O100end || $end > $O100start) && $night_allowance==0) {
$sum = $end - $start;
if ($sum >= 10800) {
if ($start < $O100end) {
@@ -653,6 +653,7 @@ class TimerecordingReportController extends mfBaseController
$plusHours_now = $employee[0]->plushours_now;
$overtime_now = $employee[0]->overtime_now;
$auto_workinghours = $employee[0]->auto_workinghours;
+ $night_allowance= $employee[0]->night_allowance;
$startdate = $employee[0]->startdate;
if ($employee[0]->enddate) {
$enddate = strtotime(date('Y-m-d', $employee[0]->enddate) . " 23:59:59");
@@ -885,7 +886,7 @@ class TimerecordingReportController extends mfBaseController
$nlzTimes[$timerecording->id]['category'] = $timerecording->timerecordingCategory->name;
$nlzTimes[$timerecording->id]['categoryshort'] = $timerecording->timerecordingCategory->short;
} else {
- $overtimes = $this->checkOvertime($timerecording);
+ $overtimes = $this->checkOvertime($timerecording,$night_allowance);
$isSecondscleanarray[$timerecording->timerecordingCategory->short] = $isSecondscleanarray[$timerecording->timerecordingCategory->short] - $overtimes['sum'];
if ($employee->only_admin != 1) {
diff --git a/db/migrations/20251011155801_timerecording_employee_add_nigth_allowance.php b/db/migrations/20251011155801_timerecording_employee_add_nigth_allowance.php
new file mode 100644
index 000000000..e8d155097
--- /dev/null
+++ b/db/migrations/20251011155801_timerecording_employee_add_nigth_allowance.php
@@ -0,0 +1,31 @@
+getEnvironment() == "thetool") {
+ $table = $this->table("TimerecordingEmployee", ["signed" => true]);
+ $table->addColumn("night_allowance", "integer", ["null" => false,'default' => 0, "after" => "overtime"]);
+ $table->update();
+ }
+
+ if($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+
+ public function down(): void
+ {
+ if($this->getEnvironment() == "thetool") {
+ $this->table("TimerecordingEmployee")->removeColumn("night_allowance")->save();
+ }
+
+ if($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+}