mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Add recipe name to note of the created stock entry when self producing products (closes #2497)
This commit is contained in:
parent
b26dfe3fb0
commit
5167ba1154
@ -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
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user