Skip to content

Commit

Permalink
Merge pull request #13762 from snipe/fixes/make_sure_order_number_is_…
Browse files Browse the repository at this point in the history
…not_array

Make sure order number is not an array
  • Loading branch information
snipe authored Oct 18, 2023
2 parents 825c800 + 1be503b commit bc6f014
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public function index(Request $request, $audit = null)
}

if ($request->filled('order_number')) {
$assets->where('assets.order_number', '=', $request->get('order_number'));
$assets->where('assets.order_number', '=', strval($request->get('order_number')));
}

// This is kinda gross, but we need to do this because the Bootstrap Tables
Expand Down
4 changes: 2 additions & 2 deletions resources/views/hardware/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{{ trans('general.assets') }}

@if (Request::has('order_number'))
: Order #{{ Request::get('order_number') }}
: Order #{{ strval(Request::get('order_number')) }}
@endif
@stop

Expand Down Expand Up @@ -88,7 +88,7 @@
class="table table-striped snipe-table"
data-url="{{ route('api.assets.index',
array('status' => e(Request::get('status')),
'order_number'=>e(Request::get('order_number')),
'order_number'=>e(strval(Request::get('order_number'))),
'company_id'=>e(Request::get('company_id')),
'status_id'=>e(Request::get('status_id')))) }}"
data-export-options='{
Expand Down

0 comments on commit bc6f014

Please sign in to comment.