2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-03 05:48:47 +00:00

Merge pull request #1289 from SchrodingersGat/null-units

Hide units when empty
This commit is contained in:
Oliver 2021-02-12 21:32:33 +11:00 committed by GitHub
commit 67b6123b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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>