From 5faf8bfcd0569ed63e84cc534e294e30e6d5c87f Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 29 Oct 2018 14:39:42 -0700 Subject: [PATCH] Fixed error on unaccepted asset report --- .../views/reports/unaccepted_assets.blade.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/resources/views/reports/unaccepted_assets.blade.php b/resources/views/reports/unaccepted_assets.blade.php index e8327a1363..e1ab7f0442 100644 --- a/resources/views/reports/unaccepted_assets.blade.php +++ b/resources/views/reports/unaccepted_assets.blade.php @@ -47,14 +47,16 @@ @if ($assetsForReport) @foreach ($assetsForReport as $assetItem) - - {{ is_null($assetItem->company) ? '' : $assetItem->company->name }} - {{ $assetItem->model->category->name }} - {{ $assetItem->model->name }} - {!! $assetItem->present()->nameUrl() !!} - {{ $assetItem->asset_tag }} - {!! ($assetItem->assignedTo) ? $assetItem->assignedTo->present()->nameUrl() : 'Deleted user' !!} - + @if ($assetItem) + + {{ ($assetItem->company) ? $assetItem->company->nam : '' }} + {{ $assetItem->model->category->name }} + {{ $assetItem->model->name }} + {!! $assetItem->present()->nameUrl() !!} + {{ $assetItem->asset_tag }} + {!! ($assetItem->assignedTo) ? $assetItem->assignedTo->present()->nameUrl() : 'Deleted user' !!} + + @endif @endforeach @endif