added function to hide/unhide contact section of a buying form
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index 81d5fbf..68dc8c7 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -122,7 +122,6 @@
 
 cur_frm.cscript.dynamic_label = function(doc, cdt, cdn, callback1) {
 	var base_currency = wn.boot.company[doc.company].default_currency || sys_defaults['currency'];
-	
 	if (doc.currency === base_currency) {
 		set_multiple(cdt, cdn, {conversion_rate:1});
 		hide_field(['conversion_rate', 'net_total_import','grand_total_import',
@@ -634,3 +633,7 @@
 		 }
 	}
 }
+
+cur_frm.cscript.toggle_contact_section = function(doc) {
+	doc.supplier ? unhide_field("contact_section") : hide_field("contact_section");
+}
\ No newline at end of file