fix(test): Employee Exit Summary (#28888)
This commit is contained in:
parent
7c33df5d54
commit
a481a7c90e
@ -19,7 +19,7 @@ class TestExitInterview(unittest.TestCase):
|
||||
frappe.db.sql('delete from `tabExit Interview`')
|
||||
|
||||
def test_duplicate_interview(self):
|
||||
employee = make_employee('employeeexit1@example.com')
|
||||
employee = make_employee('employeeexitint1@example.com')
|
||||
frappe.db.set_value('Employee', employee, 'relieving_date', getdate())
|
||||
interview = create_exit_interview(employee)
|
||||
|
||||
@ -27,7 +27,7 @@ class TestExitInterview(unittest.TestCase):
|
||||
self.assertRaises(frappe.DuplicateEntryError, doc.save)
|
||||
|
||||
def test_relieving_date_validation(self):
|
||||
employee = make_employee('employeeexit2@example.com')
|
||||
employee = make_employee('employeeexitint2@example.com')
|
||||
# unset relieving date
|
||||
frappe.db.set_value('Employee', employee, 'relieving_date', None)
|
||||
|
||||
|
@ -108,12 +108,11 @@ def get_data(filters):
|
||||
interview.status.as_('interview_status'), interview.employee_status.as_('employee_status'),
|
||||
interview.reference_document_name.as_('questionnaire'), fnf.name.as_('full_and_final_statement'))
|
||||
.distinct()
|
||||
.orderby(employee.relieving_date, order=Order.asc)
|
||||
.where(
|
||||
((employee.relieving_date.isnotnull()) | (employee.relieving_date != ''))
|
||||
& ((interview.name.isnull()) | ((interview.name.isnotnull()) & (interview.docstatus != 2)))
|
||||
& ((fnf.name.isnull()) | ((fnf.name.isnotnull()) & (fnf.docstatus != 2)))
|
||||
)
|
||||
).orderby(employee.relieving_date, order=Order.asc)
|
||||
)
|
||||
|
||||
query = get_conditions(filters, query, employee, interview, fnf)
|
||||
|
Loading…
x
Reference in New Issue
Block a user