I wanted to know what is the purpose of last_sync_of_checkin field. Read the documentation also but not able to fully understand it’s purpose.
If anyone could help and shed some light on this.
Thanks.
This field means the date and time will be updated whenever the data from the device is synced. Let’s say if the data is synced every 5 hours, then the updated time and date will reflect here
No you do not have to do it manually everyday, the field should be updated on its own when the device is synced. Currently, the logs are getting synced but the field id not updated. Looks like a small fix.
@kartik, This field has to be updated by the script/person(in case of manual entry) actually making the Employee Checkin Records. It is not possible to reliably determine if all the data has been synched from a biometric device to ERPNext from within ERPNext, especially in multi-device scenario (At least not without assuming stuff).
Hence, you wouldn’t find any reference to code updating this field in ERPNext code base.
How are you currently updating the Employee Checkin records?
In case you are using this script, it now updates this field for you after the sync is complete. All you have to do is setup the 'shift_type_device_mapping' in the config.
PS:
On second thought, it should be possible to update this field from within ERPNext by assuming only minimal stuff, if ‘shift-device-mapping’ is provided… … we can probably add this function to ERPNext with minimal changes and get this working… But, adding this feature within ERPNext comes with a few minor drawbacks which should be a non-issue for most scenarios.
I am using a mobile app to update employee checkin.
From my understanding by testing, attendance is marked for the dates before that datetime set in this field.
Is this the intended flow? I am having difficulty understanding the reasoning behind this.
Here is the reasoning behind this:
Since, ERPNext is completely unaware of the system that pushes the Employee Checkin, It is not possible to determine if there is ‘Nothing to sync’(meaning the employee was absent) (or) it is ‘yet to sync’(meaning syncing is delayed due to some reason)… In the latter scenario, if we assume that the syncing has happened and mark the attendance as absent for an employee, wouldn’t that be undesirable?