From fbe2ae03ff554ec4434cdb1a95b17ee41c05dd7b Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 12 Nov 2025 15:52:16 +0000 Subject: [PATCH] Use due_checkin_days setting instead of audit warning days --- app/Console/Commands/SendExpectedCheckinAlerts.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/SendExpectedCheckinAlerts.php b/app/Console/Commands/SendExpectedCheckinAlerts.php index 3c83110b7a..5836084152 100644 --- a/app/Console/Commands/SendExpectedCheckinAlerts.php +++ b/app/Console/Commands/SendExpectedCheckinAlerts.php @@ -10,6 +10,7 @@ use App\Notifications\ExpectedCheckinNotification; use Carbon\Carbon; use Illuminate\Console\Command; use Illuminate\Support\Facades\Notification; +use App\Helpers\Helper; class SendExpectedCheckinAlerts extends Command { @@ -43,7 +44,7 @@ class SendExpectedCheckinAlerts extends Command public function handle() { $settings = Setting::getSettings(); - $interval = $settings->audit_warning_days ?? 0; + $interval = $settings->due_checkin_days ?? 0; $today = Carbon::now(); $interval_date = $today->copy()->addDays($interval); $count = 0; @@ -54,7 +55,7 @@ class SendExpectedCheckinAlerts extends Command $assets = Asset::whereNull('deleted_at')->DueOrOverdueForCheckin($settings)->orderBy('assets.expected_checkin', 'desc')->get(); - $this->info($assets->count().' assets must be checked on or before '.$interval_date); + $this->info($assets->count().' assets must be checked on or before '.Helper::getFormattedDateObject($interval_date, 'date', false)); foreach ($assets as $asset) {