Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Half Day Leave Application Link To Half Day Attendance (backport #1147) #1201

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hrms/hr/doctype/attendance/attendance.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def validate_employee_status(self):
def check_leave_record(self):
leave_record = frappe.db.sql(
"""
select leave_type, half_day, half_day_date
select leave_type, half_day, half_day_date, name
from `tabLeave Application`
where employee = %s
and %s between from_date and to_date
Expand All @@ -160,6 +160,7 @@ def check_leave_record(self):
if leave_record:
for d in leave_record:
self.leave_type = d.leave_type
self.leave_application = d.name
if d.half_day_date == getdate(self.attendance_date):
self.status = "Half Day"
frappe.msgprint(
Expand Down
Loading