From b3ea2bfb9a24b3b86c9544b587ece6d78e70baae Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 19 Sep 2019 23:38:15 +1000 Subject: [PATCH] Update badges --- InvenTree/part/templates/part/subcategories.html | 4 +++- InvenTree/stock/templates/stock/location_list.html | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/InvenTree/part/templates/part/subcategories.html b/InvenTree/part/templates/part/subcategories.html index abf61d743e..c503d5504c 100644 --- a/InvenTree/part/templates/part/subcategories.html +++ b/InvenTree/part/templates/part/subcategories.html @@ -12,7 +12,9 @@ {% if child.description %} - {{ child.description }} {% endif %} - {{ child.partcount }} + {% if child.partcount > 0 %} + {{ child.partcount }} Part{% if child.partcount > 1 %}s{% endif %} + {% endif %} {% endfor %} diff --git a/InvenTree/stock/templates/stock/location_list.html b/InvenTree/stock/templates/stock/location_list.html index 9ce7a1814c..a6e1811f46 100644 --- a/InvenTree/stock/templates/stock/location_list.html +++ b/InvenTree/stock/templates/stock/location_list.html @@ -8,7 +8,9 @@ Sub-Locations{{ children|length }}