Write a Fast Formula for Retrenchment Compensation

You can write your own custom logic in the fast formula to calculate the retrenchment compensation benefit.

You can either write your own custom logic in the fast formula to calculate the retrenchment benefit or enter the amount directly in the seeded element to override the amount calculated by the seeded element.

  1. Navigate to: Payroll > Fast Formulas.
  2. Click Create and enter the formula name: XXCUST_INDIA_RETRENCHMENT_AMOUNT_CALCULATION_FF
  3. Enter the Type: Oracle Payroll
  4. Enter additional details like Description, Legislative Data Group, Effective Start Date, and click Continue.
  5. Write the formula text in the Formula Text editor that opens.
  6. Click Submit.
  7. Compile the formula and verify that there are no errors.

Results:

The formula returns the values for Retrenchment Compensation Amount, Completed Years of Service and Last Three Months Average Salary.

Here's the fast formula for retrenchment amount calculation where you add your custom logic.

/******************************************************************************
 $Header: 
 * Formula Name:  XXCUST_INDIA_RETRENCHMENT_AMOUNT_CALCULATION_FF
 ***********************************************************************************************/
 
/* The formula should have the below three return values. 
l_ret_comp_amount_payable -- This is the Retrenchment Amount Payable
l_ret_comp_srv_yrs        -- Completed years of service.
l_ret_comp_avg_sal        -- Average Salary for the last three months.
Return -1, if any value is not overriden.
*/

l_ret_comp_amount_payable = -1
l_ret_comp_srv_yrs= -1
l_ret_comp_avg_sal = -1

/* Begin Custom logic - Add your custom logic here to set the values to the variables provided*/

l_ret_comp_amount_payable = 400000
l_ret_comp_srv_yrs = 10
l_ret_comp_avg_sal = 93333

/*Custom logic End*/

 return  /* Use the below return variables*/
       l_ret_comp_amount_payable, 
	   l_ret_comp_srv_yrs,
       l_ret_comp_avg_sal