[Proposal] Overtime Feature

How is this design taking care of logic where multiplier for over-time would vary for the same Employee, based on a weekday (1.25%), weekend (1.5%) or public holiday (2%)?

I Will request the community to validate if this use-case is valid and pretty frequent. Or it’s flat multiplier can be defined on destination/grade level?

3 Likes

Even though each grade level may have flat multiplier, the multiplier still varies per week day, weekend and holiday within same grade level.So let this be factored in the design.

2 Likes

I have required Feature of Workflow Based on Attendance (Automated)
It should configurable of Lunch hours i.e excluded or included based on shift allocated.

  • There should be a Lunch Hours Excluded or include while counting Overtime with auto attendance feature.
  • In default shift setting Lunch Hours setting should required.

@Fred1 Will cover this use-case too…

@Pritesh_Patel, The shift time is defined in DocType Shift Type. So, The Overtime hours will be calculated and will be compensated to employees for hours worked beyond their standard schedule(shift timing) excluding lunch hours. Will provide a different setting or option to cover this use case too.

We had a requirement once which defined OT to be paid only for the work hours on week off and holidays. The rate was decided based on No. of hours of OT i.e, half-day rate & full-day rate irrespective of an employee grade.

Location Based allowance was also required. Like On-Site and Off-Site location based timesheet entries.

1 Like

If we give provision based on working, weekoff and day in Holiday list, then it this use-case will be taken care I guess. You can keep OT multiplier on working day to zero. For for other multiplier, we already have a feature of Timesheet wise salary component… If there is another edge case, then I believe Additional Salary Component can be used.

@winter_wolf since this feature revolves mostly around hours etc. Perhaps it will be better it’s tracked in attendance, where we can update total hours worked (synced from Employee Checkin) or manually update. And then, we can take a sum of Attendance of that Employee for a month in Salary Component.

There could also be an intermediate document which calculates over-time based on the different multiplier for each Employee, and then Additional Salary is created for from there for OT.

Cc: @nabin @pateljannat

4 Likes

In addition to overtime after a number of hours in a day which your proposal already covers, there needs to be a provision to cover overtime due to the number of hours worked in a week. In the US we are required to pay overtime after a given number of non-overtime hours in a week, and care must be taken that overtime is not double counted by the two conditions, i.e. there is no “pyramid,” or piling premium compensation on top of premium compensation.

The most common US overtime rules are:

  • 1.5x after 8 hours in a day

  • 2x after 12 hours in a day

    and

  • 1.5x after 40 regular, non-overtime hours in a week

    and

  • 1.5x on the 7th working day in a week

With the weekly overtime, only standard hours are counted, those that have been paid at the daily overtime or double time are not allowed to do ‘double duty’ and create weekly overtime. As an example imagine a person who works four 10 hour days (8 regular hours, 2 OT hours), and then comes in for a regular 8 hour shift. Although more than 40 total hours have elapsed in the week, some were already paid at the OT rate and so the entire 8 hour shift is regular time.

2 Likes

One more point for workflow based on attendance (Automated)
Implementation of buffer time before and after duty can configurable in shift.

For example according to my company’s rules the reporting time is 8 a.m. but if the person checks in 15 minutes early to his reporting (considering 15 mins as buffer), then that should not be counted towards his overtime, while calculating his working hours, start time is still kept at 8 a.m. regardless of his check in time. Although if he checks earlier than buffer time, for example at 7:30 am, he gets Overtime from check in till his reporting, i.e. the full half hour and NOT only 15 mins. The same goes for or the end time for example, if I keep a buffer of 30 minutes after the shift ends and if the shift ends at 6:00 p.m. then the person checking out at 6:30 would still be counted in his working shift. however if the person lives at 6:31 pm then the full over time after the duty time, which is 6 p.m., should be counted hence the overtime becomes 31 minutes.

Example : SHIFT SETUP - For Over Time

Shift Type - GEN

Shift Start Time - 8:00 | Lunch Start Time - 13:00

Shift End Time- 16:30 | Lunch Duration - 00:30

Shift Hours- 8:00 | Lunch End time - 13:30

Overtime Start Before Shift time = 00:30

Overtime Start After Shift time = 00:30

Overtime Deduction- If Late Entry then shift time & If Early Left then shift time

For Example :

Overtime = Working hours - shift hours

Lunch hours should not be count in shift hours or It may be optional based on company policy

Overtime can start after shift end time hours can be configurable

Overtime can start before shift start time hours can be configurable

Total working hours should not be more then 24 hours a day

Maximum allowed over time can configurable

Hi,

im quite interesting on this…

in my country the overtime will need to be able to calculate :

  1. the break time should not be calculated
  2. there is different rates for , first 2 hour on working days is 150% , and the rest of it is 200% for that day… and for weekend / holiday it is 200% hourly

so i think we need day by day overtime , to be able to clasified it…maybe we can make 2 columns for categorizing this… so in salary slip the number of hours will be on 2 different variable

1 Like

Generic Feature requirement:

  1. Good to capture the per day overtime in Attendance DocType.
  2. Working hours calculation in Attendance DocType can also be verified. Consider a scenario an employee creates a Attendance doc type and multipel IN and OUT with Employee Checkin. The working works (Attendance Doc Type) calculation from Multiple CheckIN and CheckOut in associated Employee CheckIN doctype can also be linked.
  3. Minimum work hour per day for attendance should also be applicable on Daily basis

UAE perspective request the following usecase to be considered:
In the SME sector the calculation of the overtime is on a per day basis as an employee in a production setup can work 12 hours a day and come an one or two late the next day (because of which the work hours the next days is less than the required work hours) .
In such scenario the attendance approval will be at the level of HR managers

Working Hours and OT in brief should be calculated on Daily , Weekly or Monthly Basic.
Because there might be scenario where employees will be eligible for daily OT but not weekly or monthly OT.

Please contact hello@3qspace.io for any pre production validation and test support.

I would like to share my experience with overtime which I worked on a while back.

  1. I used designation to determine whether the employee is eligible for overtime, and I added a default working hours in the company profile.

  2. From the biometric device employee checkin was being populated, while generating Auto Attendance based on the employee shift, if the employees working hours are above the default total working hours and is eligible for overtime, in the attendance document it would flag the attendance with ‘has overtime’ and a field to capture overtime in hours. I also added a provision to enter overtime in hours manually (allow on submit, only allowed for HR) incase there was any discrepancies with system data and foreman/supervisors data

  3. While Payroll Entry was prepared for the company, it would compute the total overtime hours from the attendance for each respective employee and create additional salaries for the employee who have attendances with overtime.

The Challenges I faced:

  • Since lunch break option is not available in erpnext. I had configured the shift type with determine checkin and checkout alternating entries as in and out during the same shift and working hours calculation is based on every valid check-in and check-out and added two more fields in attendance to capture the 2nd and 3rd checkin of the day (in an ideal scenario there should be 4 employee checkin for any given day which includes one lunch break in between) so that it is possible to view all the 4 timestamps from employee checkins in the attendance document.

  • Calculating overtime on weekends, I could have used timesheets, but I had to create a salary structure for each employee seemed too cumbersome as per hour rate was different for each employee, so I decided to base it on employee checkin from the biometric device, had to add a custom app to run a custom logic to avoid altering the core erpnext code.

  • The biometric device was very basic had issues with sensitivity, so instead of 4 employee checkin for the day there would be more (not too many but enough to mess up everything). There were entries which were less than 4 secs apart so had to add a provision to flag skip attendance on employee checkin data from the same employee under x seconds which could be configured.

Based on what is discussed above

Workflow Based on Timesheet(Manually):

  • For this there should be a default shift in Employee Master or there should be a shift assignment document for Employee.
  • The employee will fill their timesheet and get it approved by Hr manager for overtime pay calculation.
  • After proper Approval of Hr manager, During the Payroll all Timesheet will be fetched in salary slip and overtime hours will be calculated accordingly.

Probably add a provision to add a interim approver like Foreman / Supervisor / Accounts to validate the timesheets

Workflow Based on Attendance(Automated):

  • Default shift or shift Assignment should be there.
  • There is Auto Attendance feature already present in ERPNext. which automatically creates attendance based on employee check-ins(Fetched from biometric devices) and shift type.
  • Based on entry and exit time of employee in Attendance Document the overtime hours and overtime pay will be calculated during payroll and will be reflected in the Earnings table.

currently if the employee works on a weekend based on the set default holiday list in the employee profile, the employee checkins are ignored as it is a holiday. Attendance needs to marked manually but that does not trigger the calculation of working hours. It would be nice if this could be configurable

Additionally, an option to view overtime hours in salary slip, like leave balance in v13.

This might go beyond the scope of overtime, but since there is work being done on compensating an employee on working extra hours, maybe build functions in a manner it could also be used to penalize employees who do not clock the total working hours in a day :grin:

2 Likes

The Working Hours calculation in the Attendance DocType is based on the Shift List Doctype

Presently if multiple Check IN and CheckOUTs are associated with a Attendance DocType and on Submit of teh Attendance doctype the working hours is not updated.

We should decouple Shift and working hours calculation.
Working Hours also can be based on the associated CheckIN and CheckOUT (Probably we can enable a CHECK option to pick working hours from Employee CheckIN even if Shift is not selected)

This will help in non shift OT calculation

Hi , Can you pls help me with support engineer with nominal consultancy /coach fee.Aswe have already installed and testing stage . We need consultancy for our business structure of 14 branches in two states . Karnataka 10 branch and Telangana - 4 branches . With two different GST numbers .
Thanking you
Nagaraja
nagaraj@ranna.in

On the basis of above discussion, we are working on a new design and workflow. We will update on this thread after finalising the design.

1 Like

hiii @winter_wolf did you design workflow,
how to calculate overtime
if you did it
please share work flow here .
Thank you ,

Kindly, I would like to know when this update will be completed?

2 Likes

Can we calculate overtime a specific amount at certain times of the day and another amount at other times of the day، like overtime at night its different from morning can you Automated to calculate overtime like that its important to many factory

Hi,

I hope I am not too late on this thread.

I think overtime is one of the most misused and abused processes most organizations find among their workforce.

With the attendant cost and regulatory compliance implications, I think it becomes very important to have a clear process to justify and authorize overtime work. Usually the person to authorize overtime is the person’s supervisor. It usually may require another level of approval. The number of overtime hours that are authorized and the number of overtime hours that are worked needs to be clearly captured for each employee for a given day/shift.

The overtime hours worked are for a specific outcome, so even after authorization, there is another level of scrutiny to ensure that the desired outcomes were achieved. For instance A Worker (let’s call him John) is required to churn out 100 Pieces of ItemX, for which he’s approved 2 hours of overtime.

Based on this, John gets to work, but is only able to produce 80 pieces in the 2 hours of overtime. Now the organization has to decide whether to extend John’s overtime or to pay him less. So it means another approval for overtime extension. And after John puts in his claim, there is another authorization to say that the required outcomes of the overtime work was achieved and John can be paid his overtime pay. Or make changes to what he’s paid. Now, how much of all of this is allowed in the regulatory framework that the organization operates in is something that will depend from country to country. Or even from situation to situation.

I think it’s perhaps best to keep this simple and provide a way to capture overtime pay, that a shift supervisor submits on behalf of her/his workers and this is done with a certain amount of validation based on Attendance Time/date stamp and number of hours worked, etc.

Hope this helps.

Thanks

Jay