From 7739d90e779dd3d21f26a63826e6389aaf94081d Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Sun, 11 May 2025 20:49:11 +0200 Subject: [PATCH] =?UTF-8?q?Zeiterfassung=20Bugfix=20Zeiterfassung=20*=20be?= =?UTF-8?q?i=20der=20Zeiterfassung=20wenn=20man=20Fibu=20Rechte=20hat,=20d?= =?UTF-8?q?arf=20man=20mit=20ZA=20ins=20Minus=20gehen=20das=20hat=20aber?= =?UTF-8?q?=20den=20Bug=20gehabt,=20dass=20wenn=20man=20=C3=BCberstunden?= =?UTF-8?q?=20hat=20die=20=C3=9Cberstunden=20ins=20Minus=20geht=20das=20Ve?= =?UTF-8?q?rrechnunstechnisch=20nicht=20m=C3=B6glich=20ist.=20Alles=20was?= =?UTF-8?q?=20=C3=BCber=20das=20gesamtzeitguthaben=20dr=C3=BCber=20schie?= =?UTF-8?q?=C3=9Ft=20wird=20nun=20negativ=20in=20die=20Mehrstunden=20verbu?= =?UTF-8?q?cht.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/Timerecording/TimerecordingController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/Timerecording/TimerecordingController.php b/application/Timerecording/TimerecordingController.php index c93dc6e9c..a2495ec5f 100644 --- a/application/Timerecording/TimerecordingController.php +++ b/application/Timerecording/TimerecordingController.php @@ -239,6 +239,14 @@ class TimerecordingController extends mfBaseController $return['hours'] = $isTime25; $return['hours_overtime'] = $isTime50; } + + if ($return['hours_overtime'] && $return['hours_overtime'] > $overtime) { + $excess = $return['hours_overtime'] - $overtime; + $return['hours_overtime'] = $overtime; + // überschüssige Sekunden 1:1 zu normalen Stunden + $return['hours'] += $excess * 1.5; + } + if ($ajax == 1) { if ($r->ajax == 1) { if ($isTime < 0) {