Balance Percentage Allowance Element Formula Changes

Using the Fast Formulas task, replace the text in the existing earnings element formula with the text shown below and recompile the formula.

Note: The sample formula shown here calculates the seniority allowance using the SALAIRE_DE_BASE balance. This balance holds the value for this assignment and run.

Replace SALAIRE_DE_BASE text with the name of the balance that your allowance uses.

/*****************************************************************************
FORMULA NAME: PRIME_ANCIENNETE_EARN
FORMULA TYPE: Payroll
DESCRIPTION: 
This is an example formula for calculating the amount of a percentage based
seniority allowance. 
It retrieves the percentage based on the range values held in the corresponding
value definition and then multiplies this percentage by the specified 
earning balance.
Formula Results:
 l_value               Value of the seniority allowance. 
 l_rate             Value of the percentage used for the calculation.

*******************************************************************************/
DEFAULT FOR ORA_HRX_FR_SENIORITY_IN_YEARS    is 0
DEFAULT FOR SALAIRE_DE_BASE_ASG_RUN is 0
l_seniority = ORA_HRX_FR_SENIORITY_IN_YEARS
l_rate=0 
  change_contexts(PART_NAME = 'ORA_RATE_AMOUNT')
   ( 
    SET_INPUT('BASE',l_seniority )
  EXECUTE('CALL_CALC_VALUE')

  l_rate = GET_OUTPUT('DED_AMOUNT',0)
     ) 
 l_log = PAY_INTERNAL_LOG_WRITE('(l_rate : '||TO_CHAR(l_rate))
l_monthly_earnings = SALAIRE_DE_BASE_ASG_RUN
l_seniority_allowance = (l_monthly_earnings) * l_rate
l_log = PAY_INTERNAL_LOG_WRITE(' l_seniority_allowance_dbi : '||TO_CHAR(l_seniority_allowance ))
l_value = l_seniority_allowance
return l_value,l_rate
/* End Formula Text */