The conditions& Formula section in Salary Structure allows us to create dynamic salary components. The example shows that we can use the following fields in the components -
- Other components (denoted by abbreviation)
- Employee fields (field_name)
Is it possible to use the fields from the salary slip itself? Employee fields are good for conditions, but formula needs more data from the current salary slip.
Has anyone succeeded in using salary slip docifelds in formula?
What fields do you need from Salary Slip?
I need working_days, payment_days, lwp, no of days in the month etc for calculating some of the components.
Those fields seems valid. Can you please raise a github issue for the same on https://github.com/frappe/erpnext/issues
@KanchanChauhan When I try to use a field from employee doctype, it works. Is there a differnt syntax to access salary slip docfields?
Employee doctype is mapped but other fields are not. You have raised the issue, we will fix it.
Can Timesheet and Timesheet Detail fields (i.e. total_hours) also be mapped to the earning formula. This would be extremely helpful for calculating overtime for hourly (punch-in/punch-out) workers.
Actually we need total_hours to be mapped and we also need to not filling the component that is related to the overtime so we can depend on the overtime that is calculated based on formula.