Skip to content

Commit

Permalink
Small fixes for location printing when relationships are missing/inva…
Browse files Browse the repository at this point in the history
…lid, per snipe#9521

Signed-off-by: snipe <[email protected]>
  • Loading branch information
snipe committed May 5, 2021
1 parent d8d3fa2 commit ece627b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions resources/views/locations/print.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@

<tr>
<td>{{ $counter }}</td>
<td>{{ $user->company->name }}</td>
<td>{{ $user->first_name }} {{ $user->last_name }}</td>
<td>{{ $user->employee_num }}</td>
<td>{{ $user->department->name }}</td>
<td>{{ $user->location->name }}</td>
<td>{{ (($user) && ($user->company)) ? $user->company->name : '' }}</td>
<td>{{ ($user) ? $user->first_name .' '. $user->last_name : '' }}</td>
<td>{{ ($user) ? $user->employee_num : '' }}</td>
<td>{{ (($user) && ($user->department)) ? $user->department->name : '' }}</td>
<td>{{ (($user) && ($user->location)) ? $user->location->name : '' }}</td>
</tr>
@php
$counter++
Expand Down Expand Up @@ -131,11 +131,11 @@
<td>{{ $counter }}</td>
<td>{{ $asset->asset_tag }}</td>
<td>{{ $asset->name }}</td>
<td>{{ $asset->model->category->name }}</td>
<td>{{ $asset->model->manufacturer->name }}</td>
<td>{{ $asset->model->name }} {{ $asset->model->model_number }}</td>
<td>{{ $asset->serial }}</td>
<td>{{ $asset->location->name }}</td>
<td>{{ (($asset->model) && ($asset->model->category)) ? $asset->model->category->name : '' }}</td>
<td>{{ (($asset->model) && ($asset->model->manufacturer)) ? $asset->model->manufacturer->name : '' }}</td>
<td>{{ ($asset->model) ? $asset->model->name : '' }}</td>
<td>{{ $asset->serial }}</td>
<td>{{ $asset->location->name }}</td>
<td>{{ $asset->last_checkout }}</td>
<td>{{ $asset->expected_checkin }}</td>
</tr>
Expand Down

0 comments on commit ece627b

Please sign in to comment.