fix: added also for leave applier as requested
This commit is contained in:
parent
54482fd83f
commit
6bafbffee0
@ -51,7 +51,8 @@ class LeaveApplication(Document):
|
|||||||
self.update_attendance()
|
self.update_attendance()
|
||||||
|
|
||||||
# notify leave applier about approval
|
# 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.create_leave_ledger_entry()
|
||||||
self.reload()
|
self.reload()
|
||||||
|
|
||||||
@ -61,7 +62,8 @@ class LeaveApplication(Document):
|
|||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
self.create_leave_ledger_entry(submit=False)
|
self.create_leave_ledger_entry(submit=False)
|
||||||
# notify leave applier about cancellation
|
# 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()
|
self.cancel_attendance()
|
||||||
|
|
||||||
def validate_applicable_after(self):
|
def validate_applicable_after(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user