mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Use child product substitution on consuming during chore execution (fixes #1807)
This commit is contained in:
@@ -203,7 +203,8 @@ class ChoresService extends BaseService
|
||||
|
||||
if ($chore->consume_product_on_execution == 1 && !empty($chore->product_id))
|
||||
{
|
||||
$this->getStockService()->ConsumeProduct($chore->product_id, $chore->product_amount, false, StockService::TRANSACTION_TYPE_CONSUME);
|
||||
$transactionId = uniqid();
|
||||
$this->getStockService()->ConsumeProduct($chore->product_id, $chore->product_amount, false, StockService::TRANSACTION_TYPE_CONSUME, 'default', null, null, $transactionId, true);
|
||||
}
|
||||
|
||||
return $lastInsertId;
|
||||
|
Reference in New Issue
Block a user