I wanted to add a travel allowance amount to some employees’ pay. I couldn’t find any information in the documentation on how to add a new variable - it only talked about ‘base’ and ‘variable’.
But any field in the Employee doc type can be referenced. So adding a custom field to the Employee doc type is one way to do it. Try:
- DocType > Employee > Custom Field +
- Add a new field with the label ‘Travel Allowance’
- This should create a field with the name ‘travel_allowance’
- Use this field name in the Salary Structure formula.
A better location to add the field is probably to the ‘Salary Structure Assignment’ document. This will keep the new field with the ‘base’ and ‘variable’ fields.