Mark attendance only if to_date <= nowdate in Leave Application
This commit is contained in:
parent
7c9a6eba3f
commit
65dd1f6b4c
@ -116,7 +116,7 @@ class LeaveApplication(Document):
|
||||
frappe.db.sql("""update `tabAttendance` set status = %s, leave_type = %s\
|
||||
where name = %s""",(status, self.leave_type, d.name))
|
||||
|
||||
elif self.from_date <= nowdate():
|
||||
elif self.to_date <= nowdate():
|
||||
for dt in daterange(getdate(self.from_date), getdate(self.to_date)):
|
||||
date = dt.strftime("%Y-%m-%d")
|
||||
if not date == self.half_day_date:
|
||||
|
Loading…
Reference in New Issue
Block a user