diff --git a/app/Console/Commands/GenerateDutyReport.php b/app/Console/Commands/GenerateDutyReport.php index 74fd451..3fd408d 100644 --- a/app/Console/Commands/GenerateDutyReport.php +++ b/app/Console/Commands/GenerateDutyReport.php @@ -178,7 +178,7 @@ class GenerateDutyReport extends Command // Формируем DateRange через ваш сервис (учёт смен, часовых поясов) $user = User::find($userId); - $lpuDoctorId = $user->rf_lpudoctor_id ?? 1; + $lpuDoctorId = 0; $dateRange = $dateRangeService->createDateRangeForDate($shiftEnd, $user); // Цепочка из вашего контроллера diff --git a/app/Services/DutyReportService.php b/app/Services/DutyReportService.php index 8435c59..0e02292 100644 --- a/app/Services/DutyReportService.php +++ b/app/Services/DutyReportService.php @@ -49,7 +49,7 @@ class DutyReportService $departmentId = $departmentId ?? $user->rf_department_id; $data = [ - 'report_date' => Carbon::now()->format('Y-m-d'), + 'report_date' => $dateRange->endSql(), 'sent_at' => Carbon::now()->format('Y-m-d H:i:s'), 'period_type' => 'day', 'period_start' => $dateRange->startSql(), diff --git a/resources/js/Pages/Report/Index.vue b/resources/js/Pages/Report/Index.vue index 6d5879d..b158f6c 100644 --- a/resources/js/Pages/Report/Index.vue +++ b/resources/js/Pages/Report/Index.vue @@ -1,7 +1,7 @@