mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Add company name option to reports
This commit is contained in:
parent
7aea9341f8
commit
71be73781b
|
@ -399,6 +399,10 @@ class ReportsController extends Controller
|
|||
$rows = [ ];
|
||||
$header = [ ];
|
||||
|
||||
if (e(Input::get('company_name')) == '1') {
|
||||
$header[] = 'Company Name';
|
||||
}
|
||||
|
||||
if (e(Input::get('asset_name')) == '1') {
|
||||
$header[] = 'Asset Name';
|
||||
}
|
||||
|
@ -464,6 +468,11 @@ class ReportsController extends Controller
|
|||
|
||||
foreach ($assets as $asset) {
|
||||
$row = [ ];
|
||||
|
||||
if (e(Input::get('company_name')) == '1') {
|
||||
$row[] = is_null($asset->company) ? '' : e($asset->company->name);
|
||||
}
|
||||
|
||||
if (e(Input::get('asset_name')) == '1') {
|
||||
$row[] = '"' .e($asset->name) . '"';
|
||||
}
|
||||
|
|
|
@ -34,6 +34,13 @@
|
|||
<div class="box-body">
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('company_name', '1') }}
|
||||
{{ trans('general.company') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('asset_tag', '1') }}
|
||||
|
|
Loading…
Reference in a new issue