This commit is contained in:
snipe 2021-09-23 14:32:48 -07:00
commit 6aa7e9cbfa

View file

@ -220,7 +220,7 @@ class ComponentsController extends Controller
$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'))) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')));