ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

How can i write nested if conditions in salary component formula?

salary
payroll

#1

How can i write this given below logic in to a salary component ?

if ( base < 1000 )
{
 	if (total > 11719)
	    basic & vda = 11719
    else
        basic &vda = total 
}
else
{
	 if(11719 > total * 40%)
         basic & vda = 11719
     else
         basic & vda = total * 40%
}

#2

Please explain in more detail. What is total, basic & vda etc?