mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-06 12:04:00 +00:00
Mark attendance only if to_date <= nowdate in Leave Application
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user