mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fix qty requirements for Components API checkout
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
7a0d3f788f
commit
b9dc7f88d0
|
@ -263,7 +263,7 @@ class ComponentsController extends Controller
|
|||
}
|
||||
|
||||
// Make sure there is at least one available to checkout
|
||||
if ($component->numRemaining() <= $request->get('assigned_qty')) {
|
||||
if ($component->numRemaining() < $request->get('assigned_qty')) {
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/components/message.checkout.unavailable', ['remaining' => $component->numRemaining(), 'requested' => $request->get('assigned_qty')])));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue