Overtime Calculation from Employee CheckIn doctype

I want to calculate the overtime daily from employee check-in and check-out, I also wish to keep a record of working hours on holiday.
anyone help me how will it be possible?

Do you get any solution for this ?

I have calculated overtime through custom script

could you post that script and where we need to made the changes it will be helpfull for me to close it .

you need to customized at server script On Attendance Doctype.

could you share the script?

if new_in_time and new_out_time:

    Tot_dur = frappe.utils.time_diff(new_out_time, new_in_time)
    if Tot_dur > shift_Hour:
         OT = frappe.utils.time_diff(Tot_dur, shift_Hour)
         OT_formatted = frappe.utils.format_time(OT,'H.m')

You can do this by writing server script on attendance doctype, here I have calculated total hours based on the in and out time of employee. later I have calculated shift hour based on the start and end time specified in shift type doctype, then calculated Overtime

1 Like

Thank you @Jignasa_Chavda