mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add 'allocated' column to Build detail view
This commit is contained in:
parent
29b94c91f3
commit
85869c07f6
@ -264,7 +264,8 @@ class Build(models.Model):
|
||||
for item in self.part.bom_items.all():
|
||||
part = {'part': item.sub_part,
|
||||
'per_build': item.quantity,
|
||||
'quantity': item.quantity * self.quantity
|
||||
'quantity': item.quantity * self.quantity,
|
||||
'allocated': self.getAllocatedQuantity(item.sub_part)
|
||||
}
|
||||
|
||||
parts.append(part)
|
||||
|
@ -85,7 +85,8 @@
|
||||
<tr>
|
||||
<th>Part</th>
|
||||
<th>Required</th>
|
||||
<th>Stock</th>
|
||||
<th>Available</th>
|
||||
<th>Allocated</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -94,6 +95,7 @@
|
||||
<td><a href="{% url 'part-detail' item.part.id %}">{{ item.part.name }}</a></td>
|
||||
<td>{{ item.quantity }}</td>
|
||||
<td>{{ item.part.total_stock }}</td>
|
||||
<td>{{ item.allocated }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
Loading…
Reference in New Issue
Block a user