Skip to content

A free open source IT asset/license management system

Fixed depreciation report not showing assigned to

snipe3b5e4c44ebbc
diff --git a/resources/views/reports/depreciation.blade.php b/resources/views/reports/depreciation.blade.php
index 383c6ddd52..f36f24483a 100644
--- a/resources/views/reports/depreciation.blade.php
+++ b/resources/views/reports/depreciation.blade.php
@@ -74,13 +74,14 @@
@endif
</td>
<td>
- @if ($asset->assignedTo)
- @if ($asset->assignedTo->deleted_at!='')
- <del>{{ $asset->assignedTo->present()->name() }}</del>
+ @if ($asset->checkedOutToUser())
+ {{ $asset->assigned->getFullNameAttribute() }}
@else
- {!! $asset->assignedTo->present()->nameUrl() !!}
+
+ @if ($asset->assigned)
+ {{ $asset->assigned->name }}
+ @endif
@endif
- @endif
</td>
<td>
@if ($asset->location)