Skip to content

A free open source IT asset/license management system

Adds expected checkin to custom reports

snipe37a6599978ba
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') }}
</label>
</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)
<div class="checkbox col-md-12">