* 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:
kriddles
2020-01-22 14:08:49 -06:00
committed by Bernd Bestel
parent 101355cae2
commit ef9f28d154
8 changed files with 114 additions and 94 deletions

View File

@@ -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)