Merge branch 'handlerupdate' 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 826ad8e..cff53a9 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-02-27 18:42:06',
+		'modified': '2012-03-02 14:39:34',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 43
+		'version': 44
 	},
 
 	# These values are common for all DocField
@@ -104,6 +104,7 @@
 		'fieldtype': u'Currency',
 		'label': u'Ref Rate ',
 		'permlevel': 0,
+		'print_hide': 1,
 		'trigger': u'Client'
 	},
 
@@ -114,6 +115,7 @@
 		'fieldtype': u'Currency',
 		'label': u'Discount %',
 		'permlevel': 0,
+		'print_hide': 1,
 		'trigger': u'Client'
 	},
 
@@ -150,6 +152,7 @@
 		'fieldtype': u'Currency',
 		'label': u'Ref Rate *',
 		'permlevel': 0,
+		'print_hide': 1,
 		'trigger': u'Client'
 	},
 
diff --git a/erpnext/accounts/doctype/rv_detail/rv_detail.txt b/erpnext/accounts/doctype/rv_detail/rv_detail.txt
index f133874..f8f91da 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-01 18:43:30',
+		'modified': '2012-03-02 14:37:42',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 26
+		'version': 27
 	},
 
 	# These values are common for all DocField
@@ -88,15 +88,6 @@
 	# DocField
 	{
 		'doctype': u'DocField',
-		'fieldname': u'stock_uom',
-		'fieldtype': u'Data',
-		'label': u'UOM',
-		'permlevel': 1
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
 		'fieldname': u'qty',
 		'fieldtype': u'Currency',
 		'label': u'Qty',
@@ -109,6 +100,15 @@
 
 	# DocField
 	{
+		'doctype': u'DocField',
+		'fieldname': u'stock_uom',
+		'fieldtype': u'Data',
+		'label': u'UOM',
+		'permlevel': 1
+	},
+
+	# DocField
+	{
 		'colour': u'White:FFF',
 		'doctype': u'DocField',
 		'fieldname': u'ref_rate',
diff --git a/erpnext/buying/doctype/po_detail/po_detail.txt b/erpnext/buying/doctype/po_detail/po_detail.txt
index 49bed15..cfa2d3b 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-02-27 14:47:48',
+		'modified': '2012-03-02 14:36:13',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 62
+		'version': 63
 	},
 
 	# These values are common for all DocField
@@ -124,7 +124,8 @@
 		'fieldname': u'import_ref_rate',
 		'fieldtype': u'Currency',
 		'label': u'Ref Rate ',
-		'permlevel': 0
+		'permlevel': 0,
+		'print_hide': 1
 	},
 
 	# DocField
@@ -134,6 +135,7 @@
 		'fieldtype': u'Currency',
 		'label': u'Discount %',
 		'permlevel': 0,
+		'print_hide': 1,
 		'trigger': u'Client'
 	},
 
@@ -168,7 +170,8 @@
 		'fieldname': u'purchase_ref_rate',
 		'fieldtype': u'Currency',
 		'label': u'Ref Rate *',
-		'permlevel': 0
+		'permlevel': 0,
+		'print_hide': 1
 	},
 
 	# DocField
diff --git a/erpnext/selling/doctype/quotation_detail/quotation_detail.txt b/erpnext/selling/doctype/quotation_detail/quotation_detail.txt
index 8c78f48..3b5d9bc 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-02-24 13:21:21',
+		'modified': '2012-03-02 14:40:25',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -23,7 +23,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 30
+		'version': 31
 	},
 
 	# These values are common for all DocField
@@ -94,6 +94,24 @@
 	{
 		'default': u'0.00',
 		'doctype': u'DocField',
+		'fieldname': u'qty',
+		'fieldtype': u'Currency',
+		'in_filter': 0,
+		'label': u'Quantity',
+		'oldfieldname': u'qty',
+		'oldfieldtype': u'Currency',
+		'permlevel': 0,
+		'print_hide': 0,
+		'reqd': 1,
+		'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',
@@ -116,7 +134,7 @@
 		'oldfieldname': u'adj_rate',
 		'oldfieldtype': u'Float',
 		'permlevel': 0,
-		'print_hide': 0,
+		'print_hide': 1,
 		'trigger': u'Client',
 		'width': u'100px'
 	},
@@ -143,24 +161,6 @@
 	{
 		'default': u'0.00',
 		'doctype': u'DocField',
-		'fieldname': u'qty',
-		'fieldtype': u'Currency',
-		'in_filter': 0,
-		'label': u'Quantity',
-		'oldfieldname': u'qty',
-		'oldfieldtype': u'Currency',
-		'permlevel': 0,
-		'print_hide': 0,
-		'reqd': 1,
-		'search_index': 0,
-		'trigger': u'Client',
-		'width': u'100px'
-	},
-
-	# DocField
-	{
-		'default': u'0.00',
-		'doctype': u'DocField',
 		'fieldname': u'export_amount',
 		'fieldtype': u'Currency',
 		'in_filter': 0,
diff --git a/erpnext/selling/doctype/sales_order/sales_order.txt b/erpnext/selling/doctype/sales_order/sales_order.txt
index de7d625..a82f970 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.txt
+++ b/erpnext/selling/doctype/sales_order/sales_order.txt
@@ -5,7 +5,7 @@
 	{
 		'creation': '2010-08-08 17:09:21',
 		'docstatus': 0,
-		'modified': '2012-03-02 12:19:01',
+		'modified': '2012-03-02 14:34:02',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -21,7 +21,7 @@
 
 	# These values are common for all DocType
 	{
-		'_last_update': u'1330593645',
+		'_last_update': u'1330670942',
 		'allow_attach': 0,
 		'colour': u'White:FFF',
 		'default_print_format': u'Standard',
@@ -38,7 +38,7 @@
 		'show_in_menu': 0,
 		'subject': u'From %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s | %(per_delivered)s% delivered | %(per_billed)s% billed',
 		'tag_fields': u'delivery_status,billing_status',
-		'version': 630
+		'version': 631
 	},
 
 	# These values are common for all DocFormat
@@ -392,6 +392,7 @@
 		'oldfieldtype': u'Select',
 		'options': u'\nSales\nMaintenance',
 		'permlevel': 0,
+		'print_hide': 1,
 		'reqd': 1
 	},
 
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 7f63644..f81715d 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-02-27 18:43:39',
+		'modified': '2012-03-02 14:38:56',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -22,7 +22,7 @@
 		'section_style': u'Tray',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 74
+		'version': 75
 	},
 
 	# These values are common for all DocField
@@ -95,6 +95,7 @@
 		'oldfieldname': u'received_qty',
 		'oldfieldtype': u'Currency',
 		'permlevel': 0,
+		'print_hide': 1,
 		'reqd': 1,
 		'trigger': u'Client',
 		'width': u'100px'
@@ -125,6 +126,7 @@
 		'oldfieldname': u'rejected_qty',
 		'oldfieldtype': u'Currency',
 		'permlevel': 0,
+		'print_hide': 1,
 		'search_index': 0,
 		'trigger': u'Client',
 		'width': u'100px'
@@ -136,7 +138,8 @@
 		'fieldname': u'import_ref_rate',
 		'fieldtype': u'Currency',
 		'label': u'Ref Rate ',
-		'permlevel': 0
+		'permlevel': 0,
+		'print_hide': 1
 	},
 
 	# DocField
@@ -145,7 +148,8 @@
 		'fieldname': u'discount_rate',
 		'fieldtype': u'Currency',
 		'label': u'Discount  %',
-		'permlevel': 0
+		'permlevel': 0,
+		'print_hide': 1
 	},
 
 	# DocField
@@ -181,7 +185,8 @@
 		'fieldname': u'purchase_ref_rate',
 		'fieldtype': u'Currency',
 		'label': u'Ref Rate *',
-		'permlevel': 0
+		'permlevel': 0,
+		'print_hide': 1
 	},
 
 	# DocField
@@ -228,7 +233,7 @@
 		'oldfieldtype': u'Link',
 		'options': u'Warehouse',
 		'permlevel': 0,
-		'print_hide': 0,
+		'print_hide': 1,
 		'width': u'100px'
 	},
 
@@ -243,6 +248,7 @@
 		'oldfieldtype': u'Link',
 		'options': u'UOM',
 		'permlevel': 0,
+		'print_hide': 1,
 		'reqd': 1,
 		'trigger': u'Client',
 		'width': u'100px'
@@ -441,7 +447,7 @@
 		'oldfieldtype': u'Link',
 		'options': u'Purchase Order',
 		'permlevel': 1,
-		'print_hide': 0,
+		'print_hide': 1,
 		'reqd': 0,
 		'search_index': 1,
 		'width': u'150px'
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 0eb78df..1e558c9 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -51,7 +51,7 @@
     hide_field(lst);
     unhide_field(['supplier','supplier_name','supplier_address','purchase_receipt_no']);
   }
-  if(doc.purpose == 'Sales Return'){
+  else if(doc.purpose == 'Sales Return'){
     doc.supplier=doc.supplier_name = doc.supplier_address=doc.purchase_receipt_no='';
     hide_field(lst);
     unhide_field(['customer','customer_name','customer_address','delivery_note_no', 'sales_invoice_no']);