merge
diff --git a/erpnext/accounts/doctype/c_form/c_form.py b/erpnext/accounts/doctype/c_form/c_form.py
index 943cef2..416657b 100644
--- a/erpnext/accounts/doctype/c_form/c_form.py
+++ b/erpnext/accounts/doctype/c_form/c_form.py
@@ -46,6 +46,14 @@
 		else:
 			msgprint("Please enter atleast 1 invoice in the table below", raise_exception=1)
 
+		self.calculate_total_invoiced_amount()
+
+	def calculate_total_invoiced_amount(self):
+		total = 0
+		for d in getlist(self.doclist, 'invoice_details'):
+			total += flt(d.grand_total)
+		webnotes.conn.set(self.doc, 'total_invoiced_amount', total)
+
 
 	def get_invoice_details(self, invoice_no):
 		"""	Pull details from invoices for referrence """
diff --git a/erpnext/accounts/doctype/c_form/c_form.txt b/erpnext/accounts/doctype/c_form/c_form.txt
index 503992e..b404204 100644
--- a/erpnext/accounts/doctype/c_form/c_form.txt
+++ b/erpnext/accounts/doctype/c_form/c_form.txt
@@ -3,23 +3,25 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2012-03-27 14:35:41',
+		'creation': '2011-12-14 11:40:47',
 		'docstatus': 0,
-		'modified': '2012-03-27 14:35:41',
+		'modified': '2012-04-06 17:29:50',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
 
 	# These values are common for all DocType
 	{
-		'_last_update': u'1323255350',
+		'_last_update': u'1333712835',
+		'allow_attach': 1,
 		'colour': u'White:FFF',
 		'doctype': 'DocType',
+		'max_attachments': 3,
 		'module': u'Accounts',
 		'name': '__common__',
 		'section_style': u'Simple',
 		'show_in_menu': 0,
-		'version': 11
+		'version': 19
 	},
 
 	# These values are common for all DocField
@@ -79,6 +81,7 @@
 		'doctype': u'DocField',
 		'fieldname': u'column_break0',
 		'fieldtype': u'Column Break',
+		'permlevel': 0,
 		'width': u'50%'
 	},
 
@@ -89,6 +92,7 @@
 		'fieldtype': u'Select',
 		'label': u'Series',
 		'options': u'\nC-FORM/',
+		'permlevel': 0,
 		'reqd': 1
 	},
 
@@ -98,6 +102,7 @@
 		'fieldname': u'c_form_no',
 		'fieldtype': u'Data',
 		'label': u'C-Form No',
+		'permlevel': 0,
 		'reqd': 1
 	},
 
@@ -107,6 +112,7 @@
 		'fieldname': u'received_date',
 		'fieldtype': u'Date',
 		'label': u'Received Date',
+		'permlevel': 0,
 		'reqd': 1
 	},
 
@@ -117,6 +123,7 @@
 		'fieldtype': u'Link',
 		'label': u'Customer',
 		'options': u'Customer',
+		'permlevel': 0,
 		'reqd': 1
 	},
 
@@ -125,6 +132,7 @@
 		'doctype': u'DocField',
 		'fieldname': u'column_break1',
 		'fieldtype': u'Column Break',
+		'permlevel': 0,
 		'width': u'50%'
 	},
 
@@ -134,7 +142,8 @@
 		'fieldname': u'company',
 		'fieldtype': u'Select',
 		'label': u'Company',
-		'options': u'link:Company'
+		'options': u'link:Company',
+		'permlevel': 0
 	},
 
 	# DocField
@@ -144,6 +153,7 @@
 		'fieldtype': u'Select',
 		'label': u'Fiscal Year',
 		'options': u'link:Fiscal Year',
+		'permlevel': 0,
 		'reqd': 1
 	},
 
@@ -153,7 +163,8 @@
 		'fieldname': u'quarter',
 		'fieldtype': u'Select',
 		'label': u'Quarter',
-		'options': u'\nI\nII\nIII\nIV'
+		'options': u'\nI\nII\nIII\nIV',
+		'permlevel': 0
 	},
 
 	# DocField
@@ -162,6 +173,7 @@
 		'fieldname': u'total_amount',
 		'fieldtype': u'Currency',
 		'label': u'Total Amount',
+		'permlevel': 0,
 		'reqd': 1
 	},
 
@@ -172,6 +184,7 @@
 		'fieldtype': u'Select',
 		'label': u'State',
 		'options': u"link:State\ncountry='India'",
+		'permlevel': 0,
 		'reqd': 1
 	},
 
@@ -179,7 +192,8 @@
 	{
 		'doctype': u'DocField',
 		'fieldname': u'section_break0',
-		'fieldtype': u'Section Break'
+		'fieldtype': u'Section Break',
+		'permlevel': 0
 	},
 
 	# DocField
@@ -188,6 +202,28 @@
 		'fieldname': u'invoice_details',
 		'fieldtype': u'Table',
 		'label': u'Invoice Details',
-		'options': u'C-Form Invoice Detail'
+		'options': u'C-Form Invoice Detail',
+		'permlevel': 0
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'total_invoiced_amount',
+		'fieldtype': u'Currency',
+		'label': u'Total Invoiced Amount',
+		'permlevel': 1,
+		'print_hide': 0
+	},
+
+	# DocField
+	{
+		'doctype': u'DocField',
+		'fieldname': u'file_list',
+		'fieldtype': u'Text',
+		'hidden': 1,
+		'label': u'File List',
+		'permlevel': 0,
+		'print_hide': 1
 	}
-]
\ No newline at end of file
+]
diff --git a/erpnext/accounts/page/accounts_home/accounts_home.js b/erpnext/accounts/page/accounts_home/accounts_home.js
index 4551db0..52738a8 100644
--- a/erpnext/accounts/page/accounts_home/accounts_home.js
+++ b/erpnext/accounts/page/accounts_home/accounts_home.js
@@ -19,4 +19,12 @@
 	if(wn.control_panel.country!='India') {
 		$('.india-specific').toggle(false);
 	}
-}
\ No newline at end of file
+
+	if(wn.boot.profile.roles.indexOf('Accounts Manager')==-1 && wn.boot.profile.roles.indexOf('Accounts User')==-1) {
+		$('[href*="Accounts Browser"]').each(function() {
+			var txt = $(this).text();
+			$(this).parent().css('color', '#999').html(txt);
+		});
+	}
+
+}
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.py b/erpnext/buying/doctype/purchase_common/purchase_common.py
index a9e0c87..bef418d 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.py
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.py
@@ -226,7 +226,7 @@
 				if d.fields.has_key(x):
 					d.fields[x] = f_lst[x]
 			
-			item = sql("select is_stock_item, is_purchase_item from tabItem where name=%s and (ifnull(end_of_life,'')=''	or end_of_life = '0000-00-00' or end_of_life >	now())", d.item_code)
+			item = sql("select is_stock_item, is_purchase_item, is_sub_contracted_item from tabItem where name=%s and (ifnull(end_of_life,'')='' or end_of_life = '0000-00-00' or end_of_life >	now())", d.item_code)
 			if not item:
 				msgprint("Item %s does not exist in Item Master." % cstr(d.item_code))
 				raise Exception
@@ -238,9 +238,10 @@
 					raise Exception
 			
 			# validate purchase item
-			if not item[0][1]=='Yes':
-				msgprint("Item %s is not purchase item." % (d.item_code))
+			if item[0][1] != 'Yes' and item[0][2] != 'Yes':
+				msgprint("Item %s is not a purchase item or sub-contracted item. Please check" % (d.item_code))
 				raise Exception
+
 			
 			if d.fields.has_key('prevdoc_docname') and d.prevdoc_docname:
 				# check warehouse, uom	in previous doc and in current doc are same.
diff --git a/erpnext/buying/page/buying_home/buying_home.html b/erpnext/buying/page/buying_home/buying_home.html
index cbd347d..9e05045 100644
--- a/erpnext/buying/page/buying_home/buying_home.html
+++ b/erpnext/buying/page/buying_home/buying_home.html
@@ -4,7 +4,7 @@
 		<h1>Buying</h1>
 		<hr>
 		<div style="width: 48%; float: left;">
-			<h4><a href="#!List/Purchase Requisition">Purchase Requisition</a></h4>
+			<h4><a href="#!List/Purchase Request">Purchase Request</a></h4>
 			<p class="help">Request for purchase</p>
 			<h4><a href="#!List/Purchase Order">Purchase Order</a></h4>
 			<p class="help">Purchase Orders given to Suppliers</p>
diff --git a/erpnext/patches/april_2012/__init__.py b/erpnext/patches/april_2012/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/patches/april_2012/__init__.py
diff --git a/erpnext/patches/april_2012/reload_c_form.py b/erpnext/patches/april_2012/reload_c_form.py
new file mode 100644
index 0000000..246ea0f
--- /dev/null
+++ b/erpnext/patches/april_2012/reload_c_form.py
@@ -0,0 +1,4 @@
+def execute():
+	import webnotes
+	from webnotes.modules.module_manager import reload_doc
+	reload_doc('accounts', 'doctype', 'c_form')
diff --git a/erpnext/patches/jan_mar_2012/rename_dt.py b/erpnext/patches/jan_mar_2012/rename_dt.py
index a258f73..e591a87 100644
--- a/erpnext/patches/jan_mar_2012/rename_dt.py
+++ b/erpnext/patches/jan_mar_2012/rename_dt.py
@@ -161,7 +161,7 @@
 		webnotes.conn.sql("update `tabGL Entry` set voucher_type = replace(voucher_type, '%s', '%s') where voucher_type = '%s'" % (d, rendt[d], d))
 
 		# Stock ledger entry
-		webnotes.conn.sql("update `tabStock ledger Entry` set voucher_type = replace(voucher_type, '%s', '%s') where voucher_type = '%s'" % (d, rendt[d], d))
+		webnotes.conn.sql("update `tabStock Ledger Entry` set voucher_type = replace(voucher_type, '%s', '%s') where voucher_type = '%s'" % (d, rendt[d], d))
 
 		# Custom fld: options
 		webnotes.conn.sql("update `tabCustom Field` set options = replace(options, %s, %s) where fieldtype in ('Link', 'Select')", (d, rendt[d]))
diff --git a/erpnext/patches/mar_2012/earning_deduction_type_patch.py b/erpnext/patches/mar_2012/earning_deduction_type_patch.py
new file mode 100644
index 0000000..438b34e
--- /dev/null
+++ b/erpnext/patches/mar_2012/earning_deduction_type_patch.py
@@ -0,0 +1,14 @@
+def execute():
+	import webnotes
+	webnotes.conn.sql("""
+		UPDATE `tabDocField`
+		SET fieldtype = 'Link', options = 'Deduction Type'
+		WHERE parent = 'Deduction Detail'
+		AND fieldname = 'd_type'
+		""")
+	webnotes.conn.sql("""
+		UPDATE `tabDocField`
+		SET fieldtype = 'Link', options = 'Earning Type'
+		WHERE parent = 'Earning Detail'
+		AND fieldname = 'e_type'
+		""")
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index d5ff35e..7bb6001 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -261,5 +261,10 @@
 		'patch_module': 'patches.mar_2012',
 		'patch_file': 'usertags',
 		'description': 'Adds _user_tags columns to tables' 
-	}
+	},
+	{
+		'patch_module': 'patches.april_2012',
+		'patch_file': 'reload_c_form',
+		'description': 'Added attchemnt option and total field'
+	},
 ]
diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js
index 2a6e5a3..52f3124 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.js
+++ b/erpnext/selling/doctype/sales_common/sales_common.js
@@ -157,11 +157,18 @@
 			args: {'price_list':doc.price_list_name, 'company': doc.company},
 			callback: function(r, rt) {
 				pl_currency = r.message[0]?r.message[0]:[];
+				unhide_field(['price_list_currency', 'plc_conversion_rate']);
+				
 				if (pl_currency.length==1) {
-					if (pl_currency[0] == doc.currency) set_multiple(cdt, cdn, {price_list_currency:doc.currency, plc_conversion_rate:doc.conversion_rate});
-					else if (pl_currency[0] = r.message[1]) set_multiple(cdt, cdn, {price_list_currency:pl_currency[0], plc_conversion_rate:1})
-					hide_field(['price_list_currency', 'plc_conversion_rate']);
-				} else unhide_field(['price_list_currency', 'plc_conversion_rate']);
+					set_multiple(cdt, cdn, {price_list_currency:pl_currency[0]});
+					if (pl_currency[0] == doc.currency) {
+						set_multiple(cdt, cdn, {plc_conversion_rate:doc.conversion_rate});
+						hide_field(['price_list_currency', 'plc_conversion_rate']);
+					} else if (pl_currency[0] == r.message[1]) {
+						set_multiple(cdt, cdn, {plc_conversion_rate:1})
+						hide_field(['price_list_currency', 'plc_conversion_rate']);
+					}					
+				}
 
 				if (r.message[1] == doc.currency) {
 					set_multiple(cdt, cdn, {conversion_rate:1});
diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py
index 31cc637..b3ea118 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.py
+++ b/erpnext/setup/doctype/email_digest/email_digest.py
@@ -240,7 +240,9 @@
 			Adds common conditions in dictionary "args"
 		"""
 		start_date, end_date = self.get_start_end_dates()
-		fiscal_start_date = webnotes.utils.get_defaults()['year_start_date']
+		fiscal_year = webnotes.utils.get_defaults()['fiscal_year']
+		fiscal_start_date = webnotes.conn.get_value('Fiscal Year', fiscal_year,
+				'year_start_date')
 
 		if 'new' in args['type']:
 			args.update({
diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py
index bef4987..3b820b8 100644
--- a/erpnext/setup/doctype/naming_series/naming_series.py
+++ b/erpnext/setup/doctype/naming_series/naming_series.py
@@ -19,6 +19,7 @@
 
 from webnotes.utils import cint, cstr
 from webnotes import msgprint, errprint
+import webnotes.model.doctype
 
 sql = webnotes.conn.sql
 	
@@ -31,13 +32,13 @@
 
 	#-----------------------------------------------------------------------------------------------------------------------------------
 	def get_transactions(self):
-		return "\n".join([''] + [i[0] for i in sql("SELECT `tabDocField`.`parent` FROM `tabDocField`, `tabDocType` WHERE `tabDocField`.`fieldname` = 'naming_series' and `tabDocType`.module !='Recycle Bin' and `tabDocType`.name=`tabDocField`.parent order by `tabDocField`.parent")])
+		return "\n".join([''] + [i[0] for i in sql("SELECT `tabDocField`.`parent` FROM `tabDocField`, `tabDocType` WHERE `tabDocField`.`fieldname` = 'naming_series' and `tabDocType`.name=`tabDocField`.parent order by `tabDocField`.parent")])
 	
 	#-----------------------------------------------------------------------------------------------------------------------------------
 	def get_options_for(self, doctype):
-		sr = sql("select options from `tabDocField` where parent='%s' and fieldname='naming_series'" % (doctype))
-		if sr and sr[0][0]:
-			return sr[0][0].split("\n")
+		sr = webnotes.model.doctype.get_property(doctype, 'naming_series')
+		if sr:
+			return sr.split("\n")
 		else:
 			return []
 	
@@ -50,7 +51,7 @@
 		options = self.scrub_options_list(ol)
 		
 		# validate names
-		[self.validate_series_name(i) for i in options]
+		for i in options: self.validate_series_name(i)
 		
 		if self.doc.user_must_always_select:
 			options = [''] + options
@@ -58,8 +59,28 @@
 		else:
 			default = options[0]
 		
-		# update
-		sql("update tabDocField set `options`=%s, `default`=%s where parent=%s and fieldname='naming_series'", ("\n".join(options), default, doctype))
+		# update in property setter
+		prop_dict = {'options': "\n".join(options), 'default': default}
+		for prop in prop_dict:
+			ps_exists = webnotes.conn.sql("""SELECT name FROM `tabProperty Setter`
+					WHERE doc_type = %s AND field_name = 'naming_series'
+					AND property = %s""", (doctype, prop))
+			if ps_exists:
+				ps = Document('Property Setter', ps_exists[0][0])
+				ps.value = prop_dict[prop]
+				ps.save()
+			else:
+				ps = Document('Property Setter', fielddata = {
+					'doctype_or_field': 'DocField',
+					'doc_type': doctype,
+					'field_name': 'naming_series',
+					'property': prop,
+					'value': prop_dict[prop],
+					'property_type': 'Select',
+					'select_doctype': doctype
+				})
+				ps.save(1)
+
 		self.doc.set_options = "\n".join(options)
 	
 	#-----------------------------------------------------------------------------------------------------------------------------------
@@ -73,7 +94,8 @@
 		from core.doctype.doctype.doctype import DocType
 		dt = DocType()
 	
-		sr = sql("select options, parent from `tabDocField` where fieldname='naming_series' and parent != %s", self.doc.select_doc_for_series)
+		parent = sql("select parent from `tabDocField` where fieldname='naming_series' and parent != %s", self.doc.select_doc_for_series)
+		sr = ([p[0], webnotes.model.doctype.get_property(p[0], 'naming_series')] for p in parent)
 		options = self.scrub_options_list(self.doc.set_options.split("\n"))
 		for series in options:
 			dt.validate_series(series, self.doc.select_doc_for_series)
diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js
index 5d7e663..3a51a84 100644
--- a/erpnext/startup/startup.js
+++ b/erpnext/startup/startup.js
@@ -171,3 +171,4 @@
 $(document).bind('startup', function() {
 	erpnext.startup.start();
 });
+
diff --git a/favicon.ico b/favicon.ico
deleted file mode 100644
index 794eaaf..0000000
--- a/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/images/favicon.ico b/images/favicon.ico
new file mode 100644
index 0000000..045b1bd
--- /dev/null
+++ b/images/favicon.ico
Binary files differ
diff --git a/js/all-app.js b/js/all-app.js
index d0c032f..5ca3e7c 100644
--- a/js/all-app.js
+++ b/js/all-app.js
@@ -240,7 +240,7 @@
 wn.views.formview.show(route[1],route[2]);break;case"Report":wn.views.reportview.show(route[1],route[2]);break;default:wn.views.pageview.show(route[0]);}}
 wn.get_route=function(route){if(!route)
 route=window.location.hash;if(route.substr(0,1)=='#')route=route.substr(1);if(route.substr(0,1)=='!')route=route.substr(1);return $.map(route.split('/'),function(r){return decodeURIComponent(r);});}
-wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;}
+wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;set_favicon();}
 wn._cur_route=null;$(window).bind('hashchange',function(){if(location.hash==wn._cur_route)
 return;wn.route();if(wn.boot.analytics_code){try{eval(wn.boot.analytics_code);}catch(e){console.log(e);}}});
 /*
@@ -2140,7 +2140,7 @@
 user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){wn.container.wntoolbar=new wn.ui.toolbar.Toolbar();}
 $(document).trigger('startup');try{if(wn.control_panel.custom_startup_code)
 eval(wn.control_panel.custom_startup_code);}catch(e){errprint(e);}
-var t=to_open();if(t){window.location.hash=t;}else if(home_page){loadpage(home_page);}
+var t=to_open();if(t){window.location.hash=t;set_favicon();}else if(home_page){loadpage(home_page);}
 wn.route();$dh('startup_div');$ds('body_div');}
 var callback=function(r,rt){if(r.exc)console.log(r.exc);setup_globals(r);setup_viewport();}
 if(wn.boot){LocalDB.sync(wn.boot.docs);callback(wn.boot,'');if(wn.boot.error_messages)
@@ -2167,12 +2167,16 @@
 function set_resize_observer(fn){if(resize_observers.indexOf(fn)==-1)resize_observers.push(fn);}
 window.onresize=function(){return;var ht=get_window_height();for(var i=0;i<resize_observers.length;i++){resize_observers[i](ht);}}
 get_window_height=function(){var ht=window.innerHeight?window.innerHeight:document.documentElement.offsetHeight?document.documentElement.offsetHeight:document.body.offsetHeight;return ht;}
+function set_favicon(){var link=$('link[type="image/x-icon"]').remove().attr("href");var favicon='\
+  <link rel="shortcut icon" href="'+link+'" type="image/x-icon"> \
+  <link rel="icon" href="'+link+'" type="image/x-icon">'
+$(favicon).appendTo('head');}
 /*
  *	js/app.js
  */
 wn.app={name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'&copy; Web Notes Technologies Pvt Ltd',version:'2.'+window._version_number}
 wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',function(){startup();});$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next\
-  <i class="icon-home icon-white navbar-icon-home" ></i>').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});})
+  <i class="icon-home icon-white navbar-icon-home" ></i>').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
 /*
  *	erpnext/startup/startup.js
  */
diff --git a/js/all-web.js b/js/all-web.js
index bedf0ef..d7f8f1c 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -127,7 +127,7 @@
 wn.views.formview.show(route[1],route[2]);break;case"Report":wn.views.reportview.show(route[1],route[2]);break;default:wn.views.pageview.show(route[0]);}}
 wn.get_route=function(route){if(!route)
 route=window.location.hash;if(route.substr(0,1)=='#')route=route.substr(1);if(route.substr(0,1)=='!')route=route.substr(1);return $.map(route.split('/'),function(r){return decodeURIComponent(r);});}
-wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;}
+wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;set_favicon();}
 wn._cur_route=null;$(window).bind('hashchange',function(){if(location.hash==wn._cur_route)
 return;wn.route();if(wn.boot.analytics_code){try{eval(wn.boot.analytics_code);}catch(e){console.log(e);}}});
 /*
@@ -839,7 +839,7 @@
 user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){wn.container.wntoolbar=new wn.ui.toolbar.Toolbar();}
 $(document).trigger('startup');try{if(wn.control_panel.custom_startup_code)
 eval(wn.control_panel.custom_startup_code);}catch(e){errprint(e);}
-var t=to_open();if(t){window.location.hash=t;}else if(home_page){loadpage(home_page);}
+var t=to_open();if(t){window.location.hash=t;set_favicon();}else if(home_page){loadpage(home_page);}
 wn.route();$dh('startup_div');$ds('body_div');}
 var callback=function(r,rt){if(r.exc)console.log(r.exc);setup_globals(r);setup_viewport();}
 if(wn.boot){LocalDB.sync(wn.boot.docs);callback(wn.boot,'');if(wn.boot.error_messages)
@@ -866,12 +866,16 @@
 function set_resize_observer(fn){if(resize_observers.indexOf(fn)==-1)resize_observers.push(fn);}
 window.onresize=function(){return;var ht=get_window_height();for(var i=0;i<resize_observers.length;i++){resize_observers[i](ht);}}
 get_window_height=function(){var ht=window.innerHeight?window.innerHeight:document.documentElement.offsetHeight?document.documentElement.offsetHeight:document.body.offsetHeight;return ht;}
+function set_favicon(){var link=$('link[type="image/x-icon"]').remove().attr("href");var favicon='\
+  <link rel="shortcut icon" href="'+link+'" type="image/x-icon"> \
+  <link rel="icon" href="'+link+'" type="image/x-icon">'
+$(favicon).appendTo('head');}
 /*
  *	js/app.js
  */
 wn.app={name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'&copy; Web Notes Technologies Pvt Ltd',version:'2.'+window._version_number}
 wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',function(){startup();});$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next\
-  <i class="icon-home icon-white navbar-icon-home" ></i>').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});})
+  <i class="icon-home icon-white navbar-icon-home" ></i>').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
 /*
  *	erpnext/startup/startup.js
  */
diff --git a/js/app.js b/js/app.js
index f2e24bb..6555de0 100644
--- a/js/app.js
+++ b/js/app.js
@@ -38,4 +38,4 @@
 	}, function() {
 		$(this).find('.icon-home').removeClass('navbar-icon-home-hover');
 	});
-})
+});
diff --git a/version.num b/version.num
index e4a36c3..1fd9918 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-1539
\ No newline at end of file
+1539