I want to add Custom field "Overtime" and need to use it along with other salary components formula

I was trying to setup Payroll Salary structure.
I need to add one more field “Overtime” and should be able to use its value in Salary Component.

I’ve to add new Salary component Incentives which should be calculated as (wage/6) * overtime
For accepting Overtime value, I’ve added a new custom field over_time (field name) and tried to fetch its data into the salary component Incentives by giving formula as base/6 * over_time

But it is not working. Please tell anybody how i can achieve this ??

Welcome to ERPNext!

Please share details and pointers, the more the better for all to comment and learn.

That’s the community contribution deal here thanks :wink:

Overtime is automatically calculated

In payroll Settings: Calculate Payroll Working Days Based On: Attendance
And make sure this ‘Include holidays in Total no. of Working Days’ is unchecked.
(Mark attendance for an employee in days he has worked)

So, if on Sundays or holidays, an employee is present on his salary slip he will have overtime
The Monthly basic salary is 15,000 INR for 26 days(Sunday not included) if he has worked for 1 Sunday, his basic salary would be showing 15,577 INR (15,000/26 = 576.9, Basic 15,000 + 576.9 => 1 day overtime)