How to automatically set Late Entry checkmark in Attendance Form if time of entry is past shift time?

Hi,

I am trying to find a solution to automatically mark the Late Entry checkbox to be set as checked if the following condition holds:

  • If time field’s value >= 11:31 am or If the in_time >= 11:31 am

My questions what controller hooks, or code I need to set and where do I need to put those?

Thank You.

Hi
You do not need to do any additional coding you could just use the Enable Auto Attendance feature in Shift type, and check the Enable Entry Grace Period and set Late Entry Grace Period field to 0 it will trigger the Late Entry in Attendance if the employee has come beyond their shift time of 11:31 when you trigger the Mark Attendance button

2 Likes

Hi,

Thank you for replying, appreciate the effort and time.

I just had couple of confusion regarding this,

  • Does this require Biometric device?
  • Does this apply only when employee mark there attendance using “Mark Attendance” button or “New” button.

Thank you.

  • Does this require Biometric device?

It is using the Employee Checkin, with Shift Type, you can connect it with a biometric device using APIs.

  • Does this apply only when employee mark there attendance using “Mark Attendance” button or “New” button.

if you are referring to Attendance, the mark attendance just marks present and absent and does not calculate working hours or mark late entry

So correct me If I understood it right,

  • I do not need biometric device for automatic late entry assignment.

  • If employee use the “new” button to mark there attendance, then it will work.

Thanks @bibinqcs for your time once again.

  • I do not need biometric device for automatic late entry assignment.

You do not need a biometric device

  • If employee use the “new” button to mark there attendance, then it will work.

you need to get your employees to use Employee Checkin not Attendance.
Attendance will just mark Present, Absent… If you use Employee Checkin after setting a holiday list and default shift for every employee. In shift type you can enable Auto Attendance, where if you configure as I mentioned above i.e

check the Enable Entry Grace Period and set Late Entry Grace Period field to 0

It will trigger late entry and compute total working hours based on the shift time set.

1 Like

Hey.
I just read the above answer. We have active Employee check in and check out taking place. And it even mark the attendance correctly through auto marking of attendance. I have enable the grace period. But, I’m not sure why doesn’t late_in and early_out gets marked even if the employee is not on time. Could you please help out with this?

@Salwa_Shaikh If grace period is enabled it should automatically mark the late entry and early exit. Could you share some detail on your shift type configuration.

Hello @bibinqcs , Thank you for your response.
So, the other day I changed the value of “Determine Check-in and Check-out” from “Strictly based on Log Type in Employee Checkin” to “Alternating entries as IN and OUT during the same shift”. And, that started marking the late_in and early_out in the attendance.
Shift Type Configuration:

when you were using “Strictly based on Log Type…”, was the working hours getting calculated while attendance was marked by the system?
As in that configuration it looks for both log type IN and OUT incase one is missing working hours would not calculate and the late entry and early exit also would not work, but the employee is marked present for the day.

Well, it used to calculate the working hour fine. It still does. Just when I was using “Strictly based on Log Type”, it wouldn’t mark the late_in and early_out.

Hi @bibinqcs

As you rightly mentioned, that “Attendance will just mark Present, Absent…”
We have man power on site, whose attendance *in & Out time) we receive in excel sheet. We need to upload and record In & Out time for them to calculate work hours in 3 shifts. Employee checkin is not possible in that case. What is the best way to do this?

Seems like an error, based on the code if the working hours are calculated it should mark the late entry and early exit if configured.

I would recommend that you configure the 3 Shifts in Shift Type. Import the excel timesheets into Employee Checkin ( map the sheet into the required fields in employee checkin, i.e employee_code, time (datetime), log_type (in / out) ).

The Attendance would generate based on shift configuration the in and out time from the excel sheet

Hi @bibinqcs
I am new here,
I have been trying to work with the employee attendance.
I was wondering if there is any way to count late attendance? Like, if someone is late for 2 days, the system will count that as one day absent?
Could you please help me how to do this?

Hi,
You would need to write a custom function for that. It would be difficult to mark an employee absent based on two late entry. You could create a process while running payroll, run a check to see total number of late entry and deduct pay according to hr policy

Thanks for the reply… Could you please help me how to get total number of late days? after this i think we can go further.

@Past_Papers check this link

https://frappeframework.com/docs/v14/user/en/api/database#frappedbcount

you can use this build a function to get the count