Payroll Overtime

I have been searching for weeks i feel on 1. how to do payroll in this system like a step by step for hourly employees 2. how to calculate overtime as a deduction. My employees all have different hourly rates and all work over time and we don’t use time sheets just a weekly number that is tracked by our branches and given to the main office to base pay on. Is there a way to not use a daily time sheet and just add a total hours worked that I can then calculate Over Time off of?


You can do the payroll & overtime with the little customization for hourly employees.


  1. Create three custom fields on Employee Master - Hourly Rate, Worked Hours, Overtime Hours.

  2. Use this three fields in the Salary Structure in Formula to calculate Salary.

  3. For Weekly/Monthly Salary, Import Worked Hours and Overtime Hours via Excel sheet before salary processing.

  4. After data import calculate salary and generate payslips.

1 Like

Thank you I will try this out today but if i could get a few questions answered.

  1. When you say add fields you mean to the Salary Component page correct?
  2. How would I calculate this and then have a OT formulas as well
  3. How do i import the hours and where in payroll?
  4. how do i calculate this after imported?
    Sorry i am a total novice to the ERPNext and to HRMS as well.

We have created a custom doctype to Calculate Overtime to Approve and then Submit. And Linked it with Additional Salary. Overtime Calculation is based on Multiple Factors so not easy to handle in the salary structure.

could you give me an example of what that doc type would look like? This feels like it should be something simple to do but its very complex in this system

Doctype looks like this. On Submit we create Additional Salary.
Because sometimes Employees are coming on Holidays and you have to give them different hour rate instead of normal. It was tricky in Salary Structure Formula Field

Ok that might work for us but for each of our employees nearly all have varying hours in which OT will be varying as well. So would i put all of the employees that have the same base hourly pay on a doc sheet?

No, Add custom fields on Employee Master, like Hours 30, Hours 60 and Sunday Hours in below screenshot:

For Calculation of Overtime Create Salary Components with formulas and add them in salary structure:

For Importing Hours, you can use the Standard Data Import Tool:

In Download Template, Select ID and Custom Fields for overtime:

Fill the Excel file with the required details and import it before payroll processing.

Follow the standard Payroll calculation Steps via Payroll Entry.

is the employee master a doc type that you made? I am not finding that particular field to click

You need to add that custom fields in the “Employee” Doctype with customize Form.

i used timesheet ,
and featch the hourly rate from activity type .
this way works fine with erpnext without a lot of customization

I am just looking for the simplest and quickest way to do this. Could you let me know how you set yours up to get this accomplished?

@Tara_Byers did you try to make a salary slip and add a timesheet for the employee ?
give it a shoot, when you do salary structure allow timesheet too.
I will come back to this post and replay with images and give a detailed answer.
sorry for the delay in answer

Yeah i’ve done that and i still cannot get Over time to work. you mentioned that you use activity type to get your over time?