mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +00:00
Don't show zero-quantity items when ordering against a build
This commit is contained in:
parent
771a008e84
commit
2b74a0ed2c
@ -13,6 +13,7 @@
|
|||||||
<th>Part</th>
|
<th>Part</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Available</th>
|
<th>Available</th>
|
||||||
|
<th>On Order</th>
|
||||||
<th>Required</th>
|
<th>Required</th>
|
||||||
<th>Allocated</th>
|
<th>Allocated</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -26,6 +27,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>{{ item.part.description }}</td>
|
<td>{{ item.part.description }}</td>
|
||||||
<td>{{ item.part.total_stock }}</td>
|
<td>{{ item.part.total_stock }}</td>
|
||||||
|
<td>{{ item.part.on_order }}</td>
|
||||||
<td>{{ item.quantity }}</td>
|
<td>{{ item.quantity }}</td>
|
||||||
<td>{{ item.allocated }}</td>
|
<td>{{ item.allocated }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -255,6 +255,9 @@ class OrderParts(AjaxView):
|
|||||||
parts = build.part.required_parts()
|
parts = build.part.required_parts()
|
||||||
|
|
||||||
for part in parts:
|
for part in parts:
|
||||||
|
# If ordering from a Build page, ignore parts that we have enough of
|
||||||
|
if part.quantity_to_order <= 0:
|
||||||
|
continue
|
||||||
part_ids.add(part.id)
|
part_ids.add(part.id)
|
||||||
except Build.DoesNotExist:
|
except Build.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user