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, ";"); }