mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 12:17:05 -08:00
Fixed weird order number thing
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
5d4e704fac
commit
78d8e32a22
|
@ -137,9 +137,6 @@ class AssetsController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$request->filled('order_number') ? $assets = $assets->where('assets.order_number', '=', e($request->get('order_number'))) : '';
|
|
||||||
|
|
||||||
// Make sure the offset and limit are actually integers and do not exceed system limits
|
// Make sure the offset and limit are actually integers and do not exceed system limits
|
||||||
$offset = ($request->input('offset') > $assets->count()) ? $assets->count() : abs($request->input('offset'));
|
$offset = ($request->input('offset') > $assets->count()) ? $assets->count() : abs($request->input('offset'));
|
||||||
$limit = app('api_limit_value');
|
$limit = app('api_limit_value');
|
||||||
|
@ -303,6 +300,10 @@ class AssetsController extends Controller
|
||||||
$assets->where('assets.byod', '=', $request->input('byod'));
|
$assets->where('assets.byod', '=', $request->input('byod'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($request->filled('order_number')) {
|
||||||
|
$assets->where('assets.order_number', '=', $request->get('order_number'));
|
||||||
|
}
|
||||||
|
|
||||||
// This is kinda gross, but we need to do this because the Bootstrap Tables
|
// This is kinda gross, but we need to do this because the Bootstrap Tables
|
||||||
// API passes custom field ordering as custom_fields.fieldname, and we have to strip
|
// API passes custom field ordering as custom_fields.fieldname, and we have to strip
|
||||||
// that out to let the default sorter below order them correctly on the assets table.
|
// that out to let the default sorter below order them correctly on the assets table.
|
||||||
|
|
Loading…
Reference in a new issue