mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-04 15:34:35 +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;
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
<div class="tab-pane fade {% if part.comment is empty %} show active{% endif %}" id="attachments" role="tabpanel" aria-labelledby="profile-tab">
|
||||
Test
|
||||
{% include "Parts/info/_attachments_info.html.twig" %}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="suppliers" role="tabpanel" aria-labelledby="profile-tab">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue