Show formatted amount values on part info page.

This commit is contained in:
Jan Böhmer 2019-08-26 15:09:05 +02:00
parent f5ebce2a77
commit 5cc08af7b6
5 changed files with 147 additions and 6 deletions

View file

@ -25,9 +25,9 @@
</h6> #}
<h6><i class="fas fa-shapes fa-fw"></i>
<span class="text-muted">
<span title="{% trans %}instock.label{% endtrans %}">{{ part.amountSum }}</span>
<span title="{% trans %}instock.label{% endtrans %}">{{ part.amountSum | amountFormat(part.partUnit) }}</span>
/
<span title="{% trans %}mininstock.label{% endtrans %}">{{ part.minAmount }}</span>
<span title="{% trans %}mininstock.label{% endtrans %}">{{ part.minAmount | amountFormat(part.partUnit) }}</span>
</span>
</h6>
<h6 class="" title="{% trans %}footprint.label{% endtrans %}">

View file

@ -28,7 +28,7 @@
<i class="fas fa-question-circle fa-fw"></i> {% trans %}part_lots.instock_unknown{% endtrans %}
</span>
{% else %}
{{ lot.amount }}
{{ lot.amount | amountFormat(part.partUnit, {'decimals': 5}) }}
{% endif %}
</td>
<td>