mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Added default location/address to custom report
This commit is contained in:
parent
c1838a60df
commit
2253439940
|
@ -503,6 +503,19 @@ class ReportsController extends Controller
|
|||
$header[] = trans('general.zip');
|
||||
}
|
||||
|
||||
if ($request->has('rtd_location')) {
|
||||
$header[] = trans('admin/hardware/form.default_location');
|
||||
}
|
||||
if ($request->has('rtd_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');
|
||||
$header[] = trans('general.type');
|
||||
|
@ -671,12 +684,25 @@ class ReportsController extends Controller
|
|||
}
|
||||
|
||||
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 : '';
|
||||
$row[] = ($asset->defaultLoc) ? $asset->defaultLoc->address : '';
|
||||
$row[] = ($asset->defaultLoc) ? $asset->defaultLoc->address2 : '';
|
||||
$row[] = ($asset->defaultLoc) ? $asset->defaultLoc->city : '';
|
||||
$row[] = ($asset->defaultLoc) ? $asset->defaultLoc->state : '';
|
||||
$row[] = ($asset->defaultLoc) ? $asset->defaultLoc->country : '';
|
||||
$row[] = ($asset->defaultLoc) ? $asset->defaultLoc->zip : '';
|
||||
}
|
||||
|
||||
if ($request->has('rtd_location')) {
|
||||
$row[] = ($asset->location) ? $asset->defaultLoc->present()->name() : '';
|
||||
}
|
||||
|
||||
if ($request->has('rtd_location_address')) {
|
||||
$row[] = ($asset->defaultLoc) ? $asset->defaultLoc->address : '';
|
||||
$row[] = ($asset->defaultLoc) ? $asset->defaultLoc->address2 : '';
|
||||
$row[] = ($asset->defaultLoc) ? $asset->defaultLoc->city : '';
|
||||
$row[] = ($asset->defaultLoc) ? $asset->defaultLoc->state : '';
|
||||
$row[] = ($asset->defaultLoc) ? $asset->defaultLoc->country : '';
|
||||
$row[] = ($asset->defaultLoc) ? $asset->defaultLoc->zip : '';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -118,9 +118,23 @@
|
|||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('location_address', '1', '1', ['class' => 'minimal']) }}
|
||||
{{ trans('general.address') }}
|
||||
- {{ trans('general.address') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('rtd_location', '1', '1', ['class' => 'minimal']) }}
|
||||
{{ trans('admin/hardware/form.default_location') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('rtd_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']) }}
|
||||
|
|
Loading…
Reference in a new issue