mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Merge pull request #11243 from snipe/fixes/fix_diff_time_in_audit_report
Don’t use the formatted date for diff days in audit report
This commit is contained in:
commit
b5ddc2c85b
|
@ -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() : '') }}
|
||||
|
|
Loading…
Reference in a new issue