mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 11:10:54 +00:00
Null units fix (#3663)
* Hide units on part page if units are null * Hide null units in stock table * Hide null units in supplier part table * Hide null units in part tables * Template cleanup * Unit test fix
This commit is contained in:
@ -348,7 +348,7 @@
|
||||
<h5>{% trans "Available Quantity" %}</h5>
|
||||
</td>
|
||||
<td>
|
||||
<h5>{% if item.quantity != available %}{% decimal available %} / {% endif %}{% decimal item.quantity %} {% if item.part.units %}{{ item.part.units }}{% endif %}</h5>
|
||||
<h5>{% if item.quantity != available %}{% decimal available %} / {% endif %}{% decimal item.quantity %} {% include "part/part_units.html" with part=item.part %}</h5>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
|
@ -49,7 +49,7 @@ class StockDetailTest(StockViewTestCase):
|
||||
|
||||
# Quantity
|
||||
self.assertIn('<h5>Available Quantity</h5>', html)
|
||||
self.assertIn('<h5>4000 </h5>', html)
|
||||
self.assertIn('<h5>4000', html)
|
||||
|
||||
# Batch code
|
||||
self.assertIn('Batch', html)
|
||||
|
Reference in New Issue
Block a user