export /import fld hide issue, discount issue
diff --git a/erpnext/accounts/doctype/pv_detail/pv_detail.txt b/erpnext/accounts/doctype/pv_detail/pv_detail.txt
index 54f77bd..423f667 100755
--- a/erpnext/accounts/doctype/pv_detail/pv_detail.txt
+++ b/erpnext/accounts/doctype/pv_detail/pv_detail.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2010-08-08 17:09:17',
 		'docstatus': 0,
-		'modified': '2012-03-05 10:54:12',
+		'modified': '2012-03-05 15:02:25',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 45
+		'version': 46
 	},
 
 	# These values are common for all DocField
@@ -100,9 +100,9 @@
 	# DocField
 	{
 		'doctype': u'DocField',
-		'fieldname': u'purchase_ref_rate',
+		'fieldname': u'import_ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Ref Rate *',
+		'label': u'Ref Rate ',
 		'permlevel': 0,
 		'print_hide': 1,
 		'trigger': u'Client'
@@ -122,6 +122,43 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'import_rate',
+		'fieldtype': u'Currency',
+		'label': u'Rate ',
+		'oldfieldname': u'import_rate',
+		'oldfieldtype': u'Currency',
+		'permlevel': 0,
+		'print_hide': 0,
+		'reqd': 1,
+		'trigger': u'Client'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'import_amount',
+		'fieldtype': u'Currency',
+		'label': u'Amount',
+		'oldfieldname': u'import_amount',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1,
+		'reqd': 1
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'purchase_ref_rate',
+		'fieldtype': u'Currency',
+		'label': u'Ref Rate *',
+		'permlevel': 0,
+		'print_hide': 1,
+		'trigger': u'Client'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
 		'fieldname': u'rate',
 		'fieldtype': u'Currency',
 		'label': u'Rate *(Default Curr.)',
@@ -148,43 +185,6 @@
 
 	# DocField
 	{
-		'doctype': u'DocField',
-		'fieldname': u'import_ref_rate',
-		'fieldtype': u'Currency',
-		'label': u'Ref Rate ',
-		'permlevel': 0,
-		'print_hide': 1,
-		'trigger': u'Client'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'import_rate',
-		'fieldtype': u'Currency',
-		'label': u'Rate ',
-		'oldfieldname': u'import_rate',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 0,
-		'reqd': 1,
-		'trigger': u'Client'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'import_amount',
-		'fieldtype': u'Currency',
-		'label': u'Amount',
-		'oldfieldname': u'import_amount',
-		'oldfieldtype': u'Currency',
-		'permlevel': 1,
-		'reqd': 1
-	},
-
-	# DocField
-	{
 		'colour': u'White:FFF',
 		'doctype': u'DocField',
 		'fieldname': u'expense_head',
diff --git a/erpnext/accounts/doctype/rv_detail/rv_detail.txt b/erpnext/accounts/doctype/rv_detail/rv_detail.txt
index 7c599d1..314dcd7 100644
--- a/erpnext/accounts/doctype/rv_detail/rv_detail.txt
+++ b/erpnext/accounts/doctype/rv_detail/rv_detail.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2010-08-08 17:09:20',
 		'docstatus': 0,
-		'modified': '2012-03-05 10:50:03',
+		'modified': '2012-03-05 15:01:04',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 28
+		'version': 29
 	},
 
 	# These values are common for all DocField
@@ -109,14 +109,17 @@
 
 	# DocField
 	{
+		'colour': u'White:FFF',
 		'doctype': u'DocField',
-		'fieldname': u'base_ref_rate',
+		'fieldname': u'ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Price List Rate*',
-		'oldfieldname': u'base_ref_rate',
+		'label': u'Price List Rate',
+		'oldfieldname': u'ref_rate',
 		'oldfieldtype': u'Currency',
-		'permlevel': 1,
-		'print_hide': 1
+		'permlevel': 0,
+		'print_hide': 1,
+		'reqd': 0,
+		'trigger': u'Client'
 	},
 
 	# DocField
@@ -135,6 +138,43 @@
 
 	# DocField
 	{
+		'doctype': u'DocField',
+		'fieldname': u'export_rate',
+		'fieldtype': u'Currency',
+		'label': u'Basic Rate',
+		'oldfieldname': u'export_rate',
+		'oldfieldtype': u'Currency',
+		'permlevel': 0,
+		'reqd': 1,
+		'trigger': u'Client'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'export_amount',
+		'fieldtype': u'Currency',
+		'label': u'Amount',
+		'oldfieldname': u'export_amount',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1,
+		'reqd': 1
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'base_ref_rate',
+		'fieldtype': u'Currency',
+		'label': u'Price List Rate*',
+		'oldfieldname': u'base_ref_rate',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1,
+		'print_hide': 1
+	},
+
+	# DocField
+	{
 		'colour': u'White:FFF',
 		'doctype': u'DocField',
 		'fieldname': u'basic_rate',
@@ -165,46 +205,6 @@
 
 	# DocField
 	{
-		'colour': u'White:FFF',
-		'doctype': u'DocField',
-		'fieldname': u'ref_rate',
-		'fieldtype': u'Currency',
-		'label': u'Price List Rate',
-		'oldfieldname': u'ref_rate',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 1,
-		'reqd': 0,
-		'trigger': u'Client'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'export_rate',
-		'fieldtype': u'Currency',
-		'label': u'Basic Rate',
-		'oldfieldname': u'export_rate',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'reqd': 1,
-		'trigger': u'Client'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'export_amount',
-		'fieldtype': u'Currency',
-		'label': u'Amount',
-		'oldfieldname': u'export_amount',
-		'oldfieldtype': u'Currency',
-		'permlevel': 1,
-		'reqd': 1
-	},
-
-	# DocField
-	{
 		'doctype': u'DocField',
 		'fieldname': u'warehouse',
 		'fieldtype': u'Link',
diff --git a/erpnext/buying/doctype/po_detail/po_detail.txt b/erpnext/buying/doctype/po_detail/po_detail.txt
index d903ef1..b625e4e 100755
--- a/erpnext/buying/doctype/po_detail/po_detail.txt
+++ b/erpnext/buying/doctype/po_detail/po_detail.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2010-08-08 17:09:12',
 		'docstatus': 0,
-		'modified': '2012-03-05 10:50:51',
+		'modified': '2012-03-05 15:01:31',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 64
+		'version': 65
 	},
 
 	# These values are common for all DocField
@@ -121,9 +121,9 @@
 	# DocField
 	{
 		'doctype': u'DocField',
-		'fieldname': u'purchase_ref_rate',
+		'fieldname': u'import_ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Ref Rate *',
+		'label': u'Ref Rate ',
 		'permlevel': 0,
 		'print_hide': 1
 	},
@@ -141,6 +141,41 @@
 
 	# DocField
 	{
+		'doctype': u'DocField',
+		'fieldname': u'import_rate',
+		'fieldtype': u'Currency',
+		'hidden': 0,
+		'label': u'Rate ',
+		'oldfieldname': u'import_rate',
+		'oldfieldtype': u'Currency',
+		'permlevel': 0,
+		'print_hide': 0,
+		'trigger': u'Client'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'import_amount',
+		'fieldtype': u'Currency',
+		'label': u'Amount',
+		'oldfieldname': u'import_amount',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'purchase_ref_rate',
+		'fieldtype': u'Currency',
+		'label': u'Ref Rate *',
+		'permlevel': 0,
+		'print_hide': 1
+	},
+
+	# DocField
+	{
 		'default': u'0.00',
 		'doctype': u'DocField',
 		'fieldname': u'purchase_rate',
@@ -172,41 +207,6 @@
 	# DocField
 	{
 		'doctype': u'DocField',
-		'fieldname': u'import_ref_rate',
-		'fieldtype': u'Currency',
-		'label': u'Ref Rate ',
-		'permlevel': 0,
-		'print_hide': 1
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'import_rate',
-		'fieldtype': u'Currency',
-		'hidden': 0,
-		'label': u'Rate ',
-		'oldfieldname': u'import_rate',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 0,
-		'trigger': u'Client'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'import_amount',
-		'fieldtype': u'Currency',
-		'label': u'Amount',
-		'oldfieldname': u'import_amount',
-		'oldfieldtype': u'Currency',
-		'permlevel': 1
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
 		'fieldname': u'warehouse',
 		'fieldtype': u'Link',
 		'hidden': 0,
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index 88fba5c..9a414a3 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -100,19 +100,19 @@
 	for (d in item_cols_import) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_import[d]+' ('+doc.currency+')');
 		
 	var hide = (doc.currency == sys_defaults['currency']) ? false : true;
-	for (f in item_cols_import) {
+	for (f in item_cols_base) {
 		cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide);
 	}
 	if (doc.doctype == 'Payable Voucher') {
 		$('[data-grid-fieldname="'+cur_frm.cscript.tname+'-rate"]').html('Rate ('+base_curr+')');
-		//cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('rate', hide);
+		cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('rate', hide);
 		// advance table flds
 		adv_cols = {'advance_amount': 'Advance Amount', 'allocated_amount': 'Allocated Amount', 'tds_amount': 'TDS Amount', 'tds_allocated': 'TDS Allocated'}
 		for (d in adv_cols) $('[data-grid-fieldname="Advance Allocation Detail-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')');	
 	}
 	else {
 		$('[data-grid-fieldname="'+cur_frm.cscript.tname+'-purchase_rate"]').html('Rate ('+base_curr+')');
-		//cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('purchase_rate', hide);
+		cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('purchase_rate', hide);
 	}
 
 	//tax table flds
diff --git a/erpnext/selling/doctype/quotation_detail/quotation_detail.txt b/erpnext/selling/doctype/quotation_detail/quotation_detail.txt
index 81bf64d..1b55879 100644
--- a/erpnext/selling/doctype/quotation_detail/quotation_detail.txt
+++ b/erpnext/selling/doctype/quotation_detail/quotation_detail.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2010-08-08 17:09:18',
 		'docstatus': 0,
-		'modified': '2012-03-05 10:48:27',
+		'modified': '2012-03-05 15:00:10',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -23,7 +23,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 32
+		'version': 33
 	},
 
 	# These values are common for all DocField
@@ -110,14 +110,17 @@
 
 	# DocField
 	{
+		'default': u'0.00',
 		'doctype': u'DocField',
-		'fieldname': u'base_ref_rate',
+		'fieldname': u'ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Price List Rate*',
-		'oldfieldname': u'base_ref_rate',
+		'label': u'Price List Rate',
+		'oldfieldname': u'ref_rate',
 		'oldfieldtype': u'Currency',
-		'permlevel': 1,
+		'permlevel': 0,
 		'print_hide': 1,
+		'reqd': 0,
+		'trigger': u'Client',
 		'width': u'100px'
 	},
 
@@ -140,58 +143,6 @@
 	{
 		'default': u'0.00',
 		'doctype': u'DocField',
-		'fieldname': u'basic_rate',
-		'fieldtype': u'Currency',
-		'in_filter': 0,
-		'label': u'Basic Rate*',
-		'oldfieldname': u'basic_rate',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 1,
-		'reqd': 0,
-		'search_index': 0,
-		'trigger': u'Client',
-		'width': u'100px'
-	},
-
-	# DocField
-	{
-		'default': u'0.00',
-		'doctype': u'DocField',
-		'fieldname': u'amount',
-		'fieldtype': u'Currency',
-		'in_filter': 0,
-		'label': u'Amount*',
-		'oldfieldname': u'amount',
-		'oldfieldtype': u'Currency',
-		'permlevel': 1,
-		'print_hide': 1,
-		'reqd': 0,
-		'search_index': 0,
-		'trigger': u'Client',
-		'width': u'100px'
-	},
-
-	# DocField
-	{
-		'default': u'0.00',
-		'doctype': u'DocField',
-		'fieldname': u'ref_rate',
-		'fieldtype': u'Currency',
-		'label': u'Price List Rate',
-		'oldfieldname': u'ref_rate',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 1,
-		'reqd': 0,
-		'trigger': u'Client',
-		'width': u'100px'
-	},
-
-	# DocField
-	{
-		'default': u'0.00',
-		'doctype': u'DocField',
 		'fieldname': u'export_rate',
 		'fieldtype': u'Currency',
 		'in_filter': 0,
@@ -225,6 +176,55 @@
 
 	# DocField
 	{
+		'doctype': u'DocField',
+		'fieldname': u'base_ref_rate',
+		'fieldtype': u'Currency',
+		'label': u'Price List Rate*',
+		'oldfieldname': u'base_ref_rate',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1,
+		'print_hide': 1,
+		'width': u'100px'
+	},
+
+	# DocField
+	{
+		'default': u'0.00',
+		'doctype': u'DocField',
+		'fieldname': u'basic_rate',
+		'fieldtype': u'Currency',
+		'in_filter': 0,
+		'label': u'Basic Rate*',
+		'oldfieldname': u'basic_rate',
+		'oldfieldtype': u'Currency',
+		'permlevel': 0,
+		'print_hide': 1,
+		'reqd': 0,
+		'search_index': 0,
+		'trigger': u'Client',
+		'width': u'100px'
+	},
+
+	# DocField
+	{
+		'default': u'0.00',
+		'doctype': u'DocField',
+		'fieldname': u'amount',
+		'fieldtype': u'Currency',
+		'in_filter': 0,
+		'label': u'Amount*',
+		'oldfieldname': u'amount',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1,
+		'print_hide': 1,
+		'reqd': 0,
+		'search_index': 0,
+		'trigger': u'Client',
+		'width': u'100px'
+	},
+
+	# DocField
+	{
 		'colour': u'White:FFF',
 		'doctype': u'DocField',
 		'fieldname': u'stock_uom',
diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js
index 97b20eb..cad8ec1 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.js
+++ b/erpnext/selling/doctype/sales_common/sales_common.js
@@ -121,7 +121,7 @@
 	for (d in item_cols_export) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_export[d]+' ('+doc.currency+')');	
 
 	var hide = (doc.currency == sys_defaults['currency']) ? false : true;
-	for (f in item_cols_export) {
+	for (f in item_cols_base) {
 		cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide);
 	}
 
@@ -658,10 +658,10 @@
 					'basic_rate': flt(flt(cl[i].export_rate) * flt(doc.conversion_rate)),
 					'amount': roundNumber(flt((flt(cl[i].export_rate) * flt(doc.conversion_rate)) * flt(cl[i].qty)), 2)
 				}, fname);
-				var base_ref_rate = flt(cl[i].basic_rate) + flt(flt(cl[i].basic_rate) * flt(cl[i].adj_rate) / 100);
-				set_multiple(tname, cl[i].name, {
-					'base_ref_rate': flt(base_ref_rate)
-				}, fname);
+				//var base_ref_rate = flt(cl[i].basic_rate) + flt(flt(cl[i].basic_rate) * flt(cl[i].adj_rate) / 100);
+				//set_multiple(tname, cl[i].name, {
+				//	'base_ref_rate': flt(base_ref_rate)
+				//}, fname);
 
 		} else if(consider_incl_rate) {
 			if(flt(cl[i].export_rate) > 0) {
diff --git a/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt b/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt
index 3205d6e..c0a01f1 100644
--- a/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt
+++ b/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2010-08-08 17:09:22',
 		'docstatus': 0,
-		'modified': '2012-03-02 15:49:26',
+		'modified': '2012-03-05 14:59:43',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 53
+		'version': 54
 	},
 
 	# These values are common for all DocField
@@ -117,15 +117,18 @@
 
 	# DocField
 	{
+		'default': u'0.00',
 		'doctype': u'DocField',
-		'fieldname': u'base_ref_rate',
+		'fieldname': u'ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Price List Rate*',
-		'oldfieldname': u'base_ref_rate',
+		'label': u'Price List Rate',
+		'oldfieldname': u'ref_rate',
 		'oldfieldtype': u'Currency',
-		'permlevel': 1,
+		'permlevel': 0,
 		'print_hide': 1,
-		'width': u'100px'
+		'reqd': 0,
+		'trigger': u'Client',
+		'width': u'70px'
 	},
 
 	# DocField
@@ -147,54 +150,6 @@
 	{
 		'default': u'0.00',
 		'doctype': u'DocField',
-		'fieldname': u'basic_rate',
-		'fieldtype': u'Currency',
-		'label': u'Basic Rate*',
-		'oldfieldname': u'basic_rate',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 1,
-		'reqd': 0,
-		'trigger': u'Client',
-		'width': u'100px'
-	},
-
-	# DocField
-	{
-		'default': u'0.00',
-		'doctype': u'DocField',
-		'fieldname': u'amount',
-		'fieldtype': u'Currency',
-		'label': u'Amount*',
-		'no_copy': 0,
-		'oldfieldname': u'amount',
-		'oldfieldtype': u'Currency',
-		'permlevel': 1,
-		'print_hide': 1,
-		'reqd': 0,
-		'width': u'100px'
-	},
-
-	# DocField
-	{
-		'default': u'0.00',
-		'doctype': u'DocField',
-		'fieldname': u'ref_rate',
-		'fieldtype': u'Currency',
-		'label': u'Price List Rate',
-		'oldfieldname': u'ref_rate',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 1,
-		'reqd': 0,
-		'trigger': u'Client',
-		'width': u'70px'
-	},
-
-	# DocField
-	{
-		'default': u'0.00',
-		'doctype': u'DocField',
 		'fieldname': u'export_rate',
 		'fieldtype': u'Currency',
 		'label': u'Rate',
@@ -224,6 +179,51 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'base_ref_rate',
+		'fieldtype': u'Currency',
+		'label': u'Price List Rate*',
+		'oldfieldname': u'base_ref_rate',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1,
+		'print_hide': 1,
+		'width': u'100px'
+	},
+
+	# DocField
+	{
+		'default': u'0.00',
+		'doctype': u'DocField',
+		'fieldname': u'basic_rate',
+		'fieldtype': u'Currency',
+		'label': u'Basic Rate*',
+		'oldfieldname': u'basic_rate',
+		'oldfieldtype': u'Currency',
+		'permlevel': 0,
+		'print_hide': 1,
+		'reqd': 0,
+		'trigger': u'Client',
+		'width': u'100px'
+	},
+
+	# DocField
+	{
+		'default': u'0.00',
+		'doctype': u'DocField',
+		'fieldname': u'amount',
+		'fieldtype': u'Currency',
+		'label': u'Amount*',
+		'no_copy': 0,
+		'oldfieldname': u'amount',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1,
+		'print_hide': 1,
+		'reqd': 0,
+		'width': u'100px'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
 		'fieldname': u'reserved_warehouse',
 		'fieldtype': u'Link',
 		'label': u'Reserved Warehouse',
diff --git a/erpnext/startup/js/feature_setup.js b/erpnext/startup/js/feature_setup.js
index c5518ab..8006dca 100644
--- a/erpnext/startup/js/feature_setup.js
+++ b/erpnext/startup/js/feature_setup.js
@@ -122,18 +122,18 @@
 		'Sales Order': {'sales_order_details':['page_break']}
 	},
 	'fs_exports': {
-		'Delivery Note': {'fields':['Note','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'delivery_note_details':['ref_rate','export_amount','export_rate']},
+		'Delivery Note': {'fields':['Note','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'delivery_note_details':['base_ref_rate','amount','basic_rate']},
 		'POS Setting': {'fields':['conversion_rate','currency']},
-		'Quotation': {'fields':['Note HTML','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'quotation_details':['ref_rate','export_amount','export_rate']},
-		'Receivable Voucher': {'fields':['conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'entries':['ref_rate','export_amount','export_rate']},
+		'Quotation': {'fields':['Note HTML','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'quotation_details':['base_ref_rate','amount','basic_rate']},
+		'Receivable Voucher': {'fields':['conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'entries':['base_ref_rate','amount','basic_rate']},
 		'Item': {'ref_rate_details':['ref_currency']},
 		'Sales BOM': {'fields':['currency']},
-		'Sales Order': {'fields':['Note1','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'sales_order_details':['ref_rate','export_amount','export_rate']}
+		'Sales Order': {'fields':['Note1','OT Notes','conversion_rate','currency','grand_total_export','in_words_export','rounded_total_export'],'sales_order_details':['base_ref_rate','amount','basic_rate']}
 	},
 	'fs_imports': {
-		'Payable Voucher': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'entries':['import_amount','import_rate']},
-		'Purchase Order': {'fields':['Note HTML','conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'po_details':['import_amount','import_rate']},
-		'Purchase Receipt': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'purchase_receipt_details':['import_amount','import_rate']},
+		'Payable Voucher': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'entries':['purchase_ref_rate', 'amount','rate']},
+		'Purchase Order': {'fields':['Note HTML','conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'po_details':['purchase_ref_rate', 'amount','purchase_rate']},
+		'Purchase Receipt': {'fields':['conversion_rate','currency','grand_total_import','in_words_import','net_total_import','other_charges_added_import','other_charges_deducted_import'],'purchase_receipt_details':['purchase_ref_rate','amount','purchase_rate']},
 		'Supplier Quotation': {'fields':['conversion_rate','currency']}
 	},
 	'fs_item_advanced': {
diff --git a/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt b/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt
index a5f82f4..c4bacb3 100644
--- a/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt
+++ b/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2010-08-08 17:08:58',
 		'docstatus': 0,
-		'modified': '2012-03-05 10:49:39',
+		'modified': '2012-03-05 15:00:39',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -23,7 +23,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 55
+		'version': 56
 	},
 
 	# These values are common for all DocField
@@ -117,14 +117,18 @@
 
 	# DocField
 	{
+		'default': u'0.00',
 		'doctype': u'DocField',
-		'fieldname': u'base_ref_rate',
+		'fieldname': u'ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Price List Rate*',
-		'oldfieldname': u'base_ref_rate',
+		'label': u'Price List Rate',
+		'no_copy': 0,
+		'oldfieldname': u'ref_rate',
 		'oldfieldtype': u'Currency',
-		'permlevel': 1,
+		'permlevel': 0,
 		'print_hide': 1,
+		'reqd': 0,
+		'trigger': u'Client',
 		'width': u'100px'
 	},
 
@@ -145,53 +149,6 @@
 
 	# DocField
 	{
-		'default': u'0.00',
-		'doctype': u'DocField',
-		'fieldname': u'basic_rate',
-		'fieldtype': u'Currency',
-		'label': u'Rate*',
-		'oldfieldname': u'basic_rate',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 1,
-		'reqd': 0,
-		'trigger': u'Client',
-		'width': u'150px'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'amount',
-		'fieldtype': u'Currency',
-		'label': u'Amount*',
-		'oldfieldname': u'amount',
-		'oldfieldtype': u'Currency',
-		'permlevel': 1,
-		'print_hide': 1,
-		'reqd': 0,
-		'width': u'100px'
-	},
-
-	# DocField
-	{
-		'default': u'0.00',
-		'doctype': u'DocField',
-		'fieldname': u'ref_rate',
-		'fieldtype': u'Currency',
-		'label': u'Price List Rate',
-		'no_copy': 0,
-		'oldfieldname': u'ref_rate',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 1,
-		'reqd': 0,
-		'trigger': u'Client',
-		'width': u'100px'
-	},
-
-	# DocField
-	{
 		'doctype': u'DocField',
 		'fieldname': u'export_rate',
 		'fieldtype': u'Currency',
@@ -222,6 +179,49 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'base_ref_rate',
+		'fieldtype': u'Currency',
+		'label': u'Price List Rate*',
+		'oldfieldname': u'base_ref_rate',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1,
+		'print_hide': 1,
+		'width': u'100px'
+	},
+
+	# DocField
+	{
+		'default': u'0.00',
+		'doctype': u'DocField',
+		'fieldname': u'basic_rate',
+		'fieldtype': u'Currency',
+		'label': u'Rate*',
+		'oldfieldname': u'basic_rate',
+		'oldfieldtype': u'Currency',
+		'permlevel': 0,
+		'print_hide': 1,
+		'reqd': 0,
+		'trigger': u'Client',
+		'width': u'150px'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'amount',
+		'fieldtype': u'Currency',
+		'label': u'Amount*',
+		'oldfieldname': u'amount',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1,
+		'print_hide': 1,
+		'reqd': 0,
+		'width': u'100px'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
 		'fieldname': u'warehouse',
 		'fieldtype': u'Link',
 		'label': u'Warehouse',
diff --git a/erpnext/stock/doctype/purchase_receipt_detail/purchase_receipt_detail.txt b/erpnext/stock/doctype/purchase_receipt_detail/purchase_receipt_detail.txt
index 4ebd28c..a8d1563 100755
--- a/erpnext/stock/doctype/purchase_receipt_detail/purchase_receipt_detail.txt
+++ b/erpnext/stock/doctype/purchase_receipt_detail/purchase_receipt_detail.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2010-08-08 17:09:16',
 		'docstatus': 0,
-		'modified': '2012-03-05 10:51:18',
+		'modified': '2012-03-05 15:01:58',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 76
+		'version': 77
 	},
 
 	# These values are common for all DocField
@@ -135,9 +135,9 @@
 	# DocField
 	{
 		'doctype': u'DocField',
-		'fieldname': u'purchase_ref_rate',
+		'fieldname': u'import_ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Ref Rate *',
+		'label': u'Ref Rate ',
 		'permlevel': 0,
 		'print_hide': 1
 	},
@@ -157,6 +157,43 @@
 		'colour': u'White:FFF',
 		'default': u'0.00',
 		'doctype': u'DocField',
+		'fieldname': u'import_rate',
+		'fieldtype': u'Currency',
+		'label': u'Rate',
+		'oldfieldname': u'import_rate',
+		'oldfieldtype': u'Currency',
+		'permlevel': 0,
+		'print_hide': 0,
+		'trigger': u'Client',
+		'width': u'100px'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'import_amount',
+		'fieldtype': u'Currency',
+		'label': u'Amount',
+		'oldfieldname': u'import_amount',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'purchase_ref_rate',
+		'fieldtype': u'Currency',
+		'label': u'Ref Rate *',
+		'permlevel': 0,
+		'print_hide': 1
+	},
+
+	# DocField
+	{
+		'colour': u'White:FFF',
+		'default': u'0.00',
+		'doctype': u'DocField',
 		'fieldname': u'purchase_rate',
 		'fieldtype': u'Currency',
 		'label': u'Rate *(Default Curr.)',
@@ -188,43 +225,6 @@
 	# DocField
 	{
 		'doctype': u'DocField',
-		'fieldname': u'import_ref_rate',
-		'fieldtype': u'Currency',
-		'label': u'Ref Rate ',
-		'permlevel': 0,
-		'print_hide': 1
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		'default': u'0.00',
-		'doctype': u'DocField',
-		'fieldname': u'import_rate',
-		'fieldtype': u'Currency',
-		'label': u'Rate',
-		'oldfieldname': u'import_rate',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 0,
-		'trigger': u'Client',
-		'width': u'100px'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'import_amount',
-		'fieldtype': u'Currency',
-		'label': u'Amount',
-		'oldfieldname': u'import_amount',
-		'oldfieldtype': u'Currency',
-		'permlevel': 1
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
 		'fieldname': u'warehouse',
 		'fieldtype': u'Link',
 		'hidden': 0,
diff --git a/erpnext/stock/page/stock_home/stock_home.html b/erpnext/stock/page/stock_home/stock_home.html
index bab93dc..ae677de 100644
--- a/erpnext/stock/page/stock_home/stock_home.html
+++ b/erpnext/stock/page/stock_home/stock_home.html
@@ -18,7 +18,7 @@
 			<p class="help">Single unit of an Item</p>
 			<h4><a href="#!List/Batch">Batch</a></h4>
 			<p class="help">Batch of units of an Item</p>
-			<h4><a href="#!List/Item">Warehouse</a></h4>
+			<h4><a href="#!List/Warehouse">Warehouse</a></h4>
 			<p class="help">Warehouse is where items are stored</p>
 		</div>
 		<div style="clear: both"></div>
@@ -102,4 +102,4 @@
 		</div>
 	</div>
 	<div style="clear: both;"></div>
-</div>
\ No newline at end of file
+</div>
diff --git a/js/all-app.js b/js/all-app.js
index aa26778..686b0b8 100644
--- a/js/all-app.js
+++ b/js/all-app.js
Binary files differ
diff --git a/version.num b/version.num
index ab747dc..e458f14 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-819
\ No newline at end of file
+821
\ No newline at end of file