fix: added also for leave applier as requested

This commit is contained in:
Anurag Mishra 2021-03-16 12:44:49 +05:30
parent 54482fd83f
commit 6bafbffee0

View File

@ -51,7 +51,8 @@ class LeaveApplication(Document):
self.update_attendance()
# notify leave applier about approval
self.notify_employee()
if frappe.db.get_single_value("HR Settings", "send_leave_notification"):
self.notify_employee()
self.create_leave_ledger_entry()
self.reload()
@ -61,7 +62,8 @@ class LeaveApplication(Document):
def on_cancel(self):
self.create_leave_ledger_entry(submit=False)
# notify leave applier about cancellation
self.notify_employee()
if frappe.db.get_single_value("HR Settings", "send_leave_notification"):
self.notify_employee()
self.cancel_attendance()
def validate_applicable_after(self):