Defined Names for Earning Formula

Hello,

I am trying to program earning formulas in salary structure, but all the form names I use are ‘undefined’, for instance:

Name error: name ‘total_hours’ is not defined

Does anyone have a list of what are ‘defined’ names that are acceptable to the earning formula?

How does the formula key or link to defined names?

Thanks!!
Steve

Hello,

To define the formula, you should first know the abbreviation of other salary components. If you want to define formula based on Base salary, then just define it as:

base * .50

If you want to define formula based on the value of Basic salary, then first check the abbreviation of Basic Salary component. Let’s assume it is “bs”, then formula would be:

bs * 2

For more help, you can also refer to: https://frappe.github.io/erpnext/user/manual/en/human-resources/salary-and-payroll