mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 16:44:55 +00:00
This commit is contained in:
@@ -165,7 +165,7 @@ class StockService extends BaseService
|
||||
}
|
||||
}
|
||||
|
||||
public function ConsumeProduct(int $productId, float $amount, bool $spoiled, $transactionType, $specificStockEntryId = 'default')
|
||||
public function ConsumeProduct(int $productId, float $amount, bool $spoiled, $transactionType, $specificStockEntryId = 'default', $recipeId = null)
|
||||
{
|
||||
if (!$this->ProductExists($productId))
|
||||
{
|
||||
@@ -206,7 +206,8 @@ class StockService extends BaseService
|
||||
'stock_id' => $stockEntry->stock_id,
|
||||
'transaction_type' => $transactionType,
|
||||
'price' => $stockEntry->price,
|
||||
'opened_date' => $stockEntry->opened_date
|
||||
'opened_date' => $stockEntry->opened_date,
|
||||
'recipe_id' => $recipeId
|
||||
));
|
||||
$logRow->save();
|
||||
|
||||
@@ -228,7 +229,8 @@ class StockService extends BaseService
|
||||
'stock_id' => $stockEntry->stock_id,
|
||||
'transaction_type' => $transactionType,
|
||||
'price' => $stockEntry->price,
|
||||
'opened_date' => $stockEntry->opened_date
|
||||
'opened_date' => $stockEntry->opened_date,
|
||||
'recipe_id' => $recipeId
|
||||
));
|
||||
$logRow->save();
|
||||
|
||||
|
Reference in New Issue
Block a user