[CLEAR-38] Round nutrition values

This commit is contained in:
Artur Nowakowski 2020-01-19 15:18:45 +01:00
parent 30d017a44f
commit 5cb1d1d86f

View File

@ -75,6 +75,11 @@ class UsersRepository implements UsersRepositoryInterface
$nutritionSum[$name] += $value; $nutritionSum[$name] += $value;
} }
} }
foreach($nutritionSum as $k => $v){
$nutritionSum[$k] = round($v, 2);
}
$recipeHistory[] = array_merge(['date' => $date], $nutritionSum); $recipeHistory[] = array_merge(['date' => $date], $nutritionSum);
} }