From c909d3b5355b87b71dde205312ccbf3acf69907f Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Sun, 7 Feb 2021 19:30:33 -0800 Subject: [PATCH] Calculate Recipe ingredient nutrients from serving amount --- app/Models/IngredientAmount.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/IngredientAmount.php b/app/Models/IngredientAmount.php index f132abc..72711fe 100644 --- a/app/Models/IngredientAmount.php +++ b/app/Models/IngredientAmount.php @@ -146,7 +146,7 @@ final class IngredientAmount extends Model $this->amount, $this->unit ), - Recipe::class => $this->ingredient->{"{$method}Total"}(), + Recipe::class => $this->ingredient->{"{$method}PerServing"}() * $this->amount, default => 0 }; }