mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Change the condition to 'bigger or equal' instead of just 'bigger than' in ComponentsController checkout api
This commit is contained in:
parent
3821c4d372
commit
7dfab3a6e2
|
@ -220,7 +220,7 @@ class ComponentsController extends Controller
|
||||||
$this->authorize('checkout', $component);
|
$this->authorize('checkout', $component);
|
||||||
|
|
||||||
|
|
||||||
if ($component->numRemaining() > $request->get('assigned_qty')) {
|
if ($component->numRemaining() >= $request->get('assigned_qty')) {
|
||||||
|
|
||||||
if (!$asset = Asset::find($request->input('assigned_to'))) {
|
if (!$asset = Asset::find($request->input('assigned_to'))) {
|
||||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')));
|
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')));
|
||||||
|
|
Loading…
Reference in a new issue