Hide units when empty

This commit is contained in:
Oliver Walters 2021-02-12 20:01:09 +11:00
parent b43d6a2ad4
commit b22b82877d
2 changed files with 3 additions and 1 deletions

View File

@ -97,11 +97,13 @@
</a></td>
</tr>
{% endif %}
{% if part.units %}
<tr>
<td></td>
<td><b>{% trans "Units" %}</b></td>
<td>{{ part.units }}</td>
</tr>
{% endif %}
{% if part.minimum_stock > 0 %}
<tr>
<td><span class='fas fa-greater-than-equal'></span></td>

View File

@ -119,7 +119,7 @@
<td>
<h4>{% trans "Available Stock" %}</h4>
</td>
<td><h4>{% decimal part.available_stock %} {{ part.units }}</h4></td>
<td><h4>{% decimal part.available_stock %}{% if part.units %} {{ part.units }}{% endif %}</h4></td>
</tr>
<tr>
<td><span class='fas fa-map-marker-alt'></span></td>