diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html
index 7fb5ed9b56a..315478fc649 100644
--- a/erpnext/templates/pages/order.html
+++ b/erpnext/templates/pages/order.html
@@ -72,8 +72,7 @@
- {%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase
- Order'] else doc.customer_name %}
+ {%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase Order'] else doc.customer_name %}
{{ party_name }}
{% if doc.contact_display and doc.contact_display != party_name %}