Try ERPNext Buy Support Partners Foundation

Formula for Salary Structure

how to give conditon or formula for the following data:
if base <= 2000 calculate base * 0.08
if base >2000 and base <= 3500 calculate base * 0.11
else base >3500 calculate base* 0.15

condition: base <=2000
formula: base * 0.08
condition: base >2000 and base <= 3500
formula: base * 0.11
condition: base >3500
formula: base * 0.15

how can i make codition in only one salary structure

  • Create a Salary Component for your component
  • check amount_based_on_formula
  • set the formula as below
  • use the component in your salary structure.
    e.g.
0 if gross_pay < 6000 else 80 if gross_pay < 9000 else 150 if gross_pay < 12000 else 200
base*0.08 if base <= 2000 else base*0.11 if base <= 3500 else base*0.15
3 Likes

Thank you, worked perfectly.