mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 19:16:37 +00:00
Add recipe name to note of the created stock entry when self producing products (closes #2497)
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
### Recipes
|
### Recipes
|
||||||
|
|
||||||
- xxx
|
- When self producing a product ("Produces product" recipe option) the name of the recipe is now added to the note field of the created stock entry
|
||||||
|
|
||||||
### Meal plan
|
### Meal plan
|
||||||
|
|
||||||
|
@@ -114,7 +114,7 @@ class RecipesService extends BaseService
|
|||||||
{
|
{
|
||||||
$product = $this->getDatabase()->products()->where('id = :1', $productId)->fetch();
|
$product = $this->getDatabase()->products()->where('id = :1', $productId)->fetch();
|
||||||
$recipeResolvedRow = $this->getDatabase()->recipes_resolved()->where('recipe_id = :1', $recipeId)->fetch();
|
$recipeResolvedRow = $this->getDatabase()->recipes_resolved()->where('recipe_id = :1', $recipeId)->fetch();
|
||||||
$this->getStockService()->AddProduct($productId, $amount, null, StockService::TRANSACTION_TYPE_SELF_PRODUCTION, date('Y-m-d'), $recipeResolvedRow->costs_per_serving, null, null, $dummyTransactionId, $product->default_stock_label_type, true);
|
$this->getStockService()->AddProduct($productId, $amount, null, StockService::TRANSACTION_TYPE_SELF_PRODUCTION, date('Y-m-d'), $recipeResolvedRow->costs_per_serving, null, null, $dummyTransactionId, $product->default_stock_label_type, true, $recipe->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user