Skip to content

Commit fbe2ae0

Browse files
committed
Use due_checkin_days setting instead of audit warning days
1 parent d1a492f commit fbe2ae0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/Console/Commands/SendExpectedCheckinAlerts.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Carbon\Carbon;
1111
use Illuminate\Console\Command;
1212
use Illuminate\Support\Facades\Notification;
13+
use App\Helpers\Helper;
1314

1415
class SendExpectedCheckinAlerts extends Command
1516
{
@@ -43,7 +44,7 @@ public function __construct()
4344
public function handle()
4445
{
4546
$settings = Setting::getSettings();
46-
$interval = $settings->audit_warning_days ?? 0;
47+
$interval = $settings->due_checkin_days ?? 0;
4748
$today = Carbon::now();
4849
$interval_date = $today->copy()->addDays($interval);
4950
$count = 0;
@@ -54,7 +55,7 @@ public function handle()
5455

5556
$assets = Asset::whereNull('deleted_at')->DueOrOverdueForCheckin($settings)->orderBy('assets.expected_checkin', 'desc')->get();
5657

57-
$this->info($assets->count().' assets must be checked on or before '.$interval_date);
58+
$this->info($assets->count().' assets must be checked on or before '.Helper::getFormattedDateObject($interval_date, 'date', false));
5859

5960

6061
foreach ($assets as $asset) {

0 commit comments

Comments
 (0)