duplicate item message
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.py b/erpnext/buying/doctype/purchase_common/purchase_common.py
index d09768e..21791f7 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.py
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.py
@@ -72,8 +72,8 @@
 					frappe.throw(_("{0} must be a Purchased or Sub-Contracted Item in row {1}").format(d.item_code, d.idx))
 			
 			items.append(cstr(d.item_code))
-			if items and len(items) != len(set(items)):
-				frappe.msgprint(_("Warning: Same item has been entered multiple times."))
+		if items and len(items) != len(set(items)):
+			frappe.msgprint(_("Warning: Same item has been entered multiple times."))
 			
 
 	def check_for_stopped_status(self, doctype, docname):