diff --git a/src/Entity/Part.php b/src/Entity/Part.php index a420722c..16be2d6c 100644 --- a/src/Entity/Part.php +++ b/src/Entity/Part.php @@ -665,7 +665,7 @@ class Part extends AttachmentContainingDBElement * * @throws \Exception if there was an error */ - public function getAveragePrice(int $quantity = 1, $multiplier = null) : float + public function getAveragePrice(int $quantity = 1, $multiplier = null) : ?float { $prices = $this->getPrices($quantity, $multiplier, true); $average_price = null; diff --git a/templates/Parts/info/show_part_info.html.twig b/templates/Parts/info/show_part_info.html.twig index 913b2d11..5fd18d89 100644 --- a/templates/Parts/info/show_part_info.html.twig +++ b/templates/Parts/info/show_part_info.html.twig @@ -79,7 +79,7 @@ {% endif %}