mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 14:09:43 -08:00
Hotfixes adding company name to custom report
This commit is contained in:
parent
04898c49b2
commit
d3d36315d3
|
@ -396,6 +396,9 @@ class ReportsController extends Controller
|
||||||
$rows = [ ];
|
$rows = [ ];
|
||||||
$header = [ ];
|
$header = [ ];
|
||||||
|
|
||||||
|
if (e(Input::get('company_name')) == '1') {
|
||||||
|
$header[] = 'Company Name';
|
||||||
|
}
|
||||||
if (e(Input::get('asset_name')) == '1') {
|
if (e(Input::get('asset_name')) == '1') {
|
||||||
$header[] = 'Asset Name';
|
$header[] = 'Asset Name';
|
||||||
}
|
}
|
||||||
|
@ -461,6 +464,10 @@ class ReportsController extends Controller
|
||||||
|
|
||||||
foreach ($assets as $asset) {
|
foreach ($assets as $asset) {
|
||||||
$row = [ ];
|
$row = [ ];
|
||||||
|
|
||||||
|
if (e(Input::get('company_name')) == '1') {
|
||||||
|
$row[] = is_null($asset->company) ? '' : e($asset->company->name);
|
||||||
|
}
|
||||||
if (e(Input::get('asset_name')) == '1') {
|
if (e(Input::get('asset_name')) == '1') {
|
||||||
$row[] = '"' .e($asset->name) . '"';
|
$row[] = '"' .e($asset->name) . '"';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue