public function checkStockLevel($qty)
    {
        $stock_param = $this->config()->get("stock_param");
        $item = $this->Match();
        $stock = ($item->$stock_param) ? $item->$stock_param : 0;
        $return = $stock - $qty;

        $this->extend("updateCheckStockLevel", $return);
        
        return $return;
    }
public function checkStockLevel($qty)
    {
        $stock_param = $this->config()->get("stock_param");
        $item = $this->Match();
        $stock = ($item->$stock_param) ? $item->$stock_param : 0;
        $return = $stock - $qty;

        $this->extend("updateCheckStockLevel", $return);
        
        return $return;
    }
public function checkStockLevel ( $ qty ) { $ stock_param = $ this -> config ( ) -> get ( "stock_param" ) ; $ item = $ this -> Match ( ) ; $ stock = ( $ item -> $ stock_param ) ? $ item -> $ stock_param : 0 ; $ return = $ stock - $ qty ; $ this -> extend ( "updateCheckStockLevel" , $ return ) ; return $ return ; }
Check stock levels for this item, will return the actual number
of remaining stock after removing the current quantity

@param $qty The quantity we want to check against
@return Int
Check stock levels for this item will return the actual number of remaining stock after removing the current quantity