3183: --Added following if statement to support Addtional Holidays
3184: IF p_type IS NULL OR p_type <> 'ADD' THEN
3185: hr_utility.set_location('Enrolled in Plan ' || l_proc,20);
3186: --
3187: l_ret := per_formula_functions.set_text('CREATE_ALL', p_create_all);
3188: l_ret := per_formula_functions.set_text('REPROCESS_ALL', p_reprocess_whole_period);
3189: l_ret := per_formula_functions.set_text('FR_PAYSLIP_PROCESS', p_payslip_process);
3190: l_ret := per_formula_functions.set_date('PROCESS_DATE', p_calculation_date);
3191:
3184: IF p_type IS NULL OR p_type <> 'ADD' THEN
3185: hr_utility.set_location('Enrolled in Plan ' || l_proc,20);
3186: --
3187: l_ret := per_formula_functions.set_text('CREATE_ALL', p_create_all);
3188: l_ret := per_formula_functions.set_text('REPROCESS_ALL', p_reprocess_whole_period);
3189: l_ret := per_formula_functions.set_text('FR_PAYSLIP_PROCESS', p_payslip_process);
3190: l_ret := per_formula_functions.set_date('PROCESS_DATE', p_calculation_date);
3191:
3192: FR_calculate_accrual(p_assignment_id => p_assignment_id,
3185: hr_utility.set_location('Enrolled in Plan ' || l_proc,20);
3186: --
3187: l_ret := per_formula_functions.set_text('CREATE_ALL', p_create_all);
3188: l_ret := per_formula_functions.set_text('REPROCESS_ALL', p_reprocess_whole_period);
3189: l_ret := per_formula_functions.set_text('FR_PAYSLIP_PROCESS', p_payslip_process);
3190: l_ret := per_formula_functions.set_date('PROCESS_DATE', p_calculation_date);
3191:
3192: FR_calculate_accrual(p_assignment_id => p_assignment_id,
3193: p_plan_id => p_plan_id,
3186: --
3187: l_ret := per_formula_functions.set_text('CREATE_ALL', p_create_all);
3188: l_ret := per_formula_functions.set_text('REPROCESS_ALL', p_reprocess_whole_period);
3189: l_ret := per_formula_functions.set_text('FR_PAYSLIP_PROCESS', p_payslip_process);
3190: l_ret := per_formula_functions.set_date('PROCESS_DATE', p_calculation_date);
3191:
3192: FR_calculate_accrual(p_assignment_id => p_assignment_id,
3193: p_plan_id => p_plan_id,
3194: p_payroll_id => p_payroll_id,
3209: );
3210: hr_utility.set_location('Step ' || l_proc,40);
3211:
3212: -- reset these variables
3213: l_ret := per_formula_functions.set_text('CREATE_ALL', ' ');
3214: l_ret := per_formula_functions.set_text('REPROCESS_ALL', ' ');
3215: l_ret := per_formula_functions.set_text('FR_PAYSLIP_PROCESS', ' ');
3216: --
3217: -- Set the return values of the out parameters
3210: hr_utility.set_location('Step ' || l_proc,40);
3211:
3212: -- reset these variables
3213: l_ret := per_formula_functions.set_text('CREATE_ALL', ' ');
3214: l_ret := per_formula_functions.set_text('REPROCESS_ALL', ' ');
3215: l_ret := per_formula_functions.set_text('FR_PAYSLIP_PROCESS', ' ');
3216: --
3217: -- Set the return values of the out parameters
3218: --
3211:
3212: -- reset these variables
3213: l_ret := per_formula_functions.set_text('CREATE_ALL', ' ');
3214: l_ret := per_formula_functions.set_text('REPROCESS_ALL', ' ');
3215: l_ret := per_formula_functions.set_text('FR_PAYSLIP_PROCESS', ' ');
3216: --
3217: -- Set the return values of the out parameters
3218: --
3219: p_start_date := l_effective_start_date;
3350: --
3351: -- Added Following line to support additional day requirements.bug#3030610
3352: IF p_type IS NULL OR p_type <> 'ADD' THEN
3353: --
3354: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_PROTECTED',0);
3355: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_SENIORITY',0);
3356: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_MOTHERS',0);
3357: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_CONVENTIONAL',0);
3358:
3351: -- Added Following line to support additional day requirements.bug#3030610
3352: IF p_type IS NULL OR p_type <> 'ADD' THEN
3353: --
3354: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_PROTECTED',0);
3355: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_SENIORITY',0);
3356: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_MOTHERS',0);
3357: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_CONVENTIONAL',0);
3358:
3359: hr_utility.set_location('Step ' || l_proc,20);
3352: IF p_type IS NULL OR p_type <> 'ADD' THEN
3353: --
3354: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_PROTECTED',0);
3355: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_SENIORITY',0);
3356: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_MOTHERS',0);
3357: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_CONVENTIONAL',0);
3358:
3359: hr_utility.set_location('Step ' || l_proc,20);
3360: --
3353: --
3354: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_PROTECTED',0);
3355: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_SENIORITY',0);
3356: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_MOTHERS',0);
3357: l_ret := per_formula_functions.set_number('TOTAL_ACCRUED_PTO_CONVENTIONAL',0);
3358:
3359: hr_utility.set_location('Step ' || l_proc,20);
3360: --
3361: l_inputs(1).name := 'ASSIGNMENT_ID';
3381: l_outputs(2).name := 'EFFECTIVE_START_DATE';
3382: l_outputs(3).name := 'EFFECTIVE_END_DATE';
3383: l_outputs(4).name := 'ACCRUAL_END_DATE';
3384:
3385: per_formula_functions.run_formula(p_formula_id => p_accrual_formula_id,
3386: p_calculation_date => p_calculation_date,
3387: p_inputs => l_inputs,
3388: p_outputs => l_outputs);
3389:
3391: p_total_accrued_pto := fnd_number.canonical_to_number(l_outputs(1).value);
3392: p_effective_start_date := fnd_date.canonical_to_date(l_outputs(2).value);
3393: p_effective_end_date := fnd_date.canonical_to_date(l_outputs(3).value);
3394: p_accrual_end_date := fnd_date.canonical_to_date(l_outputs(4).value);
3395: P_total_Accrued_protected := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_PROTECTED');
3396: P_total_Accrued_seniority := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_SENIORITY');
3397: P_total_Accrued_mothers := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_MOTHERS');
3398: P_total_Accrued_conventional := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_CONVENTIONAL');
3399: --
3392: p_effective_start_date := fnd_date.canonical_to_date(l_outputs(2).value);
3393: p_effective_end_date := fnd_date.canonical_to_date(l_outputs(3).value);
3394: p_accrual_end_date := fnd_date.canonical_to_date(l_outputs(4).value);
3395: P_total_Accrued_protected := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_PROTECTED');
3396: P_total_Accrued_seniority := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_SENIORITY');
3397: P_total_Accrued_mothers := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_MOTHERS');
3398: P_total_Accrued_conventional := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_CONVENTIONAL');
3399: --
3400: --
3393: p_effective_end_date := fnd_date.canonical_to_date(l_outputs(3).value);
3394: p_accrual_end_date := fnd_date.canonical_to_date(l_outputs(4).value);
3395: P_total_Accrued_protected := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_PROTECTED');
3396: P_total_Accrued_seniority := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_SENIORITY');
3397: P_total_Accrued_mothers := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_MOTHERS');
3398: P_total_Accrued_conventional := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_CONVENTIONAL');
3399: --
3400: --
3401: ELSIF p_type = 'ADD' THEN
3394: p_accrual_end_date := fnd_date.canonical_to_date(l_outputs(4).value);
3395: P_total_Accrued_protected := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_PROTECTED');
3396: P_total_Accrued_seniority := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_SENIORITY');
3397: P_total_Accrued_mothers := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_MOTHERS');
3398: P_total_Accrued_conventional := per_formula_functions.get_number('TOTAL_ACCRUED_PTO_CONVENTIONAL');
3399: --
3400: --
3401: ELSIF p_type = 'ADD' THEN
3402: /*** That is if p_type = 'ADD' -- The Additional Days Entitlement Process' .bug#3030610**/
3500: hr_utility.set_location(l_inputs(10).name||':'||l_inputs(10).value,566);
3501: hr_utility.set_location(l_inputs(11).name||':'||l_inputs(11).value,567);
3502:
3503:
3504: per_formula_functions.run_formula(p_formula_id => p_accrual_formula_id,
3505: p_calculation_date => p_calculation_date,
3506: p_inputs => l_inputs,
3507: p_outputs => l_outputs);
3508:
3552: begin
3553: hr_utility.set_location('Entering ' || l_proc,10);
3554: --fnd_file.put_line(fnd_file.log,'In Obsoletion Procedure' );
3555:
3556: l_number := per_formula_functions.set_date('PROCESS_DATE', p_effective_date);
3557:
3558: l_number := get_fr_latest_ent_date(
3559: P_ASSIGNMENT_ID => p_assignment_id,
3560: P_ACCRUAL_PLAN_ID => p_accrual_plan_id,