From 0f3b77ee2d99396a557328850240325af25a749e Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 10 May 2023 14:45:31 -0700 Subject: [PATCH 1/2] Added multi-select option to custom report Signed-off-by: snipe --- app/Http/Controllers/ReportsController.php | 2 +- resources/views/partials/forms/edit/location-select.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 51c78d928..8ffe1faf0 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -595,7 +595,7 @@ class ReportsController extends Controller 'model.category', 'model.manufacturer', 'supplier'); if ($request->filled('by_location_id')) { - $assets->where('assets.location_id', $request->input('by_location_id')); + $assets->whereIn('assets.location_id', $request->input('by_location_id')); } if ($request->filled('by_rtd_location_id')) { diff --git a/resources/views/partials/forms/edit/location-select.blade.php b/resources/views/partials/forms/edit/location-select.blade.php index 6603f5878..719370fe7 100644 --- a/resources/views/partials/forms/edit/location-select.blade.php +++ b/resources/views/partials/forms/edit/location-select.blade.php @@ -3,7 +3,7 @@ {{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
- @if ($location_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))