Merge branch 'unicode' of github.com:webnotes/erpnext into unicode
diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py
index bdccf63..466b2f9 100644
--- a/erpnext/accounts/doctype/account/account.py
+++ b/erpnext/accounts/doctype/account/account.py
@@ -76,6 +76,10 @@
 			elif par and not self.doc.is_pl_account:
 				self.doc.is_pl_account = par[0][2]
 				self.doc.debit_or_credit = par[0][3]
+		elif self.doc.account_name not in ['Income','Source of Funds (Liabilities)',\
+		 	'Expenses','Application of Funds (Assets)']:
+			msgprint("Parent Account is mandatory", raise_exception=1)
+
 	
 	# Account name must be unique
 	def validate_duplicate_account(self):
diff --git a/erpnext/hr/doctype/attendance/attendance.js b/erpnext/hr/doctype/attendance/attendance.js
index 4ccc63e..120a50e 100644
--- a/erpnext/hr/doctype/attendance/attendance.js
+++ b/erpnext/hr/doctype/attendance/attendance.js
@@ -18,13 +18,13 @@
 
 //get employee's name based on employee id selected
 cur_frm.cscript.employee = function(doc,cdt,cdn){
-  if(doc.employee) get_server_fields('get_emp_name', '', '', doc, cdt, cdn, 1);
-  refresh_field('employee_name'); 
+	if(doc.employee) get_server_fields('get_emp_name', '', '', doc, cdt, cdn, 1);
+	refresh_field('employee_name'); 
 }
 
 
 //Employee
 //-----------------------------
 cur_frm.fields_dict['employee'].get_query = function(doc,cdt,cdn) {
-  return 'SELECT `tabEmployee`.`name` FROM `tabEmployee` WHERE `tabEmployee`.status = "Active" AND `tabEmployee`.`docstatus`!= 2 AND `tabEmployee`.%(key)s LIKE "%s"  ORDER BY `tabEmployee`.`name` ASC LIMIT 50';
+	return 'SELECT `tabEmployee`.`name`, `tabEmployee`.`employee_name` FROM `tabEmployee` WHERE `tabEmployee`.status = "Active" AND `tabEmployee`.`docstatus`!= 2 AND (`tabEmployee`.`employee_name` LIKE "%s" OR `tabEmployee`.`%(key)s` LIKE "%s") ORDER BY `tabEmployee`.`name` ASC LIMIT 50';
 }