Modify Fast Formulas
You need to feed the element illness Benefit and illness Benefit Retro to the balance type Illness Benefit Offset.
To edit the formulas, here's what to do:
Navigation:
- Feed the element illness Benefit and illness Benefit Retro to the balance type Illness Benefit Offset.
- Edit the related OSP ENTITLEMENT_RESULT formula as shown
here:
IF (Absence_Payment_Code = 'ORA_HRX_IE_SICK_OP') AND (factor > 0) THEN ( L_PROCESS_DATE = '0001/01/01 00:00:00' (date) l_dir_card_id = dir_card_id l_dir_comp_id = dir_comp_id l_asg_id = ASG_HR_ASG_ID l_cb_id = GET_CONTEXT(CALC_BREAKDOWN_ID,1) CHANGE_CONTEXTS(DEDUCTION_CARD_ID = dir_card_id , DIR_CARD_COMP_ID = dir_comp_id) ( L_PROCESS_DATE = PAY_DIR_COMP_MIN_START_DATE l_log = PAY_INTERNAL_LOG_WRITE('[DPKB_IE_OSP_010425_ENTITLEMENT_RESULT] - L_PROCESS_DATE OUTPUT : '|| to_char(L_PROCESS_DATE)) ) IF WSA_EXISTS('WSA:'||'ORA_HRX_IE_IB_DAILY_PER_RATE_FOR_OSP'||'_'|| to_char(l_asg_id)||'_'|| to_char(l_cb_id)||'_'|| to_char(L_PROCESS_DATE),'NUMBER') THEN ( l_ORA_HRX_IE_IB_DAILY_PER_RATE = WSA_GET('WSA:'||'ORA_HRX_IE_IB_DAILY_PER_RATE_FOR_OSP'||'_'|| to_char(l_asg_id)||'_'||to_char(l_cb_id)||'_'||to_char(L_PROCESS_DATE),0) l_log = PAY_INTERNAL_LOG_WRITE('[DPKB_IE_OSP_010425_ENTITLEMENT_RESULT] - l_ORA_HRX_IE_IB_DAILY_PER_RATE OUTPUT : '|| to_char(l_ORA_HRX_IE_IB_DAILY_PER_RATE)) l_log = PAY_INTERNAL_LOG_WRITE('[DPKB_IE_OSP_010425_ENTITLEMENT_RESULT] - Before pay_value OUTPUT : '|| to_char(pay_value)) pay_value = pay_value - l_ORA_HRX_IE_IB_DAILY_PER_RATE l_log = PAY_INTERNAL_LOG_WRITE('[DPKB_IE_OSP_010425_ENTITLEMENT_RESULT] - After pay_value OUTPUT : '|| to_char(pay_value)) ) IF pay_value = 0 THEN ( unit = 0 ) )
Note: You can use this sample if the plan is to reduce the occupational sickness plan payment by the illness benefit that has been already paid. - Create an OSP plan and link it to the OSP element.Note: Ensure the OSP plan has a lower processing priority (higher number) than the SSP plan in the absence type element.
- Edit the GLB_EARN_PRORATION formula as shown here:
/* ** Custom Code */ L_START=prorate_start L_LOOP_START=prorate_start L_END=prorate_end l_asg_id = ASG_HR_ASG_ID l_cb_id = GET_CONTEXT(CALC_BREAKDOWN_ID,1) L_ib_DAYS = DAYS_BETWEEN(trunc(L_END),trunc(L_START)) +1 l_ib_daily_rate = 0 l_log = PAY_INTERNAL_LOG_WRITE('(DPKBGLBPRT) l_asg_id '||to_char(l_asg_id) ) l_log = PAY_INTERNAL_LOG_WRITE('(DPKBGLBPRT) L_ib_DAYS '||to_char(L_ib_DAYS) ) l_log = PAY_INTERNAL_LOG_WRITE('(DPKBGLBPRT) l_prorate_start '||to_char(l_prorate_start) ) l_log = PAY_INTERNAL_LOG_WRITE('(DPKBGLBPRT) l_prorate_end '||to_char(l_prorate_end) ) WHILE L_LOOP_START <= L_END LOOP ( l_ib_daily_rate = l_value l_ib_daily_rate = l_value/L_ib_DAYS l_ib_daily_rate = trunc(l_ib_daily_rate + 0.005, 2) WSA_SET('WSA:'||'ORA_HRX_IE_IB_DAILY_PER_RATE_FOR_OSP'||'_'||to_char(l_asg_id)||'_'||to_char(l_cb_id)||'_'||to_char(L_LOOP_START),l_ib_daily_rate) L_LOOP_START = ADD_DAYS(L_LOOP_START,1) l_log = PAY_INTERNAL_LOG_WRITE('(DPKBGLBPRT) L_LOOP_START : ' +to_char(L_LOOP_START )) l_log = PAY_INTERNAL_LOG_WRITE('(DPKBGLBPRT) l_ib_daily_rate '||to_char(l_ib_daily_rate) ) )
- Create Direct Payment Element of type: Recurring.
Note:
- This element is used for capturing payments for illness benefit. Also the processing priority (higher number) of this element must be higher than the absence elements. Change the default Proration Formula to the one created above.
- Make sure you enter values like this, for example:
- Enter Daily Amount and set the Periodicity to Daily.
- Also end date the element so that the effective start date and the effective end date of the element matches the period for which the illness benefit is being paid.