Advanced Calculations

The advanced Calculations feature is useful if you have complex payroll calculations. You can add JavaScript functions to your payroll columns to do the calculation for you.

For this example, we will create a simple JavaScript function that deducts 10% of your basic salary, if your basic salary is greater than 100,000. (Note that in these payroll examples, the currency we have used is LKR)

Since we need the basic salary for this calculation, I have added it as a variable in this column.

The JavaScript function used in the above payroll column:

function taxCalculation(salary){
	if(salary >100000){
    	return salary*0.1;
    }else{
    	return 0;
    }
}

taxCalculation(salary);

Now you can use this payroll column in your payroll reports.

Powered by BetterDocs