Fixed self production amount was wrong for tare weight handling enabled products (fixes #1431)

This commit is contained in:
Bernd Bestel
2021-07-03 18:30:53 +02:00
parent 765ba77621
commit bcf963ac49
3 changed files with 8 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ class RecipesService extends BaseService
if (!empty($recipeRow->product_id))
{
$recipeResolvedRow = $this->getDatabase()->recipes_resolved()->where('recipe_id = :1', $recipeId)->fetch();
$this->getStockService()->AddProduct($recipeRow->product_id, floatval($recipeRow->desired_servings), null, StockService::TRANSACTION_TYPE_SELF_PRODUCTION, date('Y-m-d'), floatval($recipeResolvedRow->costs));
$this->getStockService()->AddProduct($recipeRow->product_id, floatval($recipeRow->desired_servings), null, StockService::TRANSACTION_TYPE_SELF_PRODUCTION, date('Y-m-d'), floatval($recipeResolvedRow->costs), null, null, $dummyTransactionId, 0, true);
}
}