mirror of
https://github.com/grocy/grocy.git
synced 2025-08-16 02:34:44 +00:00
Print stock entry labels also on inventory when adding products (closes #1713)
This commit is contained in:
@@ -495,7 +495,13 @@ class StockApiController extends BaseApiController
|
||||
$shoppingLocationId = $requestBody['shopping_location_id'];
|
||||
}
|
||||
|
||||
$transactionId = $this->getStockService()->InventoryProduct($args['productId'], $requestBody['new_amount'], $bestBeforeDate, $locationId, $price, $shoppingLocationId, $purchasedDate);
|
||||
$stockLabelType = 0;
|
||||
if (array_key_exists('stock_label_type', $requestBody) && is_numeric($requestBody['stock_label_type']))
|
||||
{
|
||||
$stockLabelType = intval($requestBody['stock_label_type']);
|
||||
}
|
||||
|
||||
$transactionId = $this->getStockService()->InventoryProduct($args['productId'], $requestBody['new_amount'], $bestBeforeDate, $locationId, $price, $shoppingLocationId, $purchasedDate, $stockLabelType);
|
||||
$args['transactionId'] = $transactionId;
|
||||
return $this->StockTransactions($request, $response, $args);
|
||||
}
|
||||
|
Reference in New Issue
Block a user