diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.js b/erpnext/hr/doctype/salary_slip/salary_slip.js index 643139aebf..bec87a50f0 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.js +++ b/erpnext/hr/doctype/salary_slip/salary_slip.js @@ -9,8 +9,7 @@ frappe.ui.form.on("Salary Slip", { frm.fields_dict["timesheets"].grid.get_field("time_sheet").get_query = function(){ return { filters: { - employee: frm.doc.employee, - make_for: 'Salary Slip' + employee: frm.doc.employee } } } diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index d95cbf47ae..c4aa854879 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -80,12 +80,11 @@ class SalarySlip(TransactionBase): self.end_date = m['month_end_date'] def check_sal_struct(self, joining_date, relieving_date): - timesheet = 1 if self.salary_slip_based_on_timesheet else 0 struct = frappe.db.sql("""select name from `tabSalary Structure` where employee=%s and is_active = 'Yes' and (from_date <= %s or from_date <= %s) - and (to_date is null or to_date >= %s or to_date >= %s) and salary_slip_based_on_timesheet=%s""", - (self.employee, self.start_date, joining_date, self.end_date, relieving_date, timesheet)) + and (to_date is null or to_date >= %s or to_date >= %s)""", + (self.employee, self.start_date, joining_date, self.end_date, relieving_date)) if not struct: self.salary_structure = None