mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 12:25:09 +00:00
checked sal struc docstatus in validation
This commit is contained in:
@@ -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 ''
|
||||
|
||||
#========================================================================================================
|
||||
|
||||
Reference in New Issue
Block a user