mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 05:16: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'];
|
$consumeExact = $requestBody['exact_amount'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$transactionId = null;
|
$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);
|
$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));
|
return $this->ApiResponse($response, $this->getDatabase()->stock_log($bookingId));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user