Skip to content

A free open source IT asset/license management system

Include notes in custom asset report

snipe729b709de25c
diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php
index 2c08b7cbde..63912c1a07 100644
--- a/app/Http/Controllers/ReportsController.php
+++ b/app/Http/Controllers/ReportsController.php
@@ -502,6 +502,10 @@ class ReportsController extends Controller
$header[] = trans('admin/hardware/form.expected_checkin');
}
+ if (e(Input::get('notes')) == '1') {
+ $header[] = 'Notes';
+ }
+
foreach ($customfields as $customfield) {
if (e(Input::get($customfield->db_column_name())) == '1') {
@@ -638,6 +642,14 @@ class ReportsController extends Controller
}
}
+ if (e(Input::get('notes')) == '1') {
+ if ($asset->notes) {
+ $row[] = '"' .$asset->notes. '"';
+ } else {
+ $row[] = ''; // Empty string if unassigned
+ }
+ }
+
foreach ($customfields as $customfield) {
$column_name = $customfield->db_column_name();
if (e(Input::get($customfield->db_column_name())) == '1') {
diff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.php
index fb1c00f39f..75802052be 100644
--- a/resources/views/reports/custom.blade.php
+++ b/resources/views/reports/custom.blade.php
@@ -150,6 +150,12 @@
{{ trans('admin/hardware/form.expected_checkin') }}
</label>
</div>
+ <div class="checkbox col-md-12">
+ <label>
+ {{ Form::checkbox('notes', '1') }}
+ {{ trans('general.notes') }}
+ </label>
+ </div>
@foreach ($customfields as $customfield)
<div class="checkbox col-md-12">