[Solved] How to add a custom field to be used in a Salary formula

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:

  1. DocType > Employee > Custom Field +
  2. Add a new field with the label ‘Travel Allowance’
  3. This should create a field with the name ‘travel_allowance’
  4. 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.