diff --git a/changelog/76_UNRELEASED_xxxx-xx-xx.md b/changelog/76_UNRELEASED_xxxx-xx-xx.md index 7396b76d..5a3a16fc 100644 --- a/changelog/76_UNRELEASED_xxxx-xx-xx.md +++ b/changelog/76_UNRELEASED_xxxx-xx-xx.md @@ -21,7 +21,7 @@ ### 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 diff --git a/services/RecipesService.php b/services/RecipesService.php index adad30fc..230d6d9b 100644 --- a/services/RecipesService.php +++ b/services/RecipesService.php @@ -114,7 +114,7 @@ class RecipesService extends BaseService { $product = $this->getDatabase()->products()->where('id = :1', $productId)->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); } }