diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index 89bbc5df26..3204acd1ce 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -1293,6 +1293,11 @@ class Part(InvenTreeBarcodeMixin, MetadataMixin, MPTTModel): ) for item in queryset.all(): + + if item.quantity <= 0: + # Ignore zero-quantity items + continue + # Iterate through each item in the queryset, work out the limiting quantity quantity = item.available_stock + item.substitute_stock