Merge branch 'develop'

This commit is contained in:
snipe 2018-03-26 16:05:50 -07:00
commit b41adc2eee
2 changed files with 24 additions and 0 deletions

View file

@ -494,6 +494,14 @@ class ReportsController extends Controller
if ($request->has('location')) {
$header[] = trans('admin/hardware/table.location');
}
if ($request->has('location_address')) {
$header[] = trans('general.address');
$header[] = trans('general.address');
$header[] = trans('general.city');
$header[] = trans('general.state');
$header[] = trans('general.country');
$header[] = trans('general.zip');
}
if ($request->has('assigned_to')) {
$header[] = trans('admin/hardware/table.checkoutto');
@ -662,6 +670,16 @@ class ReportsController extends Controller
$row[] = ($asset->location) ? $asset->location->present()->name() : '';
}
if ($request->has('location_address')) {
$row[] = ($asset->location) ? $asset->location->address : '';
$row[] = ($asset->location) ? $asset->location->address2 : '';
$row[] = ($asset->location) ? $asset->location->city : '';
$row[] = ($asset->location) ? $asset->location->state : '';
$row[] = ($asset->location) ? $asset->location->country : '';
$row[] = ($asset->location) ? $asset->location->zip : '';
}
if ($request->has('assigned_to')) {
$row[] = ($asset->checkedOutToUser() && $asset->assigned) ? e($asset->assigned->getFullNameAttribute()) : ($asset->assigned ? e($asset->assigned->display_name) : '');
$row[] = ($asset->checkedOutToUser() && $asset->assigned) ? 'user' : e($asset->assignedType());

View file

@ -115,6 +115,12 @@
{{ trans('general.location') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('location_address', '1', '1', ['class' => 'minimal']) }}
{{ trans('general.address') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('assigned_to', '1', '1', ['class' => 'minimal']) }}