Merge pull request #14122 from shreyashah115/fixes

Fix in marking attendance from Leave Application
This commit is contained in:
rohitwaghchaure 2018-05-17 17:16:57 +05:30 committed by GitHub
commit b5cc946771
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: