public function postTake(PartTakeRequest $request, $workOrderId, $itemId, $stockId)
    {
        $workOrder = $this->workOrder->findOrFail($workOrderId);

        $item = $this->inventory->findOrFail($itemId);

        $stock = $item->stocks()->findOrFail($stockId);

        return $this->dispatch(new Take($request, $workOrder, $stock));
    }
public function postTake(PartTakeRequest $request, $workOrderId, $itemId, $stockId)
    {
        $workOrder = $this->workOrder->findOrFail($workOrderId);

        $item = $this->inventory->findOrFail($itemId);

        $stock = $item->stocks()->findOrFail($stockId);

        return $this->dispatch(new Take($request, $workOrder, $stock));
    }
public function postTake ( PartTakeRequest $ request , $ workOrderId , $ itemId , $ stockId ) { $ workOrder = $ this -> workOrder -> findOrFail ( $ workOrderId ) ; $ item = $ this -> inventory -> findOrFail ( $ itemId ) ; $ stock = $ item -> stocks ( ) -> findOrFail ( $ stockId ) ; return $ this -> dispatch ( new Take ( $ request , $ workOrder , $ stock ) ) ; }
Processes taking inventory for the specified work order.

@param PartTakeRequest $request
@param int|string      $workOrderId
@param int|string      $itemId
@param int|string      $stockId

@throws \Stevebauman\Inventory\Exceptions\InvalidQuantityException
@throws \Stevebauman\Inventory\Exceptions\NotEnoughStockException

@return bool
Processes taking inventory for the specified work order .