Skip to content

Commit

Permalink
fix: Half Day Leave Application Link To Half Day Attendance (#1147)
Browse files Browse the repository at this point in the history
  • Loading branch information
creative-paramu authored Dec 21, 2023
1 parent 8d6b5d9 commit 30d507f
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 30d507f

Please sign in to comment.