Fixes #2817 - adds EOL to custom report

This commit is contained in:
snipe 2016-10-27 14:20:55 -07:00
parent 691f9b621e
commit e4140f4c48
2 changed files with 13 additions and 15 deletions

View file

@ -538,6 +538,9 @@ class ReportsController extends Controller
if (( e(Input::get('purchase_cost')) == '1' ) && ( e(Input::get('depreciation')) != '1' )) {
$header[] = 'Purchase Cost';
}
if (e(Input::get('eol')) == '1') {
$header[] = 'EOL';
}
if (e(Input::get('order')) == '1') {
$header[] = 'Order Number';
}
@ -613,6 +616,9 @@ class ReportsController extends Controller
if (e(Input::get('purchase_cost')) == '1' && ( e(Input::get('depreciation')) != '1' )) {
$row[] = '"' . Helper::formatCurrencyOutput($asset->purchase_cost) . '"';
}
if (e(Input::get('eol')) == '1') {
$row[] = '"' .($asset->eol_date()) ? $asset->eol_date() : ''. '"';
}
if (e(Input::get('order')) == '1') {
if ($asset->order_number) {
$row[] = e($asset->order_number);
@ -621,7 +627,7 @@ class ReportsController extends Controller
}
}
if (e(Input::get('supplier')) == '1') {
if ($asset->supplier_id) {
if ($asset->supplier) {
$row[] = '"' .e($asset->supplier->name) . '"';
} else {
$row[] = '';

View file

@ -41,20 +41,6 @@
</label>
</div>
<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('company_name', '1') }}
{{ trans('general.company') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('asset_tag', '1') }}
@ -104,6 +90,12 @@
{{ trans('admin/hardware/form.cost') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('eol', '1') }}
{{ trans('admin/hardware/table.eol') }}
</label>
</div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('order', '1') }}