fix: added extra condition (#19884)
This commit is contained in:
parent
6aa763221b
commit
9046c13858
@ -351,7 +351,7 @@ class LeaveApplication(Document):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def create_leave_ledger_entry(self, submit=True):
|
def create_leave_ledger_entry(self, submit=True):
|
||||||
if self.status != 'Approved':
|
if self.status != 'Approved' and submit:
|
||||||
return
|
return
|
||||||
|
|
||||||
expiry_date = get_allocation_expiry(self.employee, self.leave_type,
|
expiry_date = get_allocation_expiry(self.employee, self.leave_type,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user