diff --git a/erpnext/templates/print_formats/includes/item_table_qty.html b/erpnext/templates/print_formats/includes/item_table_qty.html
index 0c800698854..239859eea19 100644
--- a/erpnext/templates/print_formats/includes/item_table_qty.html
+++ b/erpnext/templates/print_formats/includes/item_table_qty.html
@@ -1,4 +1,6 @@
-{% if (doc.stock_uom and not doc.is_print_hide("stock_uom")) or (doc.uom and not doc.is_print_hide("uom")) -%}
-{{ _(doc.uom or doc.stock_uom) }}
+{% if (doc.uom and not doc.is_print_hide("uom")) %}
+ {{ _(doc.uom) }}
+{% elif (doc.stock_uom and not doc.is_print_hide("stock_uom")) %}
+ {{ _(doc.stock_uom) }}
{%- endif %}
{{ doc.get_formatted("qty", doc) }}