Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/erpnext/accounts/doctype/pv_detail/pv_detail.txt b/erpnext/accounts/doctype/pv_detail/pv_detail.txt
index cff53a9..54f77bd 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-02 14:39:34',
+		'modified': '2012-03-05 10:54:12',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 44
+		'version': 45
 	},
 
 	# These values are common for all DocField
@@ -100,9 +100,9 @@
 	# DocField
 	{
 		'doctype': u'DocField',
-		'fieldname': u'import_ref_rate',
+		'fieldname': u'purchase_ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Ref Rate ',
+		'label': u'Ref Rate *',
 		'permlevel': 0,
 		'print_hide': 1,
 		'trigger': u'Client'
@@ -122,43 +122,6 @@
 	# 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.)',
@@ -185,6 +148,43 @@
 
 	# 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 f8f91da..7c599d1 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-02 14:37:42',
+		'modified': '2012-03-05 10:50:03',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 27
+		'version': 28
 	},
 
 	# These values are common for all DocField
@@ -109,17 +109,14 @@
 
 	# DocField
 	{
-		'colour': u'White:FFF',
 		'doctype': u'DocField',
-		'fieldname': u'ref_rate',
+		'fieldname': u'base_ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Price List Rate',
-		'oldfieldname': u'ref_rate',
+		'label': u'Price List Rate*',
+		'oldfieldname': u'base_ref_rate',
 		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 1,
-		'reqd': 0,
-		'trigger': u'Client'
+		'permlevel': 1,
+		'print_hide': 1
 	},
 
 	# DocField
@@ -138,43 +135,6 @@
 
 	# 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',
@@ -205,6 +165,46 @@
 
 	# 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 cfa2d3b..d903ef1 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-02 14:36:13',
+		'modified': '2012-03-05 10:50:51',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 63
+		'version': 64
 	},
 
 	# These values are common for all DocField
@@ -121,9 +121,9 @@
 	# DocField
 	{
 		'doctype': u'DocField',
-		'fieldname': u'import_ref_rate',
+		'fieldname': u'purchase_ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Ref Rate ',
+		'label': u'Ref Rate *',
 		'permlevel': 0,
 		'print_hide': 1
 	},
@@ -141,41 +141,6 @@
 
 	# 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',
@@ -207,6 +172,41 @@
 	# 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/selling/doctype/quotation_detail/quotation_detail.txt b/erpnext/selling/doctype/quotation_detail/quotation_detail.txt
index 3b5d9bc..81bf64d 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-02 14:40:25',
+		'modified': '2012-03-05 10:48:27',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -23,7 +23,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 31
+		'version': 32
 	},
 
 	# These values are common for all DocField
@@ -110,17 +110,14 @@
 
 	# DocField
 	{
-		'default': u'0.00',
 		'doctype': u'DocField',
-		'fieldname': u'ref_rate',
+		'fieldname': u'base_ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Price List Rate',
-		'oldfieldname': u'ref_rate',
+		'label': u'Price List Rate*',
+		'oldfieldname': u'base_ref_rate',
 		'oldfieldtype': u'Currency',
-		'permlevel': 0,
+		'permlevel': 1,
 		'print_hide': 1,
-		'reqd': 0,
-		'trigger': u'Client',
 		'width': u'100px'
 	},
 
@@ -143,6 +140,58 @@
 	{
 		'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,
@@ -176,37 +225,6 @@
 
 	# 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
-	{
 		'colour': u'White:FFF',
 		'doctype': u'DocField',
 		'fieldname': u'stock_uom',
@@ -222,24 +240,6 @@
 
 	# 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
-	{
 		'doctype': u'DocField',
 		'fieldname': u'item_group',
 		'fieldtype': u'Link',
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 7afebde..a5f82f4 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-01 19:22:16',
+		'modified': '2012-03-05 10:49: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': 54
+		'version': 55
 	},
 
 	# These values are common for all DocField
@@ -117,18 +117,14 @@
 
 	# DocField
 	{
-		'default': u'0.00',
 		'doctype': u'DocField',
-		'fieldname': u'ref_rate',
+		'fieldname': u'base_ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Price List Rate',
-		'no_copy': 0,
-		'oldfieldname': u'ref_rate',
+		'label': u'Price List Rate*',
+		'oldfieldname': u'base_ref_rate',
 		'oldfieldtype': u'Currency',
-		'permlevel': 0,
+		'permlevel': 1,
 		'print_hide': 1,
-		'reqd': 0,
-		'trigger': u'Client',
 		'width': u'100px'
 	},
 
@@ -149,48 +145,6 @@
 
 	# DocField
 	{
-		'doctype': u'DocField',
-		'fieldname': u'export_rate',
-		'fieldtype': u'Currency',
-		'label': u'Rate',
-		'oldfieldname': u'export_rate',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 0,
-		'reqd': 0,
-		'trigger': u'Client',
-		'width': u'150px'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'export_amount',
-		'fieldtype': u'Currency',
-		'label': u'Amount',
-		'oldfieldname': u'export_amount',
-		'oldfieldtype': u'Currency',
-		'permlevel': 1,
-		'print_hide': 0,
-		'reqd': 0,
-		'width': u'100px'
-	},
-
-	# 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',
@@ -221,6 +175,52 @@
 
 	# 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',
+		'label': u'Rate',
+		'oldfieldname': u'export_rate',
+		'oldfieldtype': u'Currency',
+		'permlevel': 0,
+		'print_hide': 0,
+		'reqd': 0,
+		'trigger': u'Client',
+		'width': u'150px'
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'export_amount',
+		'fieldtype': u'Currency',
+		'label': u'Amount',
+		'oldfieldname': u'export_amount',
+		'oldfieldtype': u'Currency',
+		'permlevel': 1,
+		'print_hide': 0,
+		'reqd': 0,
+		'width': u'100px'
+	},
+
+	# DocField
+	{
 		'doctype': u'DocField',
 		'fieldname': u'warehouse',
 		'fieldtype': u'Link',
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 f81715d..4ebd28c 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-02 14:38:56',
+		'modified': '2012-03-05 10:51:18',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 75
+		'version': 76
 	},
 
 	# These values are common for all DocField
@@ -135,9 +135,9 @@
 	# DocField
 	{
 		'doctype': u'DocField',
-		'fieldname': u'import_ref_rate',
+		'fieldname': u'purchase_ref_rate',
 		'fieldtype': u'Currency',
-		'label': u'Ref Rate ',
+		'label': u'Ref Rate *',
 		'permlevel': 0,
 		'print_hide': 1
 	},
@@ -157,43 +157,6 @@
 		'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.)',
@@ -225,6 +188,43 @@
 	# 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,