field arrangement in sales cycle
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index cddb92e..9aaf620 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -38,7 +38,6 @@
 		if(!doc.currency && sys_defaults.currency) set_multiple(dt,dn,{currency:sys_defaults.currency});
 		if(!doc.price_list_currency) set_multiple(dt, dn, {price_list_currency: doc.currency, plc_conversion_rate: 1});
 
- 		hide_field(['customer_address', 'contact_person','customer_name','address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
 	}
 }
 
@@ -100,6 +99,9 @@
 	if (doc.docstatus==1) $(cur_frm.fields_dict.recurring_invoice.row.wrapper).toggle(true);
 	else $(cur_frm.fields_dict.recurring_invoice.row.wrapper).toggle(false);
 
+	if(doc.customer) $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true);
+	else $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(false);
+
 	// India related fields
 	var cp = wn.control_panel;
 	if (cp.country == 'India') unhide_field(['c_form_applicable', 'c_form_no']);
@@ -113,6 +115,8 @@
 cur_frm.cscript.refresh = function(doc, dt, dn) {
 	cur_frm.cscript.is_opening(doc, dt, dn);
 	cur_frm.cscript.hide_fields(doc, dt, dn);
+	erpnext.hide_naming_series();
+
 	// Show / Hide button
 	cur_frm.clear_custom_buttons();
 
@@ -188,7 +192,7 @@
 	var args = onload ? 'onload':''
 	if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', args, callback);
 
-	if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
+	if(doc.customer) unhide_field(['customer_address','contact_person', 'territory','customer_group']);
 	
 }
 
@@ -228,7 +232,7 @@
 	var callback = function(r,rt) {
 			var doc = locals[cur_frm.doctype][cur_frm.docname];
 			if(doc.customer) $c_obj(make_doclist(dt,dn), 'get_default_customer_address', '', callback2);
-			if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
+			if(doc.customer) unhide_field(['customer_address','contact_person','territory','customer_group']);
 			cur_frm.refresh();
 	}
 
@@ -298,7 +302,7 @@
 // Get Items based on SO or DN Selected
 cur_frm.cscript.get_items = function(doc, dt, dn) {
 	var callback = function(r,rt) {
-		unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
+		unhide_field(['customer_address','contact_person', 'territory','customer_group']);
 		cur_frm.refresh();
 	}
 	get_server_fields('pull_details','','',doc, dt, dn,1,callback);
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt b/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt
index 6e76145..a69dcbf 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2012-04-13 11:56:18',
 		'docstatus': 0,
-		'modified': '2012-04-20 11:52:36',
+		'modified': '2012-05-01 12:15:53',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -199,48 +199,10 @@
 
 	# DocField
 	{
-		'colour': u'White:FFF',
-		'doctype': u'DocField',
-		'fieldname': u'customer',
-		'fieldtype': u'Link',
-		'hidden': 0,
-		'label': u'Customer',
-		'no_copy': 0,
-		'oldfieldname': u'customer',
-		'oldfieldtype': u'Link',
-		'options': u'Customer',
-		'permlevel': 0,
-		'print_hide': 1,
-		'trigger': u'Client'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'customer_address',
-		'fieldtype': u'Link',
-		'label': u'Customer Address',
-		'options': u'Address',
-		'permlevel': 0,
-		'print_hide': 1
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'contact_person',
-		'fieldtype': u'Link',
-		'label': u'Contact Person',
-		'options': u'Contact',
-		'permlevel': 0,
-		'print_hide': 1
-	},
-
-	# DocField
-	{
 		'doctype': u'DocField',
 		'fieldname': u'customer_name',
 		'fieldtype': u'Data',
+		'hidden': 1,
 		'label': u'Name',
 		'oldfieldname': u'customer_name',
 		'oldfieldtype': u'Data',
@@ -252,6 +214,7 @@
 		'doctype': u'DocField',
 		'fieldname': u'address_display',
 		'fieldtype': u'Small Text',
+		'hidden': 1,
 		'label': u'Address',
 		'permlevel': 1
 	},
@@ -261,6 +224,7 @@
 		'doctype': u'DocField',
 		'fieldname': u'contact_display',
 		'fieldtype': u'Small Text',
+		'hidden': 1,
 		'label': u'Contact',
 		'permlevel': 1
 	},
@@ -270,6 +234,7 @@
 		'doctype': u'DocField',
 		'fieldname': u'contact_mobile',
 		'fieldtype': u'Text',
+		'hidden': 1,
 		'label': u'Mobile No',
 		'permlevel': 1
 	},
@@ -279,6 +244,7 @@
 		'doctype': u'DocField',
 		'fieldname': u'contact_email',
 		'fieldtype': u'Text',
+		'hidden': 1,
 		'label': u'Contact Email',
 		'permlevel': 1,
 		'print_hide': 1
@@ -346,73 +312,6 @@
 
 	# DocField
 	{
-		'description': u'The date at which current entry is corrected in the system.',
-		'doctype': u'DocField',
-		'fieldname': u'amendment_date',
-		'fieldtype': u'Date',
-		'label': u'Amendment Date',
-		'no_copy': 1,
-		'oldfieldname': u'amendment_date',
-		'oldfieldtype': u'Date',
-		'permlevel': 0,
-		'print_hide': 1
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'amended_from',
-		'fieldtype': u'Link',
-		'label': u'Amended From',
-		'no_copy': 1,
-		'oldfieldname': u'amended_from',
-		'oldfieldtype': u'Link',
-		'options': u'Sales Invoice',
-		'permlevel': 1,
-		'print_hide': 1
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'mode_of_payment',
-		'fieldtype': u'Select',
-		'label': u'Mode of Payment',
-		'oldfieldname': u'mode_of_payment',
-		'oldfieldtype': u'Select',
-		'options': u'link:Mode of Payment',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'territory',
-		'fieldtype': u'Link',
-		'in_filter': 1,
-		'label': u'Territory',
-		'options': u'Territory',
-		'permlevel': 0,
-		'print_hide': 1,
-		'reqd': 1,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'customer_group',
-		'fieldtype': u'Link',
-		'in_filter': 1,
-		'label': u'Customer Group',
-		'options': u'Customer Group',
-		'permlevel': 0,
-		'print_hide': 1,
-		'search_index': 0
-	},
-
-	# DocField
-	{
 		'colour': u'White:FFF',
 		'doctype': u'DocField',
 		'fieldname': u'items',
@@ -424,6 +323,134 @@
 
 	# DocField
 	{
+		'allow_on_submit': 1,
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'entries',
+		'fieldtype': u'Table',
+		'label': u'Entries',
+		'oldfieldname': u'entries',
+		'oldfieldtype': u'Table',
+		'options': u'Sales Invoice Item',
+		'permlevel': 0
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'section_break0',
+		'fieldtype': u'Section Break',
+		'options': u'Simple',
+		'permlevel': 0
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'col_break26',
+		'fieldtype': u'Column Break',
+		'permlevel': 0,
+		'width': u'50%'
+	},
+
+	# DocField
+	{
+		'description': u'Will be calculated automatically when you enter the details',
+		'doctype': u'DocField',
+		'fieldname': u'net_total',
+		'fieldtype': u'Currency',
+		'label': u'Net Total*',
+		'oldfieldname': u'net_total',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1,
+		'print_hide': 0,
+		'reqd': 1
+	},
+
+	# DocField
+	{
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'recalculate_values',
+		'fieldtype': u'Button',
+		'label': u'Re-Calculate Values',
+		'oldfieldtype': u'Button',
+		'permlevel': 0,
+		'print_hide': 1,
+		'trigger': u'Client'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'col_break25',
+		'fieldtype': u'Column Break',
+		'permlevel': 0,
+		'width': u'50%'
+	},
+
+	# DocField
+	{
+		'colour': u'White:FFF',
+		'description': u'Select Items from Sales Order',
+		'doctype': u'DocField',
+		'fieldname': u'sales_order_main',
+		'fieldtype': u'Link',
+		'label': u'Sales Order',
+		'oldfieldname': u'sales_order_main',
+		'oldfieldtype': u'Link',
+		'options': u'Sales Order',
+		'permlevel': 0,
+		'print_hide': 1
+	},
+
+	# DocField
+	{
+		'colour': u'White:FFF',
+		'description': u'Select Items from Delivery Note',
+		'doctype': u'DocField',
+		'fieldname': u'delivery_note_main',
+		'fieldtype': u'Link',
+		'label': u'Delivery Note',
+		'oldfieldname': u'delivery_note_main',
+		'oldfieldtype': u'Link',
+		'options': u'Delivery Note',
+		'permlevel': 0,
+		'print_hide': 1
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'get_items',
+		'fieldtype': u'Button',
+		'label': u'Get Items',
+		'oldfieldtype': u'Button',
+		'permlevel': 0,
+		'print_hide': 1,
+		'trigger': u'Client'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'currency_section',
+		'fieldtype': u'Section Break',
+		'label': u'Price List and Currency',
+		'permlevel': 0
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'col_break27',
+		'fieldtype': u'Column Break',
+		'permlevel': 0,
+		'width': u'50%'
+	},
+
+	# DocField
+	{
 		'doctype': u'DocField',
 		'fieldname': u'price_list_name',
 		'fieldtype': u'Select',
@@ -504,98 +531,6 @@
 
 	# DocField
 	{
-		'colour': u'White:FFF',
-		'description': u'Select Items from Sales Order',
-		'doctype': u'DocField',
-		'fieldname': u'sales_order_main',
-		'fieldtype': u'Link',
-		'label': u'Sales Order',
-		'oldfieldname': u'sales_order_main',
-		'oldfieldtype': u'Link',
-		'options': u'Sales Order',
-		'permlevel': 0,
-		'print_hide': 1
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		'description': u'Select Items from Delivery Note',
-		'doctype': u'DocField',
-		'fieldname': u'delivery_note_main',
-		'fieldtype': u'Link',
-		'label': u'Delivery Note',
-		'oldfieldname': u'delivery_note_main',
-		'oldfieldtype': u'Link',
-		'options': u'Delivery Note',
-		'permlevel': 0,
-		'print_hide': 1
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'get_items',
-		'fieldtype': u'Button',
-		'label': u'Get Items',
-		'oldfieldtype': u'Button',
-		'permlevel': 0,
-		'print_hide': 1,
-		'trigger': u'Client'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'section_break0',
-		'fieldtype': u'Section Break',
-		'options': u'Simple',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		'allow_on_submit': 1,
-		'colour': u'White:FFF',
-		'doctype': u'DocField',
-		'fieldname': u'entries',
-		'fieldtype': u'Table',
-		'label': u'Entries',
-		'oldfieldname': u'entries',
-		'oldfieldtype': u'Table',
-		'options': u'Sales Invoice Item',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		'doctype': u'DocField',
-		'fieldname': u'recalculate_values',
-		'fieldtype': u'Button',
-		'label': u'Re-Calculate Values',
-		'oldfieldtype': u'Button',
-		'permlevel': 0,
-		'print_hide': 1,
-		'trigger': u'Client'
-	},
-
-	# DocField
-	{
-		'description': u'Will be calculated automatically when you enter the details',
-		'doctype': u'DocField',
-		'fieldname': u'net_total',
-		'fieldtype': u'Currency',
-		'label': u'Net Total*',
-		'oldfieldname': u'net_total',
-		'oldfieldtype': u'Currency',
-		'permlevel': 1,
-		'print_hide': 0,
-		'reqd': 1
-	},
-
-	# DocField
-	{
 		'doctype': u'DocField',
 		'fieldname': u'taxes',
 		'fieldtype': u'Section Break',
@@ -1011,6 +946,99 @@
 
 	# DocField
 	{
+		'doctype': u'DocField',
+		'fieldname': u'contact_section',
+		'fieldtype': u'Section Break',
+		'label': u'Contact Info',
+		'permlevel': 0
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'col_break23',
+		'fieldtype': u'Column Break',
+		'permlevel': 0,
+		'width': u'50%'
+	},
+
+	# DocField
+	{
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'customer',
+		'fieldtype': u'Link',
+		'hidden': 0,
+		'label': u'Customer',
+		'no_copy': 0,
+		'oldfieldname': u'customer',
+		'oldfieldtype': u'Link',
+		'options': u'Customer',
+		'permlevel': 0,
+		'print_hide': 1,
+		'trigger': u'Client'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'customer_address',
+		'fieldtype': u'Link',
+		'label': u'Customer Address',
+		'options': u'Address',
+		'permlevel': 0,
+		'print_hide': 1
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'contact_person',
+		'fieldtype': u'Link',
+		'label': u'Contact Person',
+		'options': u'Contact',
+		'permlevel': 0,
+		'print_hide': 1
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'col_break24',
+		'fieldtype': u'Column Break',
+		'permlevel': 0,
+		'width': u'50%'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'territory',
+		'fieldtype': u'Link',
+		'in_filter': 1,
+		'label': u'Territory',
+		'options': u'Territory',
+		'permlevel': 0,
+		'print_hide': 1,
+		'reqd': 1,
+		'search_index': 0
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'customer_group',
+		'fieldtype': u'Link',
+		'in_filter': 1,
+		'label': u'Customer Group',
+		'options': u'Customer Group',
+		'permlevel': 0,
+		'print_hide': 1,
+		'search_index': 0
+	},
+
+	# DocField
+	{
 		'colour': u'White:FFF',
 		'doctype': u'DocField',
 		'fieldname': u'more_info',
@@ -1081,6 +1109,18 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'mode_of_payment',
+		'fieldtype': u'Select',
+		'label': u'Mode of Payment',
+		'oldfieldname': u'mode_of_payment',
+		'oldfieldtype': u'Select',
+		'options': u'link:Mode of Payment',
+		'permlevel': 0
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
 		'fieldname': u'c_form_applicable',
 		'fieldtype': u'Select',
 		'label': u'C-Form Applicable',
@@ -1137,17 +1177,6 @@
 
 	# DocField
 	{
-		'colour': u'White:FFF',
-		'doctype': u'DocField',
-		'fieldname': u'column_break8',
-		'fieldtype': u'Column Break',
-		'oldfieldtype': u'Column Break',
-		'permlevel': 0,
-		'print_hide': 1
-	},
-
-	# DocField
-	{
 		'allow_on_submit': 1,
 		'colour': u'White:FFF',
 		'doctype': u'DocField',
@@ -1166,6 +1195,17 @@
 
 	# DocField
 	{
+		'colour': u'White:FFF',
+		'doctype': u'DocField',
+		'fieldname': u'column_break8',
+		'fieldtype': u'Column Break',
+		'oldfieldtype': u'Column Break',
+		'permlevel': 0,
+		'print_hide': 1
+	},
+
+	# DocField
+	{
 		'doctype': u'DocField',
 		'fieldname': u'source',
 		'fieldtype': u'Select',
@@ -1212,6 +1252,34 @@
 
 	# DocField
 	{
+		'doctype': u'DocField',
+		'fieldname': u'amended_from',
+		'fieldtype': u'Link',
+		'label': u'Amended From',
+		'no_copy': 1,
+		'oldfieldname': u'amended_from',
+		'oldfieldtype': u'Link',
+		'options': u'Sales Invoice',
+		'permlevel': 1,
+		'print_hide': 1
+	},
+
+	# DocField
+	{
+		'description': u'The date at which current entry is corrected in the system.',
+		'doctype': u'DocField',
+		'fieldname': u'amendment_date',
+		'fieldtype': u'Date',
+		'label': u'Amendment Date',
+		'no_copy': 1,
+		'oldfieldname': u'amendment_date',
+		'oldfieldtype': u'Date',
+		'permlevel': 0,
+		'print_hide': 1
+	},
+
+	# DocField
+	{
 		'colour': u'White:FFF',
 		'depends_on': u'eval:!doc.__islocal',
 		'doctype': u'DocField',
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index bf869f0..28008f5 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -92,6 +92,9 @@
 	}
 
 	erpnext.hide_naming_series();
+	
+	if(doc.customer || doc.lead) $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true);
+	else $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(false);
 }
 
 
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index 3ddc607..7435593 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -61,6 +61,9 @@
 	erpnext.hide_naming_series();
 
 	if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn); 
+	
+	if(doc.customer) $(cur_frm.fields_dict.contact_info.row.wrapper).toggle(true);
+	else $(cur_frm.fields_dict.contact_info.row.wrapper).toggle(false);
 
 	if(doc.docstatus==1) {
 		if(doc.status != 'Stopped') {
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 51dcf12..28ba99e 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -70,6 +70,9 @@
 		cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']);
 	}
 	
+	if(doc.customer) $(cur_frm.fields_dict.contact_info.row.wrapper).toggle(true);
+	else $(cur_frm.fields_dict.contact_info.row.wrapper).toggle(false);
+	
 	set_print_hide(doc, cdt, cdn);
 }
 
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt
index 996c1d6..e4de1cc 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.txt
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2012-04-13 11:56:34',
 		'docstatus': 0,
-		'modified': '2012-04-30 20:41:10',
+		'modified': '2012-05-01 12:33:31',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -877,6 +877,7 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'contact_info',
 		'fieldtype': u'Section Break',
 		'label': u'Contact Info',
 		'permlevel': 0