From 00a8a2aff3a7814e21473f5f06cbf32a8c60ffa3 Mon Sep 17 00:00:00 2001 From: snipe Date: Sun, 5 May 2019 20:00:05 -0400 Subject: [PATCH] Fixed next audit date math --- .../views/notifications/markdown/upcoming-audits.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/notifications/markdown/upcoming-audits.blade.php b/resources/views/notifications/markdown/upcoming-audits.blade.php index 5fd269d1a5..f294ae6e53 100644 --- a/resources/views/notifications/markdown/upcoming-audits.blade.php +++ b/resources/views/notifications/markdown/upcoming-audits.blade.php @@ -9,7 +9,7 @@ @php $next_audit_date = \App\Helpers\Helper::getFormattedDateObject($asset->next_audit_date, 'date', false); $last_audit_date = \App\Helpers\Helper::getFormattedDateObject($asset->last_audit_date, 'date', false); -$diff = Carbon::parse($last_audit_date)->diffInDays(Carbon::now()); +$diff = Carbon::parse($next_audit_date)->diffInDays(Carbon::now()); $icon = ($diff <= 7) ? '🚨' : (($diff <= 14) ? '⚠️' : ' '); @endphp |{{ $icon }}| [{{ $asset->present()->name }}]({{ route('hardware.show', $asset->id) }}) | {{ $last_audit_date }}| {{ $next_audit_date }} | {{ $diff }} | {{ ($asset->supplier ? e($asset->supplier->name) : '') }}|{{ ($asset->assignedTo ? $asset->assignedTo->present()->name() : '') }}