430: if l_inst_count > 0 then
431: --- get the profile setup it can be either AND or OR # 2508757
432: l_ben_vapro_rul_cond := fnd_profile.value('BEN_VAPRO_RL_COND');
433:
434: hr_utility.set_location(' l_ben_vapro_rul_cond ' || l_ben_vapro_rul_cond, 757 );
435: --
436: for i in l_inst_set.first..l_inst_set.last loop
437: --
438: hr_utility.set_location(' p_vrbl_rt_prfl_id ' || p_vrbl_rt_prfl_id, 757 );
434: hr_utility.set_location(' l_ben_vapro_rul_cond ' || l_ben_vapro_rul_cond, 757 );
435: --
436: for i in l_inst_set.first..l_inst_set.last loop
437: --
438: hr_utility.set_location(' p_vrbl_rt_prfl_id ' || p_vrbl_rt_prfl_id, 757 );
439: l_outputs := benutils.formula
440: (p_formula_id => l_inst_set(i).formula_id
441: ,p_effective_date => nvl(p_lf_evt_ocrd_dt
442: ,p_effective_date)
461: );
462: -- if the profile is AND and one of the rule fails #2508757
463: if nvl(l_ben_vapro_rul_cond,'A') = 'A' then
464:
465: hr_utility.set_location(' result ' || l_outputs(l_outputs.first).value, 758 );
466: if l_outputs(l_outputs.first).value <> 'Y' then
467: raise g_criteria_failed;
468: End if ;
469: Else
467: raise g_criteria_failed;
468: End if ;
469: Else
470: -- if the profile is OR and one of the rule pass then exit
471: hr_utility.set_location(' result ' || l_outputs(l_outputs.first).value, 759 );
472: if l_outputs(l_outputs.first).value = 'Y' then
473: --
474: exit;
475: --
478: --
479: end loop;
480: -- if the profile is OR and exit with value 'N' raise the error
481: if nvl(l_ben_vapro_rul_cond,'A') = 'O' and l_outputs(l_outputs.first).value <> 'Y' then
482: hr_utility.set_location(' error on OR and N ', 757 );
483: raise g_criteria_failed;
484: end if ;
485: --
486: end if;
599: l_rows_found := true;
600: --
601: for i in l_inst_set.first..l_inst_set.last loop
602: --
603: hr_utility.set_location(' l_inst_set(i).gndr_cd '||l_inst_set(i).gndr_cd , 12);
604: hr_utility.set_location(' l_inst_set(i).excld_flag '|| l_inst_set(i).excld_flag ,12);
605: --
606: l_ok := l_inst_set(i).gndr_cd = p_sex;
607: --
600: --
601: for i in l_inst_set.first..l_inst_set.last loop
602: --
603: hr_utility.set_location(' l_inst_set(i).gndr_cd '||l_inst_set(i).gndr_cd , 12);
604: hr_utility.set_location(' l_inst_set(i).excld_flag '|| l_inst_set(i).excld_flag ,12);
605: --
606: l_ok := l_inst_set(i).gndr_cd = p_sex;
607: --
608: if l_ok is null or p_sex is null then
1190: l_rows_found boolean := false;
1191: l_mx_pct_val number ;
1192: --
1193: begin
1194: hr_utility.set_location ('Entering check_pct_fltm',01);
1195: hr_utility.set_location ('opt' || p_opt_id ,01);
1196: hr_utility.set_location ('plip'|| p_plip_id ,01);
1197: hr_utility.set_location ('pl' || p_pl_id ,01);
1198: hr_utility.set_location ('pgm' || p_pgm_id ,01);
1191: l_mx_pct_val number ;
1192: --
1193: begin
1194: hr_utility.set_location ('Entering check_pct_fltm',01);
1195: hr_utility.set_location ('opt' || p_opt_id ,01);
1196: hr_utility.set_location ('plip'|| p_plip_id ,01);
1197: hr_utility.set_location ('pl' || p_pl_id ,01);
1198: hr_utility.set_location ('pgm' || p_pgm_id ,01);
1199: --
1192: --
1193: begin
1194: hr_utility.set_location ('Entering check_pct_fltm',01);
1195: hr_utility.set_location ('opt' || p_opt_id ,01);
1196: hr_utility.set_location ('plip'|| p_plip_id ,01);
1197: hr_utility.set_location ('pl' || p_pl_id ,01);
1198: hr_utility.set_location ('pgm' || p_pgm_id ,01);
1199: --
1200:
1193: begin
1194: hr_utility.set_location ('Entering check_pct_fltm',01);
1195: hr_utility.set_location ('opt' || p_opt_id ,01);
1196: hr_utility.set_location ('plip'|| p_plip_id ,01);
1197: hr_utility.set_location ('pl' || p_pl_id ,01);
1198: hr_utility.set_location ('pgm' || p_pgm_id ,01);
1199: --
1200:
1201: if p_opt_id is not null then
1194: hr_utility.set_location ('Entering check_pct_fltm',01);
1195: hr_utility.set_location ('opt' || p_opt_id ,01);
1196: hr_utility.set_location ('plip'|| p_plip_id ,01);
1197: hr_utility.set_location ('pl' || p_pl_id ,01);
1198: hr_utility.set_location ('pgm' || p_pgm_id ,01);
1199: --
1200:
1201: if p_opt_id is not null then
1202: -- Look for oiplip first. oiplip elig_per_opt rows hang off plip elig_per
1203: -- records.
1204: if p_plip_id is not null then
1205: open c_pct_ft_plip;
1206: fetch c_pct_ft_plip into l_rt_pct_fl_tm_val;
1207: hr_utility.set_location ('oiplip '||to_char(l_rt_pct_fl_tm_val),01);
1208: close c_pct_ft_plip;
1209: end if;
1210:
1211: -- If there is no oiplip, check for oipl
1211: -- If there is no oiplip, check for oipl
1212: if l_rt_pct_fl_tm_val is null then
1213: open c_pct_ft_opt;
1214: fetch c_pct_ft_opt into l_rt_pct_fl_tm_val;
1215: hr_utility.set_location ('oipl '||to_char(l_rt_pct_fl_tm_val),01);
1216: close c_pct_ft_opt;
1217: end if;
1218: else
1219: -- just look for pl elig per record.
1218: else
1219: -- just look for pl elig per record.
1220: open c_pct_ft;
1221: fetch c_pct_ft into l_rt_pct_fl_tm_val;
1222: hr_utility.set_location ('pl '||to_char(l_rt_pct_fl_tm_val),01);
1223: close c_pct_ft;
1224: end if;
1225:
1226: -- Get the rate profile data from the cache.
1256: l_mx_pct_val := l_inst_set(i).mx_pct_val + 1 ;
1257: --
1258: end if;
1259: --
1260: hr_utility.set_location('if' , 610) ;
1261: --
1262: l_ok := ((l_rt_pct_fl_tm_val >=
1263: l_inst_set(i).mn_pct_val
1264: and l_rt_pct_fl_tm_val < l_mx_pct_val )
1269: (l_rt_pct_fl_tm_val >= l_inst_set(i).mn_pct_val and
1270: l_inst_set(i).no_mx_pct_val_flag = 'Y'));
1271:
1272: if l_ok Then
1273: hr_utility.set_location('success ' ,610);
1274: end if ;
1275: --
1276: if l_ok is null or l_rt_pct_fl_tm_val is null then
1277: --
1335: l_include_flag varchar2(80);
1336: --
1337: begin
1338: --
1339: hr_utility.set_location('Entering: '||l_proc, 10);
1340: --
1341: -- Getting eligibility profile compensation level by eligibility profile
1342: --
1343: ben_rt_asnt_cache.get_rt_asnt_cache
1347: ,p_lf_evt_ocrd_dt => p_lf_evt_ocrd_dt
1348: ,p_inst_set => l_inst_dets
1349: ,p_inst_count => l_inst_count);
1350: --
1351: hr_utility.set_location('Int COunt'||l_inst_count,11);
1352: if l_inst_count > 0 then
1353: --
1354: ben_person_object.get_object(p_person_id => p_person_id,
1355: p_rec => l_ass_rec);
1358: --
1359: -- Error if someone hasn't built the formula as this will
1360: -- cause an error. In this case kill the run.
1361: --
1362: hr_utility.set_location('COunt'||l_count,11);
1363: if l_inst_dets(l_count).formula_id is null then
1364: --
1365: fnd_message.set_name('BEN','BEN_92460_ASS_SET_FORMULA');
1366: fnd_message.set_token('PROC',l_proc);
1368: fnd_message.raise_error;
1369: --
1370: end if;
1371: --
1372: hr_utility.set_location('Bef Formula',11);
1373: l_outputs := benutils.formula
1374: (p_formula_id => l_inst_dets(l_count).formula_id,
1375: p_assignment_id => l_ass_rec.assignment_id,
1376: p_effective_date => nvl(p_lf_evt_ocrd_dt, p_effective_date), -- FONM
1382: begin
1383: --
1384: if l_outputs(l_outputs.first).name = 'INCLUDE_FLAG' then
1385: --
1386: hr_utility.set_location('Incl Flag ',11);
1387: l_include_flag := l_outputs(l_outputs.first).value;
1388: --
1389: else
1390: --
1412: fnd_message.raise_error;
1413: --
1414: end;
1415: --
1416: hr_utility.set_location('Include Flag '||l_include_flag,10);
1417: --
1418: l_ok := nvl((l_include_flag = 'Y'),FALSE);
1419: --if l_ok is null then
1420: -- l_ok:=false;
1449: if l_rows_found and
1450: not l_ok then
1451: --
1452: fnd_message.set_name('BEN','BEN_92459_ASS_SET_PRFL_FAIL');
1453: hr_utility.set_location('Criteria Failed: '||l_proc,20);
1454: raise g_criteria_failed;
1455: --
1456: end if;
1457: --
1454: raise g_criteria_failed;
1455: --
1456: end if;
1457: --
1458: hr_utility.set_location('Leaving :'||l_proc,20);
1459: --
1460: end check_asnt_set;
1461: -- --------------------------------------------------------------------
1462: -- Hours worked in a period check.
1533: l_rows_found boolean := false;
1534: l_mx_hrs_num number ;
1535:
1536: begin
1537: hr_utility.set_location ('Entering check_hrs_wkd',01);
1538: if p_opt_id is not null then
1539: -- Look for oiplip first. oiplip elig_per_opt rows hang off plip elig_per
1540: -- records.
1541: if p_plip_id is not null then
1540: -- records.
1541: if p_plip_id is not null then
1542: open c_hrs_wkd_plip;
1543: fetch c_hrs_wkd_plip into l_rt_hrs_wkd_val;
1544: hr_utility.set_location ('oiplip '||to_char(l_rt_hrs_wkd_val),01);
1545: close c_hrs_wkd_plip;
1546: end if;
1547:
1548: -- If there is no oiplip, check for oipl
1548: -- If there is no oiplip, check for oipl
1549: if l_rt_hrs_wkd_val is null then
1550: open c_hrs_wkd_opt;
1551: fetch c_hrs_wkd_opt into l_rt_hrs_wkd_val;
1552: hr_utility.set_location ('oipl '||to_char(l_rt_hrs_wkd_val),01);
1553: close c_hrs_wkd_opt;
1554: end if;
1555: else
1556: -- just look for pl elig per record.
1555: else
1556: -- just look for pl elig per record.
1557: open c_hrs_wkd;
1558: fetch c_hrs_wkd into l_rt_hrs_wkd_val;
1559: hr_utility.set_location ('pl '||to_char(l_rt_hrs_wkd_val),01);
1560: close c_hrs_wkd;
1561: end if;
1562:
1563:
1578: --
1579: l_rows_found := true;
1580: --
1581: for i in l_inst_set.first..l_inst_set.last loop
1582: hr_utility.set_location ('hrx criteria'||l_rt_hrs_wkd_val || ' min:'||
1583: to_char(l_inst_set(i).mn_hrs_num)||' mx:'||to_char(l_inst_set(i).mx_hrs_num),610.2);
1584: --
1585: -- Bug 2101937 fixes
1586: l_mx_hrs_num := l_inst_set(i).mx_hrs_num ;
1861: fetch c_get_absence_type into l_dummy;
1862: --
1863: if c_get_absence_type%found then
1864: --
1865: hr_utility.set_location ('c_get_absence_type found',88);
1866: --
1867: if l_inst_set(i).excld_flag = 'N' then
1868: --
1869: l_ok:=true;
1879: end if;
1880: --
1881: else
1882: --
1883: hr_utility.set_location ('c_get_absence_type not found',88);
1884: --
1885: if l_inst_set(i).excld_flag = 'N' then
1886: --
1887: l_rows_found:=true;
2008: begin
2009: --
2010: -- Get the data from the cache.
2011: --
2012: hr_utility.set_location('p_vrbl_rt_prfl_id -> '||p_vrbl_rt_prfl_id,11);
2013:
2014: ben_rt_prfl_cache.get_rt_prfl_cache
2015: (p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
2016: ,p_effective_date => p_effective_date
2030: l_rows_found := true;
2031: --
2032: for l_count in p_person_type.first..p_person_type.last loop
2033: --
2034: hr_utility.set_location(l_inst_set(i).person_type_id,10);
2035: --
2036: -- To support user creatd person type use person_type_id instead of per_typ_cd
2037: --
2038: /*l_ok := l_inst_set(i).per_typ_cd =
2135: --
2136: BEGIN
2137: --
2138: -- Get the data from the cache.
2139: hr_utility.set_location('entering chck_zip_code', 10);
2140: --
2141: -- FONM
2142: if ben_manage_life_events.fonm = 'Y' then
2143: --
2160: LOOP
2161: FETCH get_zip_ranges INTO l_from_value,l_to_value;
2162: EXIT WHEN get_zip_ranges%NOTFOUND;
2163: --
2164: hr_utility.set_location('person zip '||p_postal_code ,2219.3);
2165: hr_utility.set_location('from zip '||l_from_value ,2219.3);
2166: hr_utility.set_location('to zip '||l_to_value ,2219.3);
2167: --
2168: l_rows_found := TRUE;
2161: FETCH get_zip_ranges INTO l_from_value,l_to_value;
2162: EXIT WHEN get_zip_ranges%NOTFOUND;
2163: --
2164: hr_utility.set_location('person zip '||p_postal_code ,2219.3);
2165: hr_utility.set_location('from zip '||l_from_value ,2219.3);
2166: hr_utility.set_location('to zip '||l_to_value ,2219.3);
2167: --
2168: l_rows_found := TRUE;
2169: EXIT;
2162: EXIT WHEN get_zip_ranges%NOTFOUND;
2163: --
2164: hr_utility.set_location('person zip '||p_postal_code ,2219.3);
2165: hr_utility.set_location('from zip '||l_from_value ,2219.3);
2166: hr_utility.set_location('to zip '||l_to_value ,2219.3);
2167: --
2168: l_rows_found := TRUE;
2169: EXIT;
2170: --
2201: RAISE ben_evaluate_rate_profiles.g_profile_failed;
2202: --
2203: end if;
2204: --
2205: hr_utility.set_location('leaving chck_zip_code', 10);
2206: --
2207: END check_zip_code_rng;
2208: --
2209: -- --------------------------------------------------------
2987: --
2988: end if;
2989:
2990:
2991: --hr_utility.set_location(l_proc||' Entering ',10);
2992: if p_elig_per_elctbl_chc_id is not null then
2993: --
2994: open c_age_param;
2995: --
3014: ,p_lf_evt_ocrd_dt => p_lf_evt_ocrd_dt
3015: ,p_business_group_id => p_business_group_id
3016: ,p_inst_set => l_inst_set
3017: ,p_inst_count => l_inst_count);
3018: --hr_utility.set_location(l_proc||' Dn GRP Cac ',10);
3019: --
3020: if l_inst_count > 0 then
3021: --
3022: -- plan in program is overriden, capture the data from cache by passing plip_id
3043: l_prtn_ovridn_flag := l_epo_row.prtn_ovridn_flag;
3044: l_prtn_ovridn_thru_dt := l_epo_row.prtn_ovridn_thru_dt;
3045: l_per_age := l_epo_row.rt_age_val;
3046: else
3047: hr_utility.set_location('Plan not in Program',10);
3048: l_prtn_ovridn_flag := p_currepe_row.prtn_ovridn_flag;
3049: l_prtn_ovridn_thru_dt := p_currepe_row.prtn_ovridn_thru_dt;
3050: l_per_age := p_currepe_row.rt_age_val;
3051: end if;
3098: ,p_value => l_per_age
3099: ,p_change_date => l_dummy_date);
3100: --
3101: end if;
3102: hr_utility.set_location(' age ' || l_per_age , 610.2);
3103: hr_utility.set_location(' mn age ' || l_inst_set(i).mn_age_num , 610.2);
3104: --
3105: l_mx_age_num := l_inst_set(i).mx_age_num ;
3106: --
3099: ,p_change_date => l_dummy_date);
3100: --
3101: end if;
3102: hr_utility.set_location(' age ' || l_per_age , 610.2);
3103: hr_utility.set_location(' mn age ' || l_inst_set(i).mn_age_num , 610.2);
3104: --
3105: l_mx_age_num := l_inst_set(i).mx_age_num ;
3106: --
3107: if ( l_inst_set(i).mx_age_num <> trunc(l_inst_set(i).mx_age_num) OR
3114: l_mx_age_num := l_inst_set(i).mx_age_num + 1 ;
3115: --
3116: end if;
3117: --
3118: hr_utility.set_location(' l_mx_age_num '||l_mx_age_num , 610.10);
3119: --
3120: l_ok := (l_per_age >= l_inst_set(i).mn_age_num and
3121: l_per_age < l_mx_age_num )
3122: or
3127: l_per_age >= l_inst_set(i).mn_age_num);
3128: --
3129: if l_ok is null or l_per_age is null then
3130: --
3131: --hr_utility.set_location(' Step 1' ,99);
3132: l_ok := false;
3133: --
3134: end if;
3135: --
3134: end if;
3135: --
3136: if l_ok and l_inst_set(i).excld_flag = 'N' then
3137: --
3138: --hr_utility.set_location(' Step 2' ,99);
3139: exit;
3140: --
3141: elsif l_ok and l_inst_set(i).excld_flag = 'Y' then
3142: --
3139: exit;
3140: --
3141: elsif l_ok and l_inst_set(i).excld_flag = 'Y' then
3142: --
3143: --hr_utility.set_location(' Step 3' ,99);
3144: -- raise ben_evaluate_rate_profiles.g_profile_failed;
3145: l_ok := false;
3146: exit ;
3147: --
3151: -- exit ;
3152: --
3153: elsif l_inst_set(i).excld_flag = 'N' then
3154: --
3155: --hr_utility.set_location(' Step 4' ,99);
3156: l_rows_found := true;
3157: --
3158: end if;
3159: --
3162: end if;
3163: --
3164: if l_rows_found and not l_ok then
3165: --
3166: --hr_utility.set_location(' Step 5 ' ,99);
3167: raise ben_evaluate_rate_profiles.g_profile_failed;
3168: --
3169: end if;
3170: --
3287: ,p_fonm_cvg_strt_dt => ben_manage_life_events.g_fonm_cvg_strt_dt
3288: ,p_fonm_rt_strt_dt => ben_manage_life_events.g_fonm_rt_strt_dt
3289: ,p_value => l_compensation_value);
3290:
3291: hr_utility.set_location( ' compen ' || l_compensation_value , 610.2) ;
3292: hr_utility.set_location( ' mn compen ' || l_inst_set(i).mn_comp_val , 610.2) ;
3293: --
3294: -- Bug 2101937 fixes
3295: l_mx_comp_val := l_inst_set(i).mx_comp_val ;
3288: ,p_fonm_rt_strt_dt => ben_manage_life_events.g_fonm_rt_strt_dt
3289: ,p_value => l_compensation_value);
3290:
3291: hr_utility.set_location( ' compen ' || l_compensation_value , 610.2) ;
3292: hr_utility.set_location( ' mn compen ' || l_inst_set(i).mn_comp_val , 610.2) ;
3293: --
3294: -- Bug 2101937 fixes
3295: l_mx_comp_val := l_inst_set(i).mx_comp_val ;
3296: --
3304: l_mx_comp_val := l_inst_set(i).mx_comp_val + 1 ;
3305: --
3306: end if;
3307: --
3308: hr_utility.set_location('if' , 610) ;
3309: --
3310: l_ok := (nvl(l_compensation_value,-1) >= l_inst_set(i).mn_comp_val and
3311: nvl(l_compensation_value,9999999) < l_mx_comp_val )
3312: or
3440: end if;
3441: --
3442: -- Get the data from the cache.
3443: --
3444: hr_utility.set_location('p_vrbl_rt_prfl_id rate level '||p_vrbl_rt_prfl_id,10);
3445: --
3446: ben_rt_prfl_cache.get_rt_prfl_cache
3447: (p_vrbl_rt_prfl_id => p_vrbl_rt_prfl_id
3448: ,p_effective_date => p_effective_date
3450: ,p_business_group_id => p_business_group_id
3451: ,p_inst_set => l_inst_set
3452: ,p_inst_count => l_inst_count);
3453: --
3454: hr_utility.set_location('l_per_los rate level '||l_per_los,10);
3455: hr_utility.set_location('l_inst_count '||l_inst_count,10);
3456: --
3457: if l_inst_count > 0 then
3458: --
3451: ,p_inst_set => l_inst_set
3452: ,p_inst_count => l_inst_count);
3453: --
3454: hr_utility.set_location('l_per_los rate level '||l_per_los,10);
3455: hr_utility.set_location('l_inst_count '||l_inst_count,10);
3456: --
3457: if l_inst_count > 0 then
3458: --
3459: -- plan in program is overriden, capture the data from cache by passing plip_id
3480: l_prtn_ovridn_flag := l_epo_row.prtn_ovridn_flag;
3481: l_prtn_ovridn_thru_dt := l_epo_row.prtn_ovridn_thru_dt;
3482: l_per_los := l_epo_row.rt_los_val;
3483: else
3484: hr_utility.set_location('Plan not in Program',10);
3485: l_prtn_ovridn_flag := p_currepe_row.prtn_ovridn_flag;
3486: l_prtn_ovridn_thru_dt := p_currepe_row.prtn_ovridn_thru_dt;
3487: l_per_los := p_currepe_row.rt_los_val;
3488: end if;
3516: ,p_value => l_per_los
3517: ,p_start_date => l_dummy_date);
3518: --
3519: end if;
3520: hr_utility.set_location( ' los ' || l_per_los , 610.2);
3521: -- Bug 2101937 fixes
3522: l_mx_los_num := l_inst_set(i).mx_los_num ;
3523: --
3524: if ( l_inst_set(i).mx_los_num <> trunc(l_inst_set(i).mx_los_num) OR
3693: l_prtn_ovridn_flag := l_epo_row.prtn_ovridn_flag;
3694: l_prtn_ovridn_thru_dt := l_epo_row.prtn_ovridn_thru_dt;
3695: l_cmbn_age_n_los_val := l_epo_row.rt_cmbn_age_n_los_val;
3696: else
3697: hr_utility.set_location('Plan not in Program',10);
3698: l_prtn_ovridn_flag := p_currepe_row.prtn_ovridn_flag;
3699: l_prtn_ovridn_thru_dt := p_currepe_row.prtn_ovridn_thru_dt;
3700: l_cmbn_age_n_los_val := p_currepe_row.rt_cmbn_age_n_los_val;
3701: end if;
3888: ,p_business_group_id => p_business_group_id
3889: ,p_inst_set => l_inst_set
3890: ,p_inst_count => l_inst_count);
3891: --
3892: hr_utility.set_location ('l_inst_count:'||l_inst_count,10);
3893: if l_inst_count > 0 then
3894: --
3895: -- Data found. Loop through to see if excld flag is on or off.
3896: --
3901: --
3902: open c_get_quald_bnf;
3903: fetch c_get_quald_bnf into l_cqb_rec;
3904: if c_get_quald_bnf%notfound then
3905: hr_utility.set_location ('did not find quald bnf:',10);
3906: close c_get_quald_bnf;
3907: --
3908: -- Bug 1566944 Check for new terminations with qualifying event
3909: -- New a termination life event is processes, system can't find
3913: --
3914: open c_ler;
3915: fetch c_ler into l_ler_rec ;
3916: if c_ler%notfound then
3917: hr_utility.set_location ('not a new qualifying termination event:',10);
3918: close c_ler;
3919: raise ben_evaluate_rate_profiles.g_profile_failed;
3920: else
3921: close c_ler;
3939: else
3940: l_strt_dt := hr_api.g_sot;
3941: end if;
3942: --
3943: hr_utility.set_location ('l_strt_dt '||l_strt_dt, 199);
3944: -- Calculate the end date.
3945: --
3946: if l_inst_set(i).no_mx_poe_flag = 'N' then
3947: l_end_dt := benutils.derive_date
3954: else
3955: l_end_dt := hr_api.g_eot;
3956: end if;
3957: --
3958: hr_utility.set_location ('l_end_dt '||l_end_dt , 199);
3959: --
3960: if nvl(p_lf_evt_ocrd_dt, p_effective_date) not between
3961: l_strt_dt and l_end_dt then
3962: raise ben_evaluate_rate_profiles.g_profile_failed;
3987: ,p_min => null
3988: ,p_max => l_mn_poe_num
3989: ,p_value => null
3990: ));
3991: hr_utility.set_location ('l_strt_dt '||l_strt_dt, 200);
3992: else
3993: l_strt_dt := hr_api.g_sot;
3994: end if;
3995: --
4056: if c_get_dsblity_evt%notfound then
4057: close c_get_dsblity_evt;
4058: --
4059: else
4060: hr_utility.set_location ('disability rate applies 60 :',10);
4061: close c_get_dsblity_evt;
4062: l_dsbld := true;
4063: exit;
4064: end if;
4062: l_dsbld := true;
4063: exit;
4064: end if;
4065: else
4066: hr_utility.set_location ('disability rate applies tom :',10);
4067: l_dsbld := true;
4068: exit;
4069: end if;
4070: end if;
4106: l_inst_count number;
4107: l_profile_match varchar2(1);
4108: --
4109: begin
4110: hr_utility.set_location ('check_ttl_prtt:'||to_char(p_ttl_prtt),10);
4111:
4112: --
4113: -- Get the data from the cache.
4114: --
4136: --
4137: -- Data found. Loop through to see we match the total number of prtts.
4138: --
4139: for i in l_inst_set.first..l_inst_set.last loop
4140: hr_utility.set_location ('p_ttl:'||to_char(p_ttl_prtt)||
4141: ' min:'||to_char(l_inst_set(i).mn_prtt_num)||' max:'||
4142: to_char(l_inst_set(i).mx_prtt_num),33);
4143:
4144: if p_ttl_prtt between nvl(l_inst_set(i).mn_prtt_num,0)
4172: l_rows_found boolean := false;
4173: --
4174: begin
4175: --
4176: hr_utility.set_location('Entering : '||l_proc,10);
4177: --
4178: -- Get the data from the cache.
4179: --
4180: ben_rt_prfl_cache.get_rt_prfl_cache
4252: l_rec per_all_people_f%rowtype;
4253: --
4254: begin
4255: --
4256: hr_utility.set_location('Entering : '||l_proc,10);
4257: --
4258: -- Get the data from the cache.
4259: --
4260: ben_rt_prfl_cache.get_rt_prfl_cache
4306: l_rec per_periods_of_service%rowtype;
4307: --
4308: begin
4309: --
4310: hr_utility.set_location('Entering : '||l_proc,10);
4311: --
4312: -- Get the data from the cache.
4313: --
4314: ben_rt_prfl_cache.get_rt_prfl_cache
4399: and pil.per_in_ler_stat_cd not in ('VOIDD','BCKDT');
4400:
4401: begin
4402: --
4403: hr_utility.set_location('Entering : '||l_proc,10);
4404: --
4405: -- Get the data from the cache.
4406: --
4407: ben_rt_prfl_cache.get_rt_prfl_cache
4490: and pdp.effective_end_date = hr_api.g_eot;
4491:
4492: begin
4493: --
4494: hr_utility.set_location('Entering : '||l_proc,10);
4495: --
4496: -- Get the data from the cache.
4497: --
4498: ben_rt_prfl_cache.get_rt_prfl_cache
4604: and pdp.cvg_thru_dt
4605: and pdp.effective_end_date = hr_api.g_eot;
4606: begin
4607: --
4608: hr_utility.set_location('Entering : '||l_proc,10);
4609: --
4610: -- Get the data from the cache.
4611: --
4612: ben_rt_prfl_cache.get_rt_prfl_cache
4730: and reg.effective_end_date;
4731:
4732: begin
4733: --
4734: hr_utility.set_location('Entering : '||l_proc,10);
4735: --
4736: -- Get the data from the cache.
4737: --
4738: ben_rt_prfl_cache.get_rt_prfl_cache
4853:
4854:
4855: begin
4856: --
4857: hr_utility.set_location('Entering : '||l_proc,10);
4858: --
4859: -- Get the data from the cache.
4860: --
4861: ben_rt_prfl_cache.get_rt_prfl_cache
4958:
4959:
4960: begin
4961: --
4962: hr_utility.set_location('Entering : '||l_proc,10);
4963: --
4964: -- Get the data from the cache.
4965: --
4966: ben_rt_prfl_cache.get_rt_prfl_cache
5145: ) ;
5146: --
5147: begin
5148: --
5149: hr_utility.set_location('Entering: '||l_proc, 10);
5150: --
5151: -- Getting variable profile compensation level by variable profile
5152: --
5153: ben_rt_prfl_cache.get_rt_prfl_cache
5259: raise g_criteria_failed;
5260: --
5261: end if;
5262: --
5263: hr_utility.set_location('Leaving :'||l_proc,20);
5264: --
5265: end check_othr_ptip ;
5266:
5267: --
5287: l_dummy varchar2(1);
5288: --
5289: begin
5290: --
5291: hr_utility.set_location('Entering: '||l_proc, 10);
5292:
5293: --
5294: ben_rt_prfl_cache.get_rt_prfl_cache
5295: (p_effective_date => nvl(p_lf_evt_ocrd_dt,p_effective_date),
5372: raise g_criteria_failed;
5373: --
5374: end if;
5375: --
5376: hr_utility.set_location('Leaving :'||l_proc,20);
5377: --
5378: end check_enrld_anthr_pl;
5379: --
5380: -- --------------------------------------------------------------------------
5411: and pen.prtt_enrt_rslt_stat_cd is null;
5412: --
5413: begin
5414: --
5415: hr_utility.set_location('Entering: '||l_proc, 10);
5416: --
5417: -- Getting variable rate profile compensation level by variable profile
5418: --
5419: ben_rt_prfl_cache.get_rt_prfl_cache
5499: raise g_criteria_failed;
5500: --
5501: end if;
5502: --
5503: hr_utility.set_location('Leaving :'||l_proc,20);
5504: --
5505: end check_enrld_anthr_oipl;
5506:
5507:
5552:
5553: --
5554: begin
5555: --
5556: hr_utility.set_location('Entering: '||l_proc, 10);
5557: --
5558: -- Getting variable rate profile compensation level
5559: --
5560: ben_rt_prfl_cache.get_rt_prfl_cache
5577: -- then no problem.
5578: -- 5) If person eligible for any of the plans and exclude flag = 'N'
5579: -- then fail criteria.
5580: --
5581: hr_utility.set_location('Getting profiles',10);
5582: <
5583: for i in l_inst_set.first..l_inst_set.last loop
5584: --
5585: l_rows_found := true;
5583: for i in l_inst_set.first..l_inst_set.last loop
5584: --
5585: l_rows_found := true;
5586: --
5587: hr_utility.set_location('Getting results',10);
5588: <
5589: for l_count in nvl(ben_manage_life_events.g_cache_person_prtn.first,0)..
5590: nvl(ben_manage_life_events.g_cache_person_prtn.last,-1) loop
5591: if ben_manage_life_events.
5605: -- If only check plans that are subject to COBRA.
5606: --
5607: l_continue := true;
5608: --
5609: hr_utility.set_location('Getting cobra plans',10);
5610: --
5611: if l_inst_set(i).only_pls_subj_cobra_flag = 'Y' then
5612: --
5613: open c1(ben_manage_life_events.g_cache_person_prtn(l_count).pl_id);
5615: fetch c1 into l_dummy;
5616: --
5617: if c1%notfound then
5618: --
5619: hr_utility.set_location('Cobra plans not found',10);
5620: l_continue := false;
5621: --
5622: end if;
5623: --
5626: end if;
5627: --
5628: if l_continue then
5629: --
5630: hr_utility.set_location('Cobra plans found',10);
5631: --
5632: if (l_date_to_use
5633: between ben_manage_life_events.
5634: g_cache_person_prtn(l_count).enrt_cvg_strt_dt
5638: l_found_ptip := true;
5639: --
5640: if l_inst_set(i).excld_flag = 'N' then
5641: --
5642: hr_utility.set_location('Exclude flags = N Cobra plans found',10);
5643: l_ok := true;
5644: exit prfl;
5645: --
5646: end if;
5646: end if;
5647: --
5648: if l_inst_set(i).excld_flag = 'Y' then
5649: --
5650: hr_utility.set_location('Exclude flags = Y Cobra plans found',10);
5651: l_ok := false;
5652: exit prfl;
5653: --
5654: end if;
5679: raise g_criteria_failed;
5680: --
5681: end if;
5682: --
5683: hr_utility.set_location('Leaving :'||l_proc,20);
5684: --
5685: end check_enrld_anthr_ptip;
5686:
5687:
5725: and pen.prtt_enrt_rslt_stat_cd is null;
5726: --
5727: begin
5728: --
5729: hr_utility.set_location('Entering: '||l_proc, 10);
5730: --
5731: -- Getting variable profile compensation level by variable profile
5732: --
5733: ben_rt_prfl_cache.get_rt_prfl_cache
5797: raise g_criteria_failed;
5798: --
5799: end if;
5800: --
5801: hr_utility.set_location('Leaving :'||l_proc,20);
5802: --
5803: end check_enrld_anthr_plip;
5804:
5805:
5829: l_dummy varchar2(1);
5830: --
5831: begin
5832: --
5833: hr_utility.set_location('Entering: '||l_proc, 10);
5834: hr_utility.set_location('prfl_id: '||p_vrbl_rt_prfl_id, 10);
5835: --
5836: -- Getting variable profile compensation level
5837: --
5830: --
5831: begin
5832: --
5833: hr_utility.set_location('Entering: '||l_proc, 10);
5834: hr_utility.set_location('prfl_id: '||p_vrbl_rt_prfl_id, 10);
5835: --
5836: -- Getting variable profile compensation level
5837: --
5838: ben_rt_prfl_cache.get_rt_prfl_cache
5919: raise g_criteria_failed;
5920: --
5921: end if;
5922: --
5923: hr_utility.set_location('Leaving :'||l_proc,20);
5924: --
5925: end check_enrld_anthr_pgm;
5926:
5927: --
6004: between epo.effective_start_date and epo.effective_end_date;
6005: --
6006: begin
6007: --
6008: hr_utility.set_location('Entering: '||l_proc, 10);
6009: --
6010: -- Getting variable profile compensation level by variable profile
6011: --
6012: ben_rt_prfl_cache.get_rt_prfl_cache
6018: p_inst_count => l_inst_count);
6019:
6020:
6021: --
6022: hr_utility.set_location('l_inst_count: '||l_inst_count, 10);
6023: --
6024: if l_inst_count > 0 then
6025: --
6026: -- Operation
6088: raise g_criteria_failed;
6089: --
6090: end if;
6091: --
6092: hr_utility.set_location('Leaving :'||l_proc,20);
6093: --
6094: end check_dpnt_othr_ptip;
6095:
6096:
6114:
6115:
6116: begin
6117: --
6118: hr_utility.set_location('Entering : '||l_proc,10);
6119: --
6120: -- Get the data from the cache.
6121: --
6122: ben_rt_prfl_cache.get_rt_prfl_cache
6171:
6172:
6173: begin
6174: --
6175: hr_utility.set_location('Entering : '||l_proc,10);
6176: --
6177: -- Get the data from the cache.
6178: --
6179: ben_rt_prfl_cache.get_rt_prfl_cache
6256: and pce.business_group_id = p_business_group_id ;
6257:
6258: begin
6259: --
6260: hr_utility.set_location('Entering : '||l_proc,10);
6261: --
6262: -- Get the data from the cache.
6263: --
6264: ben_rt_prfl_cache.get_rt_prfl_cache
6350: and pqt.business_group_id = p_business_group_id ;
6351:
6352: begin
6353: --
6354: hr_utility.set_location('Entering : '||l_proc,10);
6355: --
6356: -- Get the data from the cache.
6357: --
6358: ben_rt_prfl_cache.get_rt_prfl_cache
6430: l_inst_count number;
6431: l_profile_match varchar2(1);
6432: --
6433: begin
6434: hr_utility.set_location ('check_ttl_cvg:'||to_char(p_ttl_cvg),10);
6435:
6436: --
6437: -- Get the data from the cache.
6438: --
6460: --
6461: -- Data found. Loop through to see we match the total amount of cvg.
6462: --
6463: for i in l_inst_set.first..l_inst_set.last loop
6464: hr_utility.set_location ('min:'||to_char(l_inst_set(i).mn_cvg_vol_amt)||
6465: ' max:'||to_char(l_inst_set(i).mx_cvg_vol_amt),14);
6466: if p_ttl_cvg between nvl(l_inst_set(i).mn_cvg_vol_amt,0)
6467: and nvl(l_inst_set(i).mx_cvg_vol_amt,999999999999999) then
6468: -- we match one of the ranges, exit with success.
6587: END;
6588: --
6589: begin
6590: --
6591: hr_utility.set_location('Entering : '||l_proc,10);
6592: --
6593: -- Get the data from the cache.
6594: --
6595: ben_rt_prfl_cache.get_rt_prfl_cache
6762: --
6763:
6764: begin
6765: --
6766: hr_utility.set_location('Entering : '||l_proc,10);
6767: --
6768: -- Get the data from the cache.
6769: --
6770: ben_rt_prfl_cache.get_rt_prfl_cache
6974: l_package varchar2(80) := g_package||'.load_globals';
6975: l_insert_record varchar2(1);
6976: l_ctr number;
6977: begin
6978: -- hr_utility.set_location ('Entering '||l_package,10);
6979:
6980: if p_all_prfls then
6981: -- load the 'all prfls' globals. These globals use the actl_prem_vrbl_rt.ordr_num
6982: -- as it's index, because the second time we loop thru them, we need them in
6991: if g_all_prfls(l_ctr).vrbl_rt_prfl_id = p_vrbl_rt_prfl_id then
6992: g_all_prfls(l_ctr).match_cnt := g_all_prfls(l_ctr).match_cnt+1;
6993: g_all_prfls(l_ctr).match_cvg := g_all_prfls(l_ctr).match_cvg+p_bnft_amt;
6994: l_insert_record := 'N';
6995: hr_utility.set_location ('added to profile:'||
6996: to_char(p_vrbl_rt_prfl_id)||
6997: ' new num:'||to_char(g_all_prfls(l_ctr).match_cnt)||
6998: ' new cvg:'||to_char(g_all_prfls(l_ctr).match_cvg),16);
6999:
7013: g_all_prfls(p_ordr_num).vrbl_rt_prfl_id :=
7014: p_vrbl_rt_prfl_id;
7015: g_all_prfls(p_ordr_num).match_cnt := 1;
7016: g_all_prfls(p_ordr_num).match_cvg := p_bnft_amt;
7017: hr_utility.set_location ('added new profile '||
7018: to_char(p_vrbl_rt_prfl_id)||
7019: ' cvg:'||to_char(p_bnft_amt)||
7020: ' p_ordr_num:'||to_char(p_ordr_num),18);
7021:
7091: if g_use_prfls(y).vrbl_rt_prfl_id = p_vrbl_rt_prfl_id then
7092: g_use_prfls(y).match_cnt := g_use_prfls(y).match_cnt+1;
7093: g_use_prfls(y).match_cvg := g_use_prfls(y).match_cvg+p_bnft_amt;
7094: l_insert_record := 'N';
7095: hr_utility.set_location ('added to profile:'||
7096: to_char(p_vrbl_rt_prfl_id)||
7097: ' new num:'||to_char(g_use_prfls(y).match_cnt)||
7098: ' new cvg:'||to_char(g_use_prfls(y).match_cvg),26);
7099: exit;
7107: g_use_prfls(g_num_of_prfls_used).vrbl_rt_prfl_id :=
7108: p_vrbl_rt_prfl_id;
7109: g_use_prfls(g_num_of_prfls_used).match_cnt := 1;
7110: g_use_prfls(g_num_of_prfls_used).match_cvg := p_bnft_amt;
7111: hr_utility.set_location ('added new profile '||
7112: to_char(p_vrbl_rt_prfl_id)||
7113: ' cvg:'||to_char(p_bnft_amt),28);
7114: end if;
7115: end if;
7112: to_char(p_vrbl_rt_prfl_id)||
7113: ' cvg:'||to_char(p_bnft_amt),28);
7114: end if;
7115: end if;
7116: -- hr_utility.set_location ('Leaving '||l_package,99);
7117: end load_globals;
7118: --
7119: --
7120: -- ---------------------------------------------------------------------------
7213: --
7214: --
7215: begin
7216: --
7217: hr_utility.set_location ('Entering '||l_package,10);
7218: hr_utility.set_location( 'elig per elect id ' || p_elig_per_elctbl_chc_id, 610.3);
7219: --Bug 5077452
7220: if fnd_global.conc_request_id = -1 then
7221: --
7214: --
7215: begin
7216: --
7217: hr_utility.set_location ('Entering '||l_package,10);
7218: hr_utility.set_location( 'elig per elect id ' || p_elig_per_elctbl_chc_id, 610.3);
7219: --Bug 5077452
7220: if fnd_global.conc_request_id = -1 then
7221: --
7222: ben_env_object.init(p_business_group_id => p_business_group_id,
7239: --
7240: l_effective_date := nvl(p_lf_evt_ocrd_dt,p_effective_date);
7241: --
7242: if p_all_prfls then
7243: hr_utility.set_location('p_all_prfls -> true',11);
7244: else hr_utility.set_location('p_all_prfls -> false',11); end if;
7245: if p_use_globals then
7246: hr_utility.set_location('p_use_globals -> true',11);
7247: else hr_utility.set_location('p_use_globals -> false',11); end if;
7240: l_effective_date := nvl(p_lf_evt_ocrd_dt,p_effective_date);
7241: --
7242: if p_all_prfls then
7243: hr_utility.set_location('p_all_prfls -> true',11);
7244: else hr_utility.set_location('p_all_prfls -> false',11); end if;
7245: if p_use_globals then
7246: hr_utility.set_location('p_use_globals -> true',11);
7247: else hr_utility.set_location('p_use_globals -> false',11); end if;
7248:
7242: if p_all_prfls then
7243: hr_utility.set_location('p_all_prfls -> true',11);
7244: else hr_utility.set_location('p_all_prfls -> false',11); end if;
7245: if p_use_globals then
7246: hr_utility.set_location('p_use_globals -> true',11);
7247: else hr_utility.set_location('p_use_globals -> false',11); end if;
7248:
7249: if p_person_id is NULL then
7250: fnd_message.set_name('BEN','BEN_91521_BERP_PERSON_ID');
7243: hr_utility.set_location('p_all_prfls -> true',11);
7244: else hr_utility.set_location('p_all_prfls -> false',11); end if;
7245: if p_use_globals then
7246: hr_utility.set_location('p_use_globals -> true',11);
7247: else hr_utility.set_location('p_use_globals -> false',11); end if;
7248:
7249: if p_person_id is NULL then
7250: fnd_message.set_name('BEN','BEN_91521_BERP_PERSON_ID');
7251: fnd_message.set_token('PACKAGE',l_package);
7332: -- fonm check the date of the person cache
7333: if not nvl(l_fonm_cvg_strt_dt,l_effective_date)
7334: between l_per_rec.effective_start_date and l_per_rec.effective_end_date then
7335:
7336: hr_utility.set_location('clearing cache' || nvl(l_fonm_cvg_strt_dt,l_effective_date) ,10);
7337: hr_utility.set_location('cache start ' || l_per_rec.effective_start_date ,10);
7338: hr_utility.set_location('cache end ' || l_per_rec.effective_end_date ,10);
7339:
7340: ben_use_cvg_rt_date.fonm_clear_down_cache;
7333: if not nvl(l_fonm_cvg_strt_dt,l_effective_date)
7334: between l_per_rec.effective_start_date and l_per_rec.effective_end_date then
7335:
7336: hr_utility.set_location('clearing cache' || nvl(l_fonm_cvg_strt_dt,l_effective_date) ,10);
7337: hr_utility.set_location('cache start ' || l_per_rec.effective_start_date ,10);
7338: hr_utility.set_location('cache end ' || l_per_rec.effective_end_date ,10);
7339:
7340: ben_use_cvg_rt_date.fonm_clear_down_cache;
7341: --
7334: between l_per_rec.effective_start_date and l_per_rec.effective_end_date then
7335:
7336: hr_utility.set_location('clearing cache' || nvl(l_fonm_cvg_strt_dt,l_effective_date) ,10);
7337: hr_utility.set_location('cache start ' || l_per_rec.effective_start_date ,10);
7338: hr_utility.set_location('cache end ' || l_per_rec.effective_end_date ,10);
7339:
7340: ben_use_cvg_rt_date.fonm_clear_down_cache;
7341: --
7342: ben_person_object.get_object(p_person_id => p_person_id,
7341: --
7342: ben_person_object.get_object(p_person_id => p_person_id,
7343: p_rec => l_per_rec);
7344:
7345: hr_utility.set_location('nw cache start ' || l_per_rec.effective_start_date ,10);
7346: hr_utility.set_location('nw cache end ' || l_per_rec.effective_end_date ,10);
7347: end if ;
7348:
7349:
7342: ben_person_object.get_object(p_person_id => p_person_id,
7343: p_rec => l_per_rec);
7344:
7345: hr_utility.set_location('nw cache start ' || l_per_rec.effective_start_date ,10);
7346: hr_utility.set_location('nw cache end ' || l_per_rec.effective_end_date ,10);
7347: end if ;
7348:
7349:
7350:
7447: --
7448: elsif p_currepe_row.elig_per_elctbl_chc_id is not null
7449: then
7450: --
7451: hr_utility.set_location( ' else if ',610);
7452: hr_utility.set_location( ' PLIP ID '|| p_currepe_row.plip_id ,610);
7453: l_epe.pgm_id := p_currepe_row.pgm_id;
7454: l_epe.pl_id := p_currepe_row.pl_id;
7455: l_epe.pl_typ_id := p_currepe_row.pl_typ_id;
7448: elsif p_currepe_row.elig_per_elctbl_chc_id is not null
7449: then
7450: --
7451: hr_utility.set_location( ' else if ',610);
7452: hr_utility.set_location( ' PLIP ID '|| p_currepe_row.plip_id ,610);
7453: l_epe.pgm_id := p_currepe_row.pgm_id;
7454: l_epe.pl_id := p_currepe_row.pl_id;
7455: l_epe.pl_typ_id := p_currepe_row.pl_typ_id;
7456: l_epe.oipl_id := p_currepe_row.oipl_id;
7460: l_epe.plip_id := p_currepe_row.plip_id;
7461: l_epe.business_group_id := p_currepe_row.business_group_id;
7462: --
7463: else
7464: hr_utility.set_location( ' in cursor ',610) ;
7465: open c_epe;
7466: fetch c_epe into l_epe;
7467: close c_epe;
7468: end if;
7466: fetch c_epe into l_epe;
7467: close c_epe;
7468: end if;
7469: --
7470: hr_utility.set_location(' oipl id ' || l_epe.oipl_id , 610.3);
7471: hr_utility.set_location( ' PLIP ID '|| l_epe.plip_id ,610);
7472: if l_epe.oipl_id is not null then
7473: ben_comp_object.get_object(p_oipl_id => l_epe.oipl_id
7474: ,p_rec => l_oipl_rec);
7467: close c_epe;
7468: end if;
7469: --
7470: hr_utility.set_location(' oipl id ' || l_epe.oipl_id , 610.3);
7471: hr_utility.set_location( ' PLIP ID '|| l_epe.plip_id ,610);
7472: if l_epe.oipl_id is not null then
7473: ben_comp_object.get_object(p_oipl_id => l_epe.oipl_id
7474: ,p_rec => l_oipl_rec);
7475: end if;
7489: ,p_inst_set => l_inst_set
7490: );
7491: end if;
7492:
7493: hr_utility.set_location ('Prof loop '||l_package,10);
7494: for i in 1..l_inst_set.count
7495: loop
7496: --
7497: begin
7589: --
7590: ben_person_object.get_object(p_person_id => p_person_id, -- FONM 9999
7591: p_rec => l_typ_rec);
7592: --
7593: hr_utility.set_location('l_profile.vrbl_rt_prfl_id -> '||l_profile.vrbl_rt_prfl_id,11);
7594: hr_utility.set_location('l_profile.rt_per_typ_flag -> '||l_profile.rt_per_typ_flag,11);
7595: --
7596: if l_profile.rt_elig_prfl_flag = 'Y' then
7597: hr_utility.set_location('elig_for_profiles',10);
7590: ben_person_object.get_object(p_person_id => p_person_id, -- FONM 9999
7591: p_rec => l_typ_rec);
7592: --
7593: hr_utility.set_location('l_profile.vrbl_rt_prfl_id -> '||l_profile.vrbl_rt_prfl_id,11);
7594: hr_utility.set_location('l_profile.rt_per_typ_flag -> '||l_profile.rt_per_typ_flag,11);
7595: --
7596: if l_profile.rt_elig_prfl_flag = 'Y' then
7597: hr_utility.set_location('elig_for_profiles',10);
7598:
7593: hr_utility.set_location('l_profile.vrbl_rt_prfl_id -> '||l_profile.vrbl_rt_prfl_id,11);
7594: hr_utility.set_location('l_profile.rt_per_typ_flag -> '||l_profile.rt_per_typ_flag,11);
7595: --
7596: if l_profile.rt_elig_prfl_flag = 'Y' then
7597: hr_utility.set_location('elig_for_profiles',10);
7598:
7599: l_eligible :=
7600: ben_evaluate_elig_profiles.eligible
7601: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id
7630: raise g_profile_failed;
7631: --
7632: end if;
7633: end if;
7634: hr_utility.set_location ('Dn elig_for_profiles '||l_package,10);
7635:
7636: if l_profile.rt_per_typ_flag = 'Y' then
7637: hr_utility.set_location('check_per_typ',10);
7638: check_per_typ
7633: end if;
7634: hr_utility.set_location ('Dn elig_for_profiles '||l_package,10);
7635:
7636: if l_profile.rt_per_typ_flag = 'Y' then
7637: hr_utility.set_location('check_per_typ',10);
7638: check_per_typ
7639: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7640: p_person_id => p_person_id,
7641: p_business_group_id => p_business_group_id,
7642: p_effective_date => p_effective_date,
7643: p_lf_evt_ocrd_dt => p_lf_evt_ocrd_dt,
7644: p_person_type => l_typ_rec);
7645: end if;
7646: hr_utility.set_location ('Dn check_per_typ '||l_package,10);
7647: --
7648: -- Now we check these profiles using the required assignment type
7649: --
7650: l_loop_count := 1;
7771: --
7772: end if;
7773: --
7774: -- Bug 6399423
7775: hr_utility.set_location ('l_asg_rec'|| l_asg_rec.assignment_id,534511234);
7776: --
7777: if (l_profile.asmt_to_use_cd <> 'ANY' and
7778: l_asg_rec.assignment_id is null) then
7779: --
7780: raise ben_evaluate_rate_profiles.g_profile_failed;
7781: end if;
7782: --
7783: -- Bug 6399423
7784: hr_utility.set_location ('ASG Profs '||l_package,10);
7785: for l_count in 1..l_loop_count loop
7786: --
7787: begin
7788: --
7796: --
7797: -- Employee Status
7798: --
7799: if l_profile.rt_ee_stat_flag = 'Y' then
7800: hr_utility.set_location('check_ee_stat',10);
7801: check_ee_stat
7802: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7803: p_person_id => p_person_id,
7804: p_business_group_id => p_business_group_id,
7809: --
7810: -- People Group
7811: --
7812: if l_profile.rt_ppl_grp_flag = 'Y' then
7813: hr_utility.set_location('check_people_group',10);
7814: check_people_group
7815: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7816: p_business_group_id => p_business_group_id,
7817: p_effective_date => p_effective_date,
7821: --
7822: -- Hourly/Salary Code
7823: --
7824: if l_profile.rt_hrly_slrd_flag = 'Y' then
7825: hr_utility.set_location('check_hourly_salary',10);
7826: check_hourly_salary
7827: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7828: p_business_group_id => p_business_group_id,
7829: p_effective_date => p_effective_date,
7833: --
7834: -- Bargaining Unit
7835: --
7836: if l_profile.rt_brgng_unit_flag = 'Y' then
7837: hr_utility.set_location('check_brgng_unit',10);
7838: check_brgng_unit
7839: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7840: p_business_group_id => p_business_group_id,
7841: p_effective_date => p_effective_date,
7845: --
7846: -- Labor Union
7847: --
7848: if l_profile.rt_lbr_mmbr_flag = 'Y' then
7849: hr_utility.set_location('check_lbr_union',10);
7850: check_lbr_union
7851: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7852: p_person_id => p_person_id,
7853: p_business_group_id => p_business_group_id,
7858: --
7859: -- Full Time / Part Time
7860: --
7861: if l_profile.rt_fl_tm_pt_tm_flag = 'Y' then
7862: hr_utility.set_location('check_fl_tm_pt',10);
7863: check_fl_tm_pt
7864: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7865: p_person_id => p_person_id,
7866: p_business_group_id => p_business_group_id,
7871: --
7872: -- Work Location
7873: --
7874: if l_profile.rt_wk_loc_flag = 'Y' then
7875: hr_utility.set_location('check_wk_location',10);
7876: check_wk_location
7877: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7878: p_person_id => p_person_id,
7879: p_business_group_id => p_business_group_id,
7884: --
7885: -- Organization
7886: --
7887: if l_profile.rt_org_unit_flag = 'Y' then
7888: hr_utility.set_location('check_org_unit',10);
7889: check_org_unit
7890: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7891: p_person_id => p_person_id,
7892: p_business_group_id => p_business_group_id,
7897: --
7898: -- LOA
7899: --
7900: if l_profile.rt_loa_rsn_flag = 'Y' then
7901: hr_utility.set_location('check_loa_rsn',10);
7902: check_loa_rsn
7903: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7904: p_person_id => p_person_id,
7905: p_business_group_id => p_business_group_id,
7909: --
7910: -- Scheduled Hours
7911: --
7912: if l_profile.rt_schedd_hrs_flag = 'Y' then
7913: hr_utility.set_location('check_sched_hrs',10);
7914: check_sched_hrs
7915: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7916: p_person_id => p_person_id,
7917: p_business_group_id => p_business_group_id,
7933: --
7934: -- Pay Basis
7935: --
7936: if l_profile.rt_py_bss_flag = 'Y' then
7937: hr_utility.set_location('check_py_bss',10);
7938: check_py_bss
7939: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7940: p_person_id => p_person_id,
7941: p_business_group_id => p_business_group_id,
7946: --
7947: -- Grade
7948: --
7949: if l_profile.rt_grd_flag = 'Y' then
7950: hr_utility.set_location('check_grade',10);
7951: check_grade
7952: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7953: p_person_id => p_person_id,
7954: p_business_group_id => p_business_group_id,
7959: --
7960: -- Legal Entity
7961: --
7962: if l_profile.rt_lgl_enty_flag = 'Y' then
7963: hr_utility.set_location('check_lgl_enty',10);
7964: open c_gre(l_asg_rec.soft_coding_keyflex_id);
7965: --
7966: fetch c_gre into l_gre_id;
7967: --
7978: --
7979: -- Payroll
7980: --
7981: if l_profile.rt_pyrl_flag = 'Y' then
7982: hr_utility.set_location('check_pyrl',10);
7983: check_pyrl
7984: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7985: p_person_id => p_person_id,
7986: p_business_group_id => p_business_group_id,
7992: --
7993: -- Job
7994: --
7995: if l_profile.rt_job_flag = 'Y' then
7996: hr_utility.set_location('check_job',10);
7997: check_job
7998: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
7999: p_business_group_id => p_business_group_id,
8000: p_effective_date => p_effective_date,
8005: --
8006: -- Postion
8007: --
8008: if l_profile.rt_pstn_flag = 'Y' then
8009: hr_utility.set_location('check_pstn',10);
8010: check_pstn
8011: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8012: p_business_group_id => p_business_group_id,
8013: p_lf_evt_ocrd_dt => p_lf_evt_ocrd_dt,
8018: --
8019: -- Quartile in Grade
8020: --
8021: if l_profile.rt_qua_in_gr_flag = 'Y' then
8022: hr_utility.set_location('check_qua_in_gr',10);
8023: check_qua_in_gr(p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8024: p_business_group_id => p_business_group_id,
8025: p_person_id => p_person_id,
8026: p_grade_id => l_asg_rec.grade_id,
8033: --
8034: -- Performance Rating
8035: --
8036: if l_profile.rt_perf_rtng_flag = 'Y' then
8037: hr_utility.set_location('check_perf_rtng',10);
8038: check_perf_rtng(p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8039: p_business_group_id => p_business_group_id,
8040: p_assignment_id => l_asg_rec.assignment_id,
8041: p_person_id => p_person_id,
8046: --
8047: -- Rules
8048: --
8049: if l_profile.rt_prfl_rl_flag = 'Y' then
8050: hr_utility.set_location('check_rules',10);
8051: check_rules
8052: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8053: p_business_group_id => p_business_group_id,
8054: p_effective_date => p_effective_date,
8095: --
8096: --
8097: -- PCT Fulltime
8098: --
8099: hr_utility.set_location ('Person Profs '||l_package,10);
8100: if l_profile.rt_pct_fl_tm_flag = 'Y' then
8101: hr_utility.set_location('check_pct_fltm',10);
8102: check_pct_fltm
8103: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8097: -- PCT Fulltime
8098: --
8099: hr_utility.set_location ('Person Profs '||l_package,10);
8100: if l_profile.rt_pct_fl_tm_flag = 'Y' then
8101: hr_utility.set_location('check_pct_fltm',10);
8102: check_pct_fltm
8103: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8104: p_person_id => p_person_id,
8105: p_business_group_id => p_business_group_id,
8117: --
8118: -- Benefits Group
8119: --
8120: if l_profile.rt_benfts_grp_flag = 'Y' then
8121: hr_utility.set_location('check_benefits_group',10);
8122: check_benefits_grp
8123: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8124: p_person_id => p_person_id,
8125: p_business_group_id => p_business_group_id,
8129: end if;
8130: --
8131: -- Age
8132: --
8133: hr_utility.set_location ('DF Profs '||l_package,10);
8134: if l_profile.rt_age_flag = 'Y' then
8135: hr_utility.set_location('check_age',10);
8136: check_age
8137: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id
8131: -- Age
8132: --
8133: hr_utility.set_location ('DF Profs '||l_package,10);
8134: if l_profile.rt_age_flag = 'Y' then
8135: hr_utility.set_location('check_age',10);
8136: check_age
8137: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id
8138: ,p_per_dob => l_per_rec.date_of_birth
8139: ,p_person_id => p_person_id
8152: end if;
8153: --
8154: -- Tobacco
8155: --
8156: hr_utility.set_location ('Tobacco '||l_package,10);
8157: if l_profile.rt_tbco_use_flag = 'Y' then
8158: hr_utility.set_location('check_tobacco',10);
8159: check_tobacco
8160: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8154: -- Tobacco
8155: --
8156: hr_utility.set_location ('Tobacco '||l_package,10);
8157: if l_profile.rt_tbco_use_flag = 'Y' then
8158: hr_utility.set_location('check_tobacco',10);
8159: check_tobacco
8160: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8161: p_business_group_id => p_business_group_id,
8162: p_effective_date => p_effective_date,
8166: end if;
8167: --
8168: -- LOS
8169: --
8170: hr_utility.set_location ('LOS Prof '||l_package,10);
8171: if l_profile.rt_los_flag = 'Y' then
8172: hr_utility.set_location('check_los',10);
8173: check_los
8174: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8168: -- LOS
8169: --
8170: hr_utility.set_location ('LOS Prof '||l_package,10);
8171: if l_profile.rt_los_flag = 'Y' then
8172: hr_utility.set_location('check_los',10);
8173: check_los
8174: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8175: p_person_id => p_person_id,
8176: p_business_group_id => p_business_group_id,
8186: end if;
8187: --
8188: -- Assignment set
8189: if l_profile.rt_asnt_set_flag = 'Y' then
8190: hr_utility.set_location('Assn Set Flag',10);
8191: check_asnt_set
8192: (p_VRBL_RT_PRFL_ID => l_profile.vrbl_rt_prfl_id,
8193: p_business_group_id => p_business_group_id,
8194: p_person_id => p_person_id,
8197: end if;
8198: -- Hours worked
8199: --
8200: if l_profile.rt_hrs_wkd_flag = 'Y' then
8201: hr_utility.set_location('check_hrs_wkd',10);
8202: check_hrs_wkd
8203: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8204: p_person_id => p_person_id,
8205: p_business_group_id => p_business_group_id,
8217: --
8218: -- Postal Code
8219: --
8220: if l_profile.rt_pstl_cd_flag = 'Y' then
8221: hr_utility.set_location('check_zip_code_rng',10);
8222: check_zip_code_rng
8223: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8224: p_person_id => p_person_id,
8225: p_business_group_id => p_business_group_id,
8230: --
8231: -- Service Area
8232: --
8233: if l_profile.rt_svc_area_flag = 'Y' then
8234: hr_utility.set_location('check_service_area',10);
8235: check_service_area
8236: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8237: p_person_id => p_person_id,
8238: p_business_group_id => p_business_group_id,
8242: end if;
8243: --
8244: -- Comp Level
8245: --
8246: hr_utility.set_location ('DF profs '||l_package,10);
8247: if l_profile.rt_comp_lvl_flag = 'Y' then
8248: hr_utility.set_location('check_comp_level',10);
8249: check_comp_level
8250: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8244: -- Comp Level
8245: --
8246: hr_utility.set_location ('DF profs '||l_package,10);
8247: if l_profile.rt_comp_lvl_flag = 'Y' then
8248: hr_utility.set_location('check_comp_level',10);
8249: check_comp_level
8250: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8251: p_person_id => p_person_id,
8252: p_business_group_id => p_business_group_id,
8261: --
8262: -- Combine Age and LOS
8263: --
8264: if l_profile.rt_cmbn_age_los_flag = 'Y' then
8265: hr_utility.set_location('check_age_los',10);
8266: check_age_los
8267: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8268: p_person_id => p_person_id,
8269: p_business_group_id => p_business_group_id,
8279: --
8280: -- Gender
8281: --
8282: if l_profile.rt_gndr_flag = 'Y' then
8283: hr_utility.set_location('check_gender',10);
8284: check_gender
8285: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8286: p_business_group_id => p_business_group_id,
8287: p_effective_date => p_effective_date,
8291: --
8292: -- Check period of enrollment. This is
8293: -- currently only for COBRA.
8294: --
8295: hr_utility.set_location ('COBRA profs '||l_package,10);
8296: if l_profile.rt_poe_flag = 'Y' then
8297: hr_utility.set_location('check_period_of_enrollment',10);
8298: check_period_of_enrollment
8299: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8293: -- currently only for COBRA.
8294: --
8295: hr_utility.set_location ('COBRA profs '||l_package,10);
8296: if l_profile.rt_poe_flag = 'Y' then
8297: hr_utility.set_location('check_period_of_enrollment',10);
8298: check_period_of_enrollment
8299: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8300: p_business_group_id => p_business_group_id,
8301: p_effective_date => p_effective_date,
8308: --
8309: -- Disabled
8310: --
8311: if l_profile.rt_dsbld_flag = 'Y' then
8312: hr_utility.set_location('check_dsbld_cd' || l_per_rec.registered_disabled_flag,10);
8313: check_dsbld_cd
8314: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8315: p_business_group_id => p_business_group_id,
8316: p_effective_date => p_effective_date,
8321: --
8322: -- Opted for Medicare
8323: --
8324: if l_profile.rt_optd_mdcr_flag = 'Y' then
8325: hr_utility.set_location('check_optd_mdcr',10);
8326: check_optd_mdcr
8327: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8328: p_business_group_id => p_business_group_id,
8329: p_effective_date => p_effective_date,
8334: --
8335: -- Leaving Reason
8336: --
8337: if l_profile.rt_lvg_rsn_flag = 'Y' then
8338: hr_utility.set_location('check_lvg_rsn',10);
8339: check_lvg_rsn
8340: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8341: p_business_group_id => p_business_group_id,
8342: p_effective_date => p_effective_date,
8347: --
8348: -- Cobra Qualified Beneficiary
8349: --
8350: if l_profile.rt_cbr_quald_bnf_flag = 'Y' then
8351: hr_utility.set_location('check_cbr_quald_bnf',10);
8352: check_cbr_quald_bnf
8353: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8354: p_business_group_id => p_business_group_id,
8355: p_effective_date => p_effective_date,
8360: --
8361: -- Competency
8362: --
8363: if l_profile.rt_comptncy_flag = 'Y' then
8364: hr_utility.set_location('check_comptncy',10);
8365: check_comptncy
8366: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8367: p_business_group_id => p_business_group_id,
8368: p_person_id => p_person_id ,
8373: --
8374: -- Qualification title
8375: --
8376: if l_profile.rt_qual_titl_flag = 'Y' then
8377: hr_utility.set_location('check_qual_titl',10);
8378: check_qual_titl
8379: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8380: p_business_group_id => p_business_group_id,
8381: p_person_id => p_person_id ,
8386: --
8387: -- Dependent Covered Other Plan
8388: --
8389: if l_profile.rt_dpnt_cvrd_pl_flag = 'Y' then
8390: hr_utility.set_location('check_dpnt_cvrd_othr_pl',10);
8391: check_dpnt_cvrd_othr_pl
8392: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8393: p_business_group_id => p_business_group_id,
8394: p_effective_date => p_effective_date,
8400: --
8401: -- Dependent Covered Other Plan in Program
8402: --
8403: if l_profile.rt_dpnt_cvrd_plip_flag = 'Y' then
8404: hr_utility.set_location('check_dpnt_cvrd_othr_plip',10);
8405: check_dpnt_cvrd_othr_plip
8406: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8407: p_business_group_id => p_business_group_id,
8408: p_effective_date => p_effective_date,
8413: --
8414: -- Dependent Covered Other Plan Type in Program
8415: --
8416: if l_profile.rt_dpnt_cvrd_ptip_flag = 'Y' then
8417: hr_utility.set_location('check_dpnt_cvrd_othr_ptip',10);
8418: check_dpnt_cvrd_othr_ptip
8419: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8420: p_business_group_id => p_business_group_id,
8421: p_effective_date => p_effective_date,
8427: --
8428: -- Dependent Covered Other Program
8429: --
8430: if l_profile.rt_dpnt_cvrd_pgm_flag = 'Y' then
8431: hr_utility.set_location('check_dpnt_cvrd_othr_pgm',10);
8432: check_dpnt_cvrd_othr_pgm
8433: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8434: p_business_group_id => p_business_group_id,
8435: p_effective_date => p_effective_date,
8442: --
8443: -- Eligible for Another Plan
8444: --
8445: if l_profile.rt_prtt_anthr_pl_flag = 'Y' then
8446: hr_utility.set_location('check_prtt_anthr_pl',10);
8447: check_prtt_anthr_pl
8448: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8449: p_business_group_id => p_business_group_id,
8450: -- FONM : as lf_evt_ocrd_dt is not used, it's fine to overload the
8461: --
8462: -- Eligible for Another Plan Type in Program
8463: --
8464: if l_profile.rt_othr_ptip_flag = 'Y' then
8465: hr_utility.set_location('check_othr_ptip',10);
8466: check_othr_ptip
8467: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8468: p_business_group_id => p_business_group_id,
8469: -- FONM : do not overload as the lf_evt_ocrd_dt takes precedence over eff dt.
8476: --
8477: -- Enrolled in Another Plan
8478: --
8479: if l_profile.rt_enrld_pl_flag = 'Y' then
8480: hr_utility.set_location('check_enrld_anthr_pl',10);
8481: check_enrld_anthr_pl
8482: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8483: p_business_group_id => p_business_group_id,
8484: -- FONM : do not overload eff date as determine_date is called.
8492: --
8493: -- Enrolled in Another Option In Plan
8494: --
8495: if l_profile.rt_enrld_oipl_flag = 'Y' then
8496: hr_utility.set_location('check_enrld_anthr_oipl',10);
8497: check_enrld_anthr_oipl
8498: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8499: p_business_group_id => p_business_group_id,
8500: -- FONM : do not overload eff date as determine_date is called.
8508: --
8509: -- Enrolled in Another Plan in Program
8510: --
8511: if l_profile.rt_enrld_plip_flag = 'Y' then
8512: hr_utility.set_location('check_enrld_anthr_plip',10);
8513: check_enrld_anthr_plip
8514: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8515: p_business_group_id => p_business_group_id,
8516: -- FONM : do not overload eff date as determine_date is called.
8523: --
8524: -- Enrolled in Another Plan Type in Program
8525: --
8526: if l_profile.rt_enrld_ptip_flag = 'Y' then
8527: hr_utility.set_location('check_enrld_anthr_ptip',10);
8528: check_enrld_anthr_ptip
8529: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8530: p_business_group_id => p_business_group_id,
8531: -- FONM : do not overload eff date as determine_date is called.
8536: --
8537: -- Enrolled in Another Program
8538: --
8539: if l_profile.rt_enrld_pgm_flag = 'Y' then
8540: hr_utility.set_location('check_enrld_anthr_pgm',10);
8541: check_enrld_anthr_pgm
8542: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8543: p_business_group_id => p_business_group_id,
8544: p_pgm_id => p_pgm_id ,
8551: --
8552: -- Dependent Other Plan Type in Program
8553: --
8554: if l_profile.rt_dpnt_othr_ptip_flag = 'Y' then
8555: hr_utility.set_location('check_dpnt_othr_ptip',10);
8556: check_dpnt_othr_ptip
8557: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8558: p_business_group_id => p_business_group_id,
8559: -- FONM : as lf_evt_ocrd_dt is used, do not overload the
8567: --
8568: -- No Other Coverage
8569: --
8570: if l_profile.rt_no_othr_cvg_flag = 'Y' then
8571: hr_utility.set_location('check_no_othr_cvg',10);
8572: check_no_othr_cvg
8573: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8574: p_business_group_id => p_business_group_id,
8575: p_person_id => p_person_id,
8590: -- of people participating in the comp object.
8591: --
8592: -- Total Number of Participants
8593: --
8594: hr_utility.set_location ('Total profs '||l_package,10);
8595: if l_profile.rt_ttl_prtt_flag = 'Y' then
8596: hr_utility.set_location('check_ttl_prtt',10);
8597: check_ttl_prtt
8598: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8592: -- Total Number of Participants
8593: --
8594: hr_utility.set_location ('Total profs '||l_package,10);
8595: if l_profile.rt_ttl_prtt_flag = 'Y' then
8596: hr_utility.set_location('check_ttl_prtt',10);
8597: check_ttl_prtt
8598: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8599: p_business_group_id => p_business_group_id,
8600: p_effective_date => p_effective_date,
8604: --
8605: -- Total Amount of Coverage
8606: --
8607: if l_profile.rt_ttl_cvg_vol_flag = 'Y' then
8608: hr_utility.set_location('check_ttl_cvg',10);
8609: check_ttl_cvg
8610: (p_vrbl_rt_prfl_id => l_profile.vrbl_rt_prfl_id,
8611: p_business_group_id => p_business_group_id,
8612: p_effective_date => p_effective_date,
8623: --
8624: l_vrbl_rt_prfl_id := l_profile.vrbl_rt_prfl_id;
8625: l_matched_vrbl_prfl := 'Y';
8626: --
8627: hr_utility.set_location ('Load globals '||l_package,10);
8628: if p_all_prfls then
8629: --
8630: hr_utility.set_location ('p_all_prfls on ',20);
8631: --
8626: --
8627: hr_utility.set_location ('Load globals '||l_package,10);
8628: if p_all_prfls then
8629: --
8630: hr_utility.set_location ('p_all_prfls on ',20);
8631: --
8632: -- first time thru procedure where we are keeping track of all
8633: -- the profiles a person matches, without running the ttl-cvg
8634: -- and ttl-prtt's profiles.
8704: else
8705: -- Bug 1211317: changed to use new parm.
8706: if p_use_prfls then
8707: --
8708: hr_utility.set_location ('p_use_globals on ',21);
8709: --
8710: -- our second time thru this procedure where we are
8711: -- determining which profile a person matches with
8712: -- ttl_cvg and ttl_prtt taken into account. Keep track
8791: --
8792: -- If profile failed one of the criteria,
8793: -- go onto next profile.
8794: --
8795: hr_utility.set_location ('g_profile_failed '||l_package,10);
8796: NULL;
8797: --
8798: -- begin bug # 2436338
8799: when g_criteria_failed then
8800: --
8801: -- If profile failed one of the criteria,
8802: -- go onto next profile.
8803: --
8804: hr_utility.set_location ('g_profile_failed '||l_package,10);
8805: NULL;
8806: --
8807: -- end bug # 2436338
8808: end;
8807: -- end bug # 2436338
8808: end;
8809: --
8810: end loop;
8811: hr_utility.set_location ('Dn Prof loop '||l_package,10);
8812: --
8813: if l_matched_vrbl_prfl = 'N' then
8814: --
8815: if p_all_prfls or p_use_globals then
8821: --
8822: g_no_match_cnt := g_no_match_cnt + 1;
8823: g_no_match_cvg := g_no_match_cvg + p_bnft_amt;
8824: --
8825: hr_utility.set_location ('did not match profile :'||
8826: to_char(p_person_id)||' cnt:'||
8827: to_char(g_no_match_cnt),88);
8828: --
8829: end if;
8831: end if;
8832: --
8833: p_vrbl_rt_prfl_id := l_vrbl_rt_prfl_id;
8834: --
8835: hr_utility.set_location ('Leaving '||l_package,99);
8836: --
8837: end main;
8838: --
8839: end ben_evaluate_rate_profiles;