mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-03 23:14:36 +02:00
Fixed exception, when a part does not have price informations.
This commit is contained in:
parent
a916c40aa3
commit
717b257778
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue