mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 20:36:15 +02:00
StockApiController transactionId
This commit is contained in:
parent
286c326768
commit
8d67d4be17
|
|
@ -276,8 +276,14 @@ class StockApiController extends BaseApiController
|
|||
{
|
||||
$consumeExact = $requestBody['exact_amount'];
|
||||
}
|
||||
|
||||
$transactionId = null;
|
||||
|
||||
if (array_key_exists('transaction_id', $requestBody) && is_numeric($requestBody['transaction_id']))
|
||||
{
|
||||
$transactionId = $requestBody['transaction_id'];
|
||||
}
|
||||
|
||||
$bookingId = $this->getStockService()->ConsumeProduct($args['productId'], $requestBody['amount'], $spoiled, $transactionType, $specificStockEntryId, $recipeId, $locationId, $transactionId, false, $consumeExact);
|
||||
return $this->ApiResponse($response, $this->getDatabase()->stock_log($bookingId));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user