Merge branch 'responsive' of github.com:webnotes/erpnext into responsive
diff --git a/hr/doctype/employee/employee.js b/hr/doctype/employee/employee.js
index 5a2dbab..4ef66a0 100644
--- a/hr/doctype/employee/employee.js
+++ b/hr/doctype/employee/employee.js
@@ -30,13 +30,9 @@
 	refresh: function() {
 		var me = this;
 		erpnext.hide_naming_series();
-		if(!this.frm.doc.__islocal) {
-			cur_frm.add_custom_button('View Active Salary Structure', function() {
-				me.view_active_salary_structure(this); });
-			
+		if(!this.frm.doc.__islocal) {			
 			cur_frm.add_custom_button('Make Salary Structure', function() {
 				me.make_salary_structure(this); });
-			
 		}
 	},
 	
@@ -45,7 +41,8 @@
 		this.frm.call({
 			method:"hr.utils.get_leave_approver_list",
 			callback: function(r) {
-				me.frm.fields_dict.employee_leave_approvers.grid.get_field("leave_approver").df.options =
+				me.frm.fields_dict.employee_leave_approvers.grid
+					.get_field("leave_approver").df.options =
 					$.map(r.message, function(profile) { 
 						return {value: profile, label: wn.user_info(profile).fullname}; 
 					});
@@ -75,9 +72,9 @@
 			if(r.message) {
 				msgprint(wn._("Employee") + ' "' + me.frm.doc.name + '": ' 
 					+ wn._("An active Salary Structure already exists. \
-						If you want to create new one, please ensure that no active Salary Structure \
-					 	exists for this Employee. Go to the active Salary Structure and set \
-						\"Is Active\" = \"No\""));
+						If you want to create new one, please ensure that no active \
+						Salary Structure exists for this Employee. \
+						Go to the active Salary Structure and set \"Is Active\" = \"No\""));
 			} else if(!r.exc) {
 				wn.model.map({
 					source: wn.model.get_doclist(me.frm.doc.doctype, me.frm.doc.name),
diff --git a/hr/doctype/employee/employee.txt b/hr/doctype/employee/employee.txt
index 9d6dfae..44e1bb2 100644
--- a/hr/doctype/employee/employee.txt
+++ b/hr/doctype/employee/employee.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-03-07 09:04:18", 
   "docstatus": 0, 
-  "modified": "2013-07-05 14:36:19", 
+  "modified": "2013-07-10 12:52:17", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -31,7 +31,9 @@
   "parent": "Employee", 
   "parentfield": "permissions", 
   "parenttype": "DocType", 
+  "permlevel": 0, 
   "read": 1, 
+  "report": 1, 
   "submit": 0
  }, 
  {
@@ -55,7 +57,7 @@
   "doctype": "DocField", 
   "fieldname": "image_view", 
   "fieldtype": "Image", 
-  "in_list_view": 1, 
+  "in_list_view": 0, 
   "label": "Image View", 
   "options": "image"
  }, 
@@ -564,6 +566,12 @@
  }, 
  {
   "doctype": "DocField", 
+  "fieldname": "column_break6", 
+  "fieldtype": "Column Break", 
+  "width": "50%"
+ }, 
+ {
+  "doctype": "DocField", 
   "fieldname": "marital_status", 
   "fieldtype": "Select", 
   "label": "Marital Status", 
@@ -577,12 +585,6 @@
   "options": "\nA+\nA-\nB+\nB-\nAB+\nAB-\nO+\nO-"
  }, 
  {
-  "doctype": "DocField", 
-  "fieldname": "column_break6", 
-  "fieldtype": "Column Break", 
-  "width": "50%"
- }, 
- {
   "description": "Here you can maintain family details like name and occupation of parent, spouse and children", 
   "doctype": "DocField", 
   "fieldname": "family_background", 
@@ -748,17 +750,6 @@
   "create": 0, 
   "doctype": "DocPerm", 
   "match": "employee", 
-  "permlevel": 0, 
-  "report": 1, 
-  "role": "Employee", 
-  "write": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 1, 
-  "report": 0, 
   "role": "Employee", 
   "write": 0
  }, 
@@ -767,8 +758,6 @@
   "create": 1, 
   "doctype": "DocPerm", 
   "match": "company", 
-  "permlevel": 0, 
-  "report": 1, 
   "role": "HR User", 
   "write": 1
  }, 
@@ -776,27 +765,7 @@
   "cancel": 1, 
   "create": 1, 
   "doctype": "DocPerm", 
-  "permlevel": 0, 
-  "report": 1, 
   "role": "HR Manager", 
   "write": 1
- }, 
- {
-  "cancel": 0, 
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 1, 
-  "report": 0, 
-  "role": "HR User", 
-  "write": 0
- }, 
- {
-  "cancel": 0, 
-  "create": 0, 
-  "doctype": "DocPerm", 
-  "permlevel": 1, 
-  "report": 0, 
-  "role": "HR Manager", 
-  "write": 0
  }
 ]
\ No newline at end of file
diff --git a/hr/doctype/salary_slip/salary_slip.py b/hr/doctype/salary_slip/salary_slip.py
index e3e43e4..1af71d5 100644
--- a/hr/doctype/salary_slip/salary_slip.py
+++ b/hr/doctype/salary_slip/salary_slip.py
@@ -21,7 +21,7 @@
 from webnotes.model.doc import make_autoname
 from webnotes.model.bean import getlist
 from webnotes.model.code import get_obj
-from webnotes import msgprint
+from webnotes import msgprint, _
 from setup.utils import get_company_currency
 
 sql = webnotes.conn.sql
@@ -65,12 +65,6 @@
 		from hr.doctype.salary_structure.salary_structure import make_salary_slip
 		make_salary_slip(struct, self.doclist)
 
-		basic_info = sql("select bank_name, bank_ac_no, esic_card_no, pf_number from `tabEmployee` where name ='%s'" % self.doc.employee)
-		self.doc.bank_name = basic_info[0][0]
-		self.doc.bank_account_no = basic_info[0][1]
-		self.doc.esic_no = basic_info[0][2]
-		self.doc.pf_no = basic_info[0][3]
-
 
 	def get_leave_details(self, lwp=None):
 		m = get_obj('Salary Manager').get_month_details(self.doc.fiscal_year, self.doc.month)
@@ -92,7 +86,9 @@
 			if getdate(emp['relieving_date']) > m['month_start_date'] and getdate(emp['relieving_date']) < m['month_end_date']:
 				payment_days = getdate(emp['relieving_date']).day
 			elif getdate(emp['relieving_date']) < m['month_start_date']:
-				payment_days = 0
+				webnotes.msgprint(_("Relieving Date of employee is ") + cstr(emp['relieving_date']
+					+ _(". Please set status of the employee as 'Left'")), raise_exception=1)
+				
 			
 		if emp['date_of_joining']:
 			if getdate(emp['date_of_joining']) > m['month_start_date'] and getdate(emp['date_of_joining']) < m['month_end_date']: