Hi i wrote an api for insert Employee checkin

http://localhost:8000/api/method/hrms.hr.doctype.employee_checkin.api.AddCheckInStatus?data={“enrollid”:307,“name”:“AMAL R”,“time”:“2024-05-16 09:30:07”,“mode”:8,“inout”:0,“event”:1}
i have passed time as 09:30:07 but the inserted time is the current time

@amal_31845 There is an api to insert employee checkins ,
hrms.hr.doctype.employee_checkin.employee_checkin.add_log_based_on_employee_field. this function takes 2 mandatory fields : employee_field_value and timestamp where employee_field_value is by default the attendance_device_id
if you want to use the employee name add a field called employee_fieldname=“name” and set the employee name in employee_field_value . log value is called log_type

1 Like

what about logtype? @bahaou

@amal_31845 check the function on github .

what happens when a correct log entry not occurred
eg: in- but forget to out do that mark as absent

@amal_31845 that depends on your shift settings . the function will insert the checkin log . auto attendance will be automatically set depending on how you configure your attendance settings.

After a successful in-out when it converted to the attendance if i enabled auto attendance in shift type @bahaou

@amal_31845 I believe it works every hour . and you have to change last sync date in the shift to when you last entered checkins

Do i need to change it manually everyday

@amal_31845 no . change it now then execute the function shift_type.process_auto_attendance_for_all_shifts in Scheduled Job Type and see if any attendance were created , (the function runs every hour but you can click execute to run it manually for testing)

1 Like

Thank you Brother @bahaou


i have made 4 entries in a day after then i made auto mark Attendance
then it was marked like this why?

dont know why the date changed to 14