minor fixes
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py
index 6fdcb3d..0da3094 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.py
@@ -212,7 +212,7 @@
 			where employee=%s and (from_date <= %s or from_date <= %s)
 			and (to_date is null or to_date >= %s or to_date >= %s)
 			and salary_structure in (select name from `tabSalary Structure`
-				where is_active = 'Yes'%s)
+				where docstatus = 1 and is_active = 'Yes'%s)
 			"""% ('%s', '%s', '%s','%s','%s', cond),(self.employee, self.start_date, joining_date, self.end_date, relieving_date))
 
 		if st_name:
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js
index ca92234..c63887b 100755
--- a/erpnext/hr/doctype/salary_structure/salary_structure.js
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.js
@@ -123,15 +123,6 @@
 	}
 });
 
-frappe.ui.form.on('Salary Structure Employee', {
-	from_date: function(frm, cdt, cdn) {
-		validate_date(frm, cdt, cdn);
-	},
-	to_date: function(frm, cdt, cdn) {
-		validate_date(frm, cdt, cdn);
-	}
-});
-
 var validate_date = function(frm, cdt, cdn) {
 	var doc = locals[cdt][cdn];
 	if(doc.to_date && doc.from_date) {