Adds expected checkin to custom reports

This commit is contained in:
snipe 2016-11-15 01:55:27 -08:00
parent cbabcb9197
commit 37a6599978
2 changed files with 20 additions and 0 deletions

View file

@ -573,6 +573,10 @@ class ReportsController extends Controller
$header[] = 'Value'; $header[] = 'Value';
$header[] = 'Diff'; $header[] = 'Diff';
} }
if (e(Input::get('expected_checkin')) == '1') {
$header[] = trans('admin/hardware/form.expected_checkin');
}
foreach ($customfields as $customfield) { foreach ($customfields as $customfield) {
if (e(Input::get($customfield->db_column_name())) == '1') { if (e(Input::get($customfield->db_column_name())) == '1') {
@ -701,6 +705,13 @@ class ReportsController extends Controller
$row[] = '"' . Helper::formatCurrencyOutput($depreciation) . '"'; $row[] = '"' . Helper::formatCurrencyOutput($depreciation) . '"';
$row[] = '"' . Helper::formatCurrencyOutput($asset->purchase_cost) . '"'; $row[] = '"' . Helper::formatCurrencyOutput($asset->purchase_cost) . '"';
} }
if (e(Input::get('expected_checkin')) == '1') {
if ($asset->expected_checkin) {
$row[] = '"' .e($asset->expected_checkin). '"';
} else {
$row[] = ''; // Empty string if blankd
}
}
foreach ($customfields as $customfield) { foreach ($customfields as $customfield) {
$column_name = $customfield->db_column_name(); $column_name = $customfield->db_column_name();

View file

@ -146,6 +146,15 @@
{{ trans('general.depreciation') }} {{ trans('general.depreciation') }}
</label> </label>
</div> </div>
<div class="checkbox col-md-12">
<label>
{{ Form::checkbox('expected_checkin', '1') }}
{{ trans('admin/hardware/form.expected_checkin') }}
</label>
</div>
@foreach ($customfields as $customfield) @foreach ($customfields as $customfield)
<div class="checkbox col-md-12"> <div class="checkbox col-md-12">