From 3d109672928bd47a259d21a309eadd3bb4798482 Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Fri, 5 Jul 2024 09:03:00 +0200 Subject: [PATCH] =?UTF-8?q?Zeiterfassung=20=20*=20Fix=20f=C3=BCr=20Workaro?= =?UTF-8?q?und=20Urlaubsminderung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TimerecordingBillingController.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/application/TimerecordingBilling/TimerecordingBillingController.php b/application/TimerecordingBilling/TimerecordingBillingController.php index 54976260a..e0c4b687a 100644 --- a/application/TimerecordingBilling/TimerecordingBillingController.php +++ b/application/TimerecordingBilling/TimerecordingBillingController.php @@ -224,7 +224,9 @@ class TimerecordingBillingController extends mfBaseController $file = fopen("php://output", 'w'); header('Content-Type: text/csv; charset=utf-8'); header('Content-Disposition: attachment; filename=' . $filename); - $monthbmd = date("n", strtotime("01." . $month)); + $monthunix=(strtotime("01." .$month)); + $monthbmd = date("n", $monthunix); + $monthend = date("d.m.Y", strtotime("last day of this month",$monthunix)); $companybmd = "1"; if ($nlz == 0) { $headerarray = ["Monat", "Firma", "Mitarbeiter", "Lohnart", "Menge", "Satz", "Betrag", "Kostenstelle", "NLZ-Kennzeichen", "NLZ Von-Datum", "NLZ Bis-Datum"]; @@ -339,10 +341,9 @@ class TimerecordingBillingController extends mfBaseController if ($timerecordingBillingEmployee->holidays>0) { //last day of month - $month= strtotime("01." . $month); - $monthend = date("d.m.Y", strtotime("last day of this month", $month)); - $bodyarray = [$companybmd, $employee_number, 1, "1", "", "4", '30.06.2024', '30.06.2024', $timerecordingBillingEmployee->holidays, '0']; + + $bodyarray = [$companybmd, $employee_number, 1, "1", "", "4", $monthend, $monthend, $timerecordingBillingEmployee->holidays, '0']; fputcsv($file, $bodyarray, ";"); }