I know there has been quite a few discussions on the Forum, but I really haven’t been able to figure out how to make auto attendance work.
I promise you, I have tried to read up all the documentation related to this issue and have tried to tweak around the settings a bit, and I still haven’t been able to make it work.
The deployment here does not use a Biometric Device, Instead uses record their Check In and Check Out by directly accessing the Employee Checkin Document.
As users mark their Checkin In and Checkin Out, is there anyway I can get ERPNext to mark auto attendance for users?
What’s the significance of the Last Synch of Checkin field in the Shift Type? The way I understand it, that’s for the Synch Job to make the Checkins from a Biometric Device? I tried changing this to a future date and it marked a user absent even before the shift was complete.
Will it work if once every few days the Date of Last Synch is changed to the previous day. The way this feature is designed, will it then push the attendance for the days between One Day after the value in the Process Attendance After field and upto the DateTime Value in the Last Synch of Checkin field.
If I do manage to make it work, I will put out a crisp document about how I managed to make it work, so you wouldn’t have to keep answering questions around this. So, please help.
Is there anyway to make this work (Employee Checkin to attendance) automatically without having to press any Mark Auto Attendance Button? Or having to change the value in Last Synch of Checkin field?
The first step would be configuring Shift type. Setup the details and enable auto attendance. There is another section which shows on clicking auto attendance check.
Configure those rules. Employee check-ins/outs are only considered during the shift times entered here.
The Last Sync of Checkin field basically means that the Employee checkin data before the datetime set here would be taken into account for marking attendance. This is a validation so that the system does not mark anyone absent for a future data. I still feel it is not aptly named.
I would suggest adding a backend job which sets it’s value to end of day everyday instead of having to manually change it.
Process Attendance After field needs to be set only once. This is basically the date after which we want the system to start marking auto attendance.
The next step would be assigning Shift to employees. (Shift Assignment doctype)
Above all was part of setting up. Now starts the process.
You can start creating checkin and checkout records in Employee Checkin doctype.
There is a backend job running at the end of the day to mark auto attendance. It will check the shift type which has auto attendance enabled, calculate start and end times based on the rules.
Then it will get the employee checkins for that shift, mark their attendance and working hours.
The Employee checkin doctype can be used with Biometric device, mobile app with API or manually created.
Thanks for your post. This makes it easier to see where I have been going wrong.
Yep. That enhancement will just make it easy for users. However, I can see the logic as to why Last Synch of Checkin is important. If an organization uses Biometric Devices the data from the Biometric device is synched periodically, so you don’t want to mark attendance for people, even if it is only marking attendance in the past, when the synch job has not been run yet.
I think a Toggle that goes: Check Ins are generated by: 1. A Synch Job, 2. Users mark their Checkins on ERPNext (or words to that effect), would make it easy to build this enhancement in.
If 1. A Synch Job, the current approach is perfect.
If 2. then a job that runs at the end of the day would be perfect.
Maybe we have to factor a slightly different approach for organizations that run on 3 shifts, but that’s perhaps a slightly bigger enhancement (if a Shift begins at 10PM and goes on till 6AM, is that attendance marked for the day of the shift start? or for the day of shift end?
I mean that’s the amazing thing of building a system for a large audience. What seems like fairly simple and straight forward, actually has nuances that makes it interesting, to say the least.
So I checked this.
It actually runs every hour and compares the shift actual end time (Shift end time + Allow check-out after shift end time) with the Last sync of Checkin time.
If it’s less than last sync of checkin time, it will process the attendance for that shift.
Last sync of checkin value is incorrect. Please see above for the explanation again.
Out of all the employee checkins, only last 2 are will be considered by the system. As the IN and OUT are reversed with the time.
@Kartik, thanks for your response. Since these people were working in night shifts so In time of prev date was paired with Out time of next morning. Will that be not considered because it doesn’t fall in shift start and end time?
For
I followed this:
Since I was trying for their July attendance, we wanted system to consider checkin data before 31st July. Any mistake in understanding?
It should be 6 June 2022 17:00.
If you are allowing a buffer time of let’s say 10 mins to let people checkout, then you should keep the time as 17:10 because any checkin after 17:10 will not be considered for marking attendance.
I may be misunderstanding. For example, if Last Sync is 1 January 2023 17:00, then only the attendance prior to that time/date will be processed, correct?
Is this something that needs to be changed daily?
I have yet to be able to get auto-attendance to work. I have all the prerequisite settings correct with shift assignments, etc.