From 8100e9c8d35479f774fb5bb2b42b51e0a889304f Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Mon, 30 Dec 2024 08:47:48 +0100 Subject: [PATCH] Zeiterfassung MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bugfix: * PHP Date statt Y o genommen damit die Kalenderwoche sich auf das richtige Jahr bezieht (nun auch für Reports) --- Layout/default/TimerecordingReport/Index.php | 2 +- .../TimerecordingReport/TimerecordingReportController.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Layout/default/TimerecordingReport/Index.php b/Layout/default/TimerecordingReport/Index.php index 1a25064a2..085b5b7eb 100644 --- a/Layout/default/TimerecordingReport/Index.php +++ b/Layout/default/TimerecordingReport/Index.php @@ -24,7 +24,7 @@ ksort($timerecordingUsers); for ($i = 1; $i <= 25; $i++) { $kw = date('W', $time); - $year = date('Y', $time); + $year = date('o', $time); $timestamp_montag = strtotime("{$year}-W{$kw}"); $timestamp_freitag = strtotime("{$year}-W{$kw}-7"); diff --git a/application/TimerecordingReport/TimerecordingReportController.php b/application/TimerecordingReport/TimerecordingReportController.php index 44115c0ad..bbaf8a881 100644 --- a/application/TimerecordingReport/TimerecordingReportController.php +++ b/application/TimerecordingReport/TimerecordingReportController.php @@ -101,7 +101,7 @@ class TimerecordingReportController extends mfBaseController if ($datatype == 1) { $kw = date('W', $dataweek); - $year = date('Y', $dataweek); + $year = date('o', $dataweek); $timestamp_montag = strtotime("{$year}-W{$kw}"); $timestamp_sonntag = strtotime("{$year}-W{$kw}-7"); $firstdate = strtotime(date("Y-m-d", $timestamp_montag) . " 00:00:00"); @@ -562,7 +562,7 @@ class TimerecordingReportController extends mfBaseController if ($datatype == 1) { $kw = date('W', $dataweek); - $year = date('Y', $dataweek); + $year = date(o, $dataweek); $timestamp_montag = strtotime("{$year}-W{$kw}"); $timestamp_sonntag = strtotime("{$year}-W{$kw}-7"); $firstdate = strtotime(date("Y-m-d", $timestamp_montag) . " 00:00:00");