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[] = 'Diff';
}
if (e(Input::get('expected_checkin')) == '1') {
$header[] = trans('admin/hardware/form.expected_checkin');
}
foreach ($customfields as $customfield) {
if (e(Input::get($customfield->db_column_name())) == '1') {
@@ -701,6 +705,13 @@ class ReportsController extends Controller
$row[] = '"' . Helper::formatCurrencyOutput($depreciation) . '"';
$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) {
$column_name = $customfield->db_column_name();