mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Print stock entry labels when consuming a "Produces product" recipe (closes #2123)
This commit is contained in:
@@ -104,8 +104,9 @@ class RecipesService extends BaseService
|
||||
$recipeRow = $this->getDatabase()->recipes()->where('id = :1', $recipeId)->fetch();
|
||||
if (!empty($recipeRow->product_id))
|
||||
{
|
||||
$product = $this->getDatabase()->products()->where('id = :1', $recipeRow->product_id)->fetch();
|
||||
$recipeResolvedRow = $this->getDatabase()->recipes_resolved()->where('recipe_id = :1', $recipeId)->fetch();
|
||||
$this->getStockService()->AddProduct($recipeRow->product_id, floatval($recipeRow->desired_servings), null, StockService::TRANSACTION_TYPE_SELF_PRODUCTION, date('Y-m-d'), floatval($recipeResolvedRow->costs_per_serving), null, null, $dummyTransactionId, 0, true);
|
||||
$this->getStockService()->AddProduct($recipeRow->product_id, floatval($recipeRow->desired_servings), null, StockService::TRANSACTION_TYPE_SELF_PRODUCTION, date('Y-m-d'), floatval($recipeResolvedRow->costs_per_serving), null, null, $dummyTransactionId, $product->default_stock_label_type, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user