Consume any subproduct when consuming a recipe ingredient which is not in stock (fixes #446)

This commit is contained in:
Bernd Bestel
2020-01-27 22:14:11 +01:00
parent dceed6759a
commit e84c7063d3
6 changed files with 41 additions and 20 deletions

View File

@@ -82,7 +82,7 @@ function SumArrayValue($array, $propertyName)
$sum = 0;
foreach($array as $object)
{
$sum += $object->{$propertyName};
$sum += floatval($object->{$propertyName});
}
return $sum;