From 4e03ebe284ab80eb9902089bb837f0b3d85596f4 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 2 Jun 2022 16:30:26 -0700 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20use=20the=20formatted=20date=20?= =?UTF-8?q?for=20diff=20days=20in=20audit=20report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: snipe --- .../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 e1d95d611..f7ccf556b 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 = Helper::getFormattedDateObject($asset->next_audit_date, 'date', false); $last_audit_date = Helper::getFormattedDateObject($asset->last_audit_date, 'date', false); -$diff = Carbon::parse(Carbon::now())->diffInDays($next_audit_date, false); +$diff = Carbon::parse(Carbon::now())->diffInDays($asset->next_audit_date, false); $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() : '') }}