From 6410022cab5d78f7d53675d2e5063a308dacc762 Mon Sep 17 00:00:00 2001 From: Jamsheer Date: Wed, 16 May 2018 15:10:22 +0530 Subject: [PATCH] minor fixes --- erpnext/hr/doctype/salary_slip/salary_slip.py | 2 +- erpnext/hr/doctype/salary_structure/salary_structure.js | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index 6fdcb3d9a64..0da3094cd3b 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -212,7 +212,7 @@ class SalarySlip(TransactionBase): 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 ca922344610..c63887bcf6c 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', { } }); -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) {