From 37a6599978badc35cbfa8f657fc027c19642d8bd Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 15 Nov 2016 01:55:27 -0800 Subject: [PATCH] Adds expected checkin to custom reports --- app/Http/Controllers/ReportsController.php | 11 +++++++++++ resources/views/reports/custom.blade.php | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 52559f896c..b0927c1c55 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -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(); diff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.php index 397df1d4a0..2a25450603 100644 --- a/resources/views/reports/custom.blade.php +++ b/resources/views/reports/custom.blade.php @@ -146,6 +146,15 @@ {{ trans('general.depreciation') }} +
+ +
+ + + @foreach ($customfields as $customfield)