Write a Fast Formula for Leave Encashment

You can write your own custom logic in the fast formula to calculate the leave encashment amount.

You can either write your own custom logic in the fast formula to calculate the leave encashment amount 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_LEAVE_ENCASHMENT_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 Leave Encashment Amount, Leave Encashment Annual Allotted Leave Days, Total Leaves Availed, Completed Years of Service and Last Ten Months Salary for Leave Encashment.

/******************************************************************************
 $Header: 
 * Formula Name:  XXCUST_INDIA_LEAVE_ENCASHMENT_CALCULATION_FF
 * Description:  Custom Leave Encashment Calculation Formula for India Localization
 ***********************************************************************************************/

/* The formula should have the below return values. 

l_leave_encash_amount_payable
l_annual_leave
l_utilized_leave
l_service_years
l_last_10mnth
*/

l_leave_encash_amount_payable = 0
l_annual_leave= 0
l_utilized_leave = 0
l_service_years = 0
l_last_10mnth = 0

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

l_leave_encash_amount_payable = 376750
l_annual_leave = 35
l_utilized_leave=200
l_service_years = 15
l_last_10mnth = 330000


/*Custom logic End*/

return  /* Use the below return variables*/
       l_leave_encash_amount_payable, 
	   l_annual_leave,
       l_utilized_leave,
	   l_service_years,
	   l_last_10mnth