mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 10:14:39 +00:00
421 (#507)
* refactor to be stock/entry/{entryId} * Allow recipeform add productworkflow * on document ready stockdetail filter based on ProductPicker * openDate fixes for undo * RefreshStockDetailRow refresh location-id
This commit is contained in:
@@ -124,11 +124,6 @@ class StockApiController extends BaseApiController
|
||||
throw new \Exception('Request body could not be parsed (probably invalid JSON format or missing/wrong Content-Type header)');
|
||||
}
|
||||
|
||||
if (!array_key_exists('id', $requestBody))
|
||||
{
|
||||
throw new \Exception('A stock row id is required');
|
||||
}
|
||||
|
||||
if (!array_key_exists('amount', $requestBody))
|
||||
{
|
||||
throw new \Exception('An amount is required');
|
||||
@@ -152,7 +147,7 @@ class StockApiController extends BaseApiController
|
||||
$locationId = $requestBody['location_id'];
|
||||
}
|
||||
|
||||
$bookingId = $this->StockService->EditStockEntry($requestBody['id'], $requestBody['amount'], $bestBeforeDate, $locationId, $price, $requestBody['open']);
|
||||
$bookingId = $this->StockService->EditStockEntry($args['entryId'], $requestBody['amount'], $bestBeforeDate, $locationId, $price, $requestBody['open']);
|
||||
return $this->ApiResponse($this->Database->stock_log($bookingId));
|
||||
}
|
||||
catch (\Exception $ex)
|
||||
|
Reference in New Issue
Block a user