From d984872be9fcc5ac999503e88177e01217e8d4ee Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 16 Sep 2011 14:47:19 +0530 Subject: [PATCH] checked sal struc docstatus in validation --- erpnext/hr/doctype/employee/employee.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py index 01ff32df661..ba602cf5751 100644 --- a/erpnext/hr/doctype/employee/employee.py +++ b/erpnext/hr/doctype/employee/employee.py @@ -46,7 +46,7 @@ class DocType: # check if salary structure exists #======================================================================================================== def check_sal_structure(self, nm): - ret_sal_struct=sql("select name from `tabSalary Structure` where employee='%s' and is_active = 'Yes'"%nm) + ret_sal_struct=sql("select name from `tabSalary Structure` where employee='%s' and is_active = 'Yes' and docstatus!= 2"%nm) return ret_sal_struct and ret_sal_struct[0][0] or '' #========================================================================================================