diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index 64cf8105c4..56f63db2e7 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -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) diff --git a/InvenTree/build/templates/build/detail.html b/InvenTree/build/templates/build/detail.html index 96fad2caa5..9ca444f516 100644 --- a/InvenTree/build/templates/build/detail.html +++ b/InvenTree/build/templates/build/detail.html @@ -85,7 +85,8 @@ Part Required - Stock + Available + Allocated @@ -94,6 +95,7 @@ {{ item.part.name }} {{ item.quantity }} {{ item.part.total_stock }} + {{ item.allocated }} {% endfor %}