Skip to content

A free open source IT asset/license management system

Fix empty signatures in print page

36864dfdbc95b5c11
diff --git a/resources/views/users/print.blade.php b/resources/views/users/print.blade.php
index 40575e7efc..b186e9d17a 100644
--- a/resources/views/users/print.blade.php
+++ b/resources/views/users/print.blade.php
@@ -147,8 +147,8 @@
<td>
{{ Helper::getFormattedDateObject($asset->last_checkout, 'datetime', false) }}</td>
<td>
- @if (($asset->assetlog->first()) && ($asset->assetlog->first()->accept_signature!=''))
- <img style="width:auto;height:100px;" src="{{ asset('/') }}display-sig/{{ $asset->assetlog->first()->accept_signature }}">
+ @if (($asset->assetlog->firstWhere('action_type', 'accepted')) && ($asset->assetlog->firstWhere('action_type', 'accepted')->accept_signature!=''))
+ <img style="width:auto;height:100px;" src="{{ asset('/') }}display-sig/{{ $asset->assetlog->firstWhere('action_type', 'accepted')->accept_signature }}">
@endif
</td>
</tr>
@@ -174,8 +174,8 @@
<td>
{{ Helper::getFormattedDateObject($asset->last_checkout, 'datetime', false) }}</td>
<td>
- @if (($asset->assetlog->first()) && ($asset->assetlog->first()->accept_signature!=''))
- <img style="width:auto;height:100px;" src="{{ asset('/') }}display-sig/{{ $asset->assetlog->first()->accept_signature }}">
+ @if (($asset->assetlog->firstWhere('action_type', 'accepted')) && ($asset->assetlog->firstWhere('action_type', 'accepted')->accept_signature!=''))
+ <img style="width:auto;height:100px;" src="{{ asset('/') }}display-sig/{{ $asset->assetlog->firstWhere('action_type', 'accepted')->accept_signature }}">
@endif
</td>
</tr>