A free open source IT asset/license management system
Added location address to custom asset report export
snipe115d6e29df06
diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.phpindex e8ef1f3962..e0a1f5aa58 100644--- a/app/Http/Controllers/ReportsController.php+++ b/app/Http/Controllers/ReportsController.php@@ -494,6 +494,14 @@ class ReportsController extends Controllerif ($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());diff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.phpindex 2e311b8bfa..1b9817fce4 100644--- a/resources/views/reports/custom.blade.php+++ b/resources/views/reports/custom.blade.php@@ -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']) }}