143: l_dummy_v varchar2(30);
144: l_dummy_n number;
145: Begin
146:
147: hr_utility.set_location ('Entering ' ||l_package,10);
148:
149: ben_determine_date.rate_and_coverage_dates
150: (p_which_dates_cd => nvl(p_calc_type,'B')
151: ,p_date_mandatory_flag => 'N'
177:
178: p_cvg_strt_dt := l_enrt_cvg_strt_dt ;
179: p_rt_strt_dt := l_rt_strt_dt ;
180:
181: hr_utility.set_location ('Leaving ' ||l_package,10);
182:
183: End calc_fonm_dates ;
184:
185:
265: -- bof FONM
266: l_fonm_date date ;
267: --eof FONM
268: begin
269: hr_utility.set_location ('Entering ' ||l_package,10);
270: hr_utility.set_location ('l_apr.mlt_cd -> '||p_mlt_cd,10);
271: --
272: -- get values for rules and limit checking
273: --bof FONM
266: l_fonm_date date ;
267: --eof FONM
268: begin
269: hr_utility.set_location ('Entering ' ||l_package,10);
270: hr_utility.set_location ('l_apr.mlt_cd -> '||p_mlt_cd,10);
271: --
272: -- get values for rules and limit checking
273: --bof FONM
274: l_fonm_date := nvl(p_lf_evt_ocrd_dt,p_effective_date ) ;
298: --
299: -- Flat-Fixed
300: --
301: if p_mlt_cd = 'FLFX' then
302: hr_utility.set_location ('in flfx',20);
303: p_computed_val := p_prem_val;
304: --
305: -- Multiple of Coverage
306: --
304: --
305: -- Multiple of Coverage
306: --
307: elsif p_mlt_cd = 'CVG' then
308: hr_utility.set_location ('in cvg',30);
309: if p_bnft_amt is null then
310: if p_enrt_bnft_id is null then
311: hr_utility.set_location ('BEN_91579_BENACPRM_INPT_EB',40);
312: fnd_message.set_name('BEN','BEN_91579_BENACPRM_INPT_EB');
307: elsif p_mlt_cd = 'CVG' then
308: hr_utility.set_location ('in cvg',30);
309: if p_bnft_amt is null then
310: if p_enrt_bnft_id is null then
311: hr_utility.set_location ('BEN_91579_BENACPRM_INPT_EB',40);
312: fnd_message.set_name('BEN','BEN_91579_BENACPRM_INPT_EB');
313: fnd_message.set_token('PROC',l_package);
314: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
315: fnd_message.set_token('PGM_ID',to_char(p_pgm_id));
343: --
344: elsif p_mlt_cd = 'RL' then
345: --
346: -- Call formula initialise routine
347: hr_utility.set_location ('in rl',10);
348:
349: l_outputs := benutils.formula
350: (p_formula_id => p_val_calc_rl,
351: p_effective_date => nvl(p_lf_evt_ocrd_dt,p_effective_date),
371:
372: elsif p_mlt_cd = 'NSVU' then
373: -- Do nothing for NO STANDARD VALUE USED
374: -- Value used comes from Variable rates below.
375: hr_utility.set_location ('in nsvu',10);
376: null;
377: else
378: hr_utility.set_location ('BEN_91584_BENACPRM_MLT_CD',50);
379: fnd_message.set_name('BEN','BEN_91584_BENACPRM_MLT_CD');
374: -- Value used comes from Variable rates below.
375: hr_utility.set_location ('in nsvu',10);
376: null;
377: else
378: hr_utility.set_location ('BEN_91584_BENACPRM_MLT_CD',50);
379: fnd_message.set_name('BEN','BEN_91584_BENACPRM_MLT_CD');
380: fnd_message.set_token('PROC',l_package);
381: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
382: fnd_message.set_token('PGM_ID',to_char(p_pgm_id));
405: p_rndg_rl is not null) and
406: p_perform_rounding_flg = true and
407: p_computed_val is not null and
408: nvl(l_vr_trtmt_cd, 'XXXX') <> 'RPLC' then
409: hr_utility.set_location ('rounding ',70);
410: p_computed_val := benutils.do_rounding
411: (p_rounding_cd => p_rndg_cd,
412: p_rounding_rl => p_rndg_rl,
413: p_value => p_computed_val,
416: end if;
417: --
418: -- check upr/lwr limit
419: --
420: hr_utility.set_location('check the limit of prm ',20);
421: benutils.limit_checks
422: (p_upr_lmt_val => p_upr_lmt_val,
423: p_lwr_lmt_val => p_lwr_lmt_val,
424: p_upr_lmt_calc_rl => p_upr_lmt_calc_rl,
473: p_ultmt_lwr_lmt => l_ultmt_lwr_lmt,
474: p_ultmt_upr_lmt_calc_rl => l_ultmt_upr_lmt_calc_rl,
475: p_ultmt_lwr_lmt_calc_rl => l_ultmt_lwr_lmt_calc_rl);
476: --
477: hr_utility.set_location ('after variable rates',60);
478: hr_utility.set_location ('l_vr_trtmt_cd -> '||l_vr_trtmt_cd,60);
479: hr_utility.set_location ('l_vr_val -> '||l_variable_val,60);
480: hr_utility.set_location ('l_val -> '||p_computed_val,60);
481:
474: p_ultmt_upr_lmt_calc_rl => l_ultmt_upr_lmt_calc_rl,
475: p_ultmt_lwr_lmt_calc_rl => l_ultmt_lwr_lmt_calc_rl);
476: --
477: hr_utility.set_location ('after variable rates',60);
478: hr_utility.set_location ('l_vr_trtmt_cd -> '||l_vr_trtmt_cd,60);
479: hr_utility.set_location ('l_vr_val -> '||l_variable_val,60);
480: hr_utility.set_location ('l_val -> '||p_computed_val,60);
481:
482: if p_computed_val is null then
475: p_ultmt_lwr_lmt_calc_rl => l_ultmt_lwr_lmt_calc_rl);
476: --
477: hr_utility.set_location ('after variable rates',60);
478: hr_utility.set_location ('l_vr_trtmt_cd -> '||l_vr_trtmt_cd,60);
479: hr_utility.set_location ('l_vr_val -> '||l_variable_val,60);
480: hr_utility.set_location ('l_val -> '||p_computed_val,60);
481:
482: if p_computed_val is null then
483: l_vr_trtmt_cd := 'RPLC';
476: --
477: hr_utility.set_location ('after variable rates',60);
478: hr_utility.set_location ('l_vr_trtmt_cd -> '||l_vr_trtmt_cd,60);
479: hr_utility.set_location ('l_vr_val -> '||l_variable_val,60);
480: hr_utility.set_location ('l_val -> '||p_computed_val,60);
481:
482: if p_computed_val is null then
483: l_vr_trtmt_cd := 'RPLC';
484: end if;
506:
507: if l_ultmt_upr_lmt is not null or l_ultmt_lwr_lmt is not null
508: OR l_ultmt_upr_lmt_calc_rl is not null or l_ultmt_lwr_lmt_calc_rl is not null then
509: --- if ultmate limit defined in VAPRO chek the limit
510: hr_utility.set_location('calling limit for ultmt of prem',393);
511: hr_utility.set_location('upper '|| l_ultmt_upr_lmt ||' Lower' || l_ultmt_lwr_lmt,393);
512: hr_utility.set_location('ammount '|| p_computed_val ,393);
513: benutils.limit_checks
514: (p_upr_lmt_val => l_ultmt_upr_lmt,
507: if l_ultmt_upr_lmt is not null or l_ultmt_lwr_lmt is not null
508: OR l_ultmt_upr_lmt_calc_rl is not null or l_ultmt_lwr_lmt_calc_rl is not null then
509: --- if ultmate limit defined in VAPRO chek the limit
510: hr_utility.set_location('calling limit for ultmt of prem',393);
511: hr_utility.set_location('upper '|| l_ultmt_upr_lmt ||' Lower' || l_ultmt_lwr_lmt,393);
512: hr_utility.set_location('ammount '|| p_computed_val ,393);
513: benutils.limit_checks
514: (p_upr_lmt_val => l_ultmt_upr_lmt,
515: p_lwr_lmt_val => l_ultmt_lwr_lmt,
508: OR l_ultmt_upr_lmt_calc_rl is not null or l_ultmt_lwr_lmt_calc_rl is not null then
509: --- if ultmate limit defined in VAPRO chek the limit
510: hr_utility.set_location('calling limit for ultmt of prem',393);
511: hr_utility.set_location('upper '|| l_ultmt_upr_lmt ||' Lower' || l_ultmt_lwr_lmt,393);
512: hr_utility.set_location('ammount '|| p_computed_val ,393);
513: benutils.limit_checks
514: (p_upr_lmt_val => l_ultmt_upr_lmt,
515: p_lwr_lmt_val => l_ultmt_lwr_lmt,
516: p_upr_lmt_calc_rl => l_ultmt_upr_lmt_calc_rl,
527: p_ler_id => p_ler_id,
528: p_state => l_state.region_2,
529: p_elig_per_elctbl_chc_id => p_elig_per_elctbl_chc_id,
530: p_val => p_computed_val);
531: hr_utility.set_location('ammount '|| p_computed_val ,393);
532:
533: end if ;
534: end if;
535: --
546: p_rndg_rl is not null) and
547: p_perform_rounding_flg = true and
548: p_computed_val is not null and
549: nvl(l_vr_trtmt_cd, 'XXXX') <> 'RPLC' then
550: hr_utility.set_location ('rounding ',70);
551: p_computed_val := benutils.do_rounding
552: (p_rounding_cd => p_rndg_cd,
553: p_rounding_rl => p_rndg_rl,
554: p_value => p_computed_val,
577: p_elig_per_elctbl_chc_id => p_elig_per_elctbl_chc_id,
578: p_val => p_computed_val);
579: */
580:
581: hr_utility.set_location ('Leaving '||l_package,99);
582:
583: end compute_premium;
584: --------------------------------------------------------------------------------
585: -- MAIN
728: -- Eof FONM
729:
730: BEGIN
731: --
732: hr_utility.set_location ('Entering '||l_package,10);
733: hr_utility.set_location ('p_person_id : '||p_person_id ,10);
734: hr_utility.set_location ('p_effective_date : '||p_effective_date ,10);
735: hr_utility.set_location ('p_lf_evt_ocrd_dt : '||p_lf_evt_ocrd_dt ,10);
736: hr_utility.set_location ('p_pgm_id : '||p_pgm_id ,10);
729:
730: BEGIN
731: --
732: hr_utility.set_location ('Entering '||l_package,10);
733: hr_utility.set_location ('p_person_id : '||p_person_id ,10);
734: hr_utility.set_location ('p_effective_date : '||p_effective_date ,10);
735: hr_utility.set_location ('p_lf_evt_ocrd_dt : '||p_lf_evt_ocrd_dt ,10);
736: hr_utility.set_location ('p_pgm_id : '||p_pgm_id ,10);
737: hr_utility.set_location ('p_pl_id : '||p_pl_id ,10);
730: BEGIN
731: --
732: hr_utility.set_location ('Entering '||l_package,10);
733: hr_utility.set_location ('p_person_id : '||p_person_id ,10);
734: hr_utility.set_location ('p_effective_date : '||p_effective_date ,10);
735: hr_utility.set_location ('p_lf_evt_ocrd_dt : '||p_lf_evt_ocrd_dt ,10);
736: hr_utility.set_location ('p_pgm_id : '||p_pgm_id ,10);
737: hr_utility.set_location ('p_pl_id : '||p_pl_id ,10);
738: hr_utility.set_location ('p_oipl_id : '||p_oipl_id ,10);
731: --
732: hr_utility.set_location ('Entering '||l_package,10);
733: hr_utility.set_location ('p_person_id : '||p_person_id ,10);
734: hr_utility.set_location ('p_effective_date : '||p_effective_date ,10);
735: hr_utility.set_location ('p_lf_evt_ocrd_dt : '||p_lf_evt_ocrd_dt ,10);
736: hr_utility.set_location ('p_pgm_id : '||p_pgm_id ,10);
737: hr_utility.set_location ('p_pl_id : '||p_pl_id ,10);
738: hr_utility.set_location ('p_oipl_id : '||p_oipl_id ,10);
739: hr_utility.set_location ('p_pl_typ_id : '||p_pl_typ_id ,10);
732: hr_utility.set_location ('Entering '||l_package,10);
733: hr_utility.set_location ('p_person_id : '||p_person_id ,10);
734: hr_utility.set_location ('p_effective_date : '||p_effective_date ,10);
735: hr_utility.set_location ('p_lf_evt_ocrd_dt : '||p_lf_evt_ocrd_dt ,10);
736: hr_utility.set_location ('p_pgm_id : '||p_pgm_id ,10);
737: hr_utility.set_location ('p_pl_id : '||p_pl_id ,10);
738: hr_utility.set_location ('p_oipl_id : '||p_oipl_id ,10);
739: hr_utility.set_location ('p_pl_typ_id : '||p_pl_typ_id ,10);
740: hr_utility.set_location ('p_per_in_ler_id : '||p_per_in_ler_id ,10);
733: hr_utility.set_location ('p_person_id : '||p_person_id ,10);
734: hr_utility.set_location ('p_effective_date : '||p_effective_date ,10);
735: hr_utility.set_location ('p_lf_evt_ocrd_dt : '||p_lf_evt_ocrd_dt ,10);
736: hr_utility.set_location ('p_pgm_id : '||p_pgm_id ,10);
737: hr_utility.set_location ('p_pl_id : '||p_pl_id ,10);
738: hr_utility.set_location ('p_oipl_id : '||p_oipl_id ,10);
739: hr_utility.set_location ('p_pl_typ_id : '||p_pl_typ_id ,10);
740: hr_utility.set_location ('p_per_in_ler_id : '||p_per_in_ler_id ,10);
741: hr_utility.set_location ('p_bnft_amt : '||p_bnft_amt ,10);
734: hr_utility.set_location ('p_effective_date : '||p_effective_date ,10);
735: hr_utility.set_location ('p_lf_evt_ocrd_dt : '||p_lf_evt_ocrd_dt ,10);
736: hr_utility.set_location ('p_pgm_id : '||p_pgm_id ,10);
737: hr_utility.set_location ('p_pl_id : '||p_pl_id ,10);
738: hr_utility.set_location ('p_oipl_id : '||p_oipl_id ,10);
739: hr_utility.set_location ('p_pl_typ_id : '||p_pl_typ_id ,10);
740: hr_utility.set_location ('p_per_in_ler_id : '||p_per_in_ler_id ,10);
741: hr_utility.set_location ('p_bnft_amt : '||p_bnft_amt ,10);
742: hr_utility.set_location ('p_business_group_id : '||p_business_group_id,10);
735: hr_utility.set_location ('p_lf_evt_ocrd_dt : '||p_lf_evt_ocrd_dt ,10);
736: hr_utility.set_location ('p_pgm_id : '||p_pgm_id ,10);
737: hr_utility.set_location ('p_pl_id : '||p_pl_id ,10);
738: hr_utility.set_location ('p_oipl_id : '||p_oipl_id ,10);
739: hr_utility.set_location ('p_pl_typ_id : '||p_pl_typ_id ,10);
740: hr_utility.set_location ('p_per_in_ler_id : '||p_per_in_ler_id ,10);
741: hr_utility.set_location ('p_bnft_amt : '||p_bnft_amt ,10);
742: hr_utility.set_location ('p_business_group_id : '||p_business_group_id,10);
743: -- since the premium called out side of compobject loop
736: hr_utility.set_location ('p_pgm_id : '||p_pgm_id ,10);
737: hr_utility.set_location ('p_pl_id : '||p_pl_id ,10);
738: hr_utility.set_location ('p_oipl_id : '||p_oipl_id ,10);
739: hr_utility.set_location ('p_pl_typ_id : '||p_pl_typ_id ,10);
740: hr_utility.set_location ('p_per_in_ler_id : '||p_per_in_ler_id ,10);
741: hr_utility.set_location ('p_bnft_amt : '||p_bnft_amt ,10);
742: hr_utility.set_location ('p_business_group_id : '||p_business_group_id,10);
743: -- since the premium called out side of compobject loop
744: -- global variable can not be used to determine the fonm mode
737: hr_utility.set_location ('p_pl_id : '||p_pl_id ,10);
738: hr_utility.set_location ('p_oipl_id : '||p_oipl_id ,10);
739: hr_utility.set_location ('p_pl_typ_id : '||p_pl_typ_id ,10);
740: hr_utility.set_location ('p_per_in_ler_id : '||p_per_in_ler_id ,10);
741: hr_utility.set_location ('p_bnft_amt : '||p_bnft_amt ,10);
742: hr_utility.set_location ('p_business_group_id : '||p_business_group_id,10);
743: -- since the premium called out side of compobject loop
744: -- global variable can not be used to determine the fonm mode
745: -- use the epe fonmv cvg date used for the purpose
738: hr_utility.set_location ('p_oipl_id : '||p_oipl_id ,10);
739: hr_utility.set_location ('p_pl_typ_id : '||p_pl_typ_id ,10);
740: hr_utility.set_location ('p_per_in_ler_id : '||p_per_in_ler_id ,10);
741: hr_utility.set_location ('p_bnft_amt : '||p_bnft_amt ,10);
742: hr_utility.set_location ('p_business_group_id : '||p_business_group_id,10);
743: -- since the premium called out side of compobject loop
744: -- global variable can not be used to determine the fonm mode
745: -- use the epe fonmv cvg date used for the purpose
746:
748:
749: -- Edit to ensure that the input p_person_id has a value
750: --
751: If (p_person_id is null) then
752: hr_utility.set_location ('BEN_91574_BENACPRM_INPT_PRSN',20);
753: fnd_message.set_name('BEN','BEN_91574_BENACPRM_INPT_PRSN');
754: fnd_message.set_token('PROC',l_package);
755: fnd_message.set_token('PGM_ID',to_char(p_pgm_id));
756: fnd_message.set_token('PL_TYP_ID',to_char(p_pl_typ_id));
764: --
765: -- Edit to insure that the input p_effective_date has a value
766: --
767: If (p_effective_date is null) then
768: hr_utility.set_location ('BEN_91575_BENACPRM_INPT_EFFDT',30);
769: fnd_message.set_name('BEN','BEN_91575_BENACPRM_INPT_EFFDT');
770: fnd_message.set_token('PROC',l_package);
771: fnd_message.set_token('PERSON_ID',to_char(p_person_id));
772: fnd_message.set_token('PGM_ID',to_char(p_pgm_id));
815: --
816: l_epr_elenum := 1;
817: --
818: for epe_elenum in l_currepe_set.first..l_currepe_set.last loop
819: hr_utility.set_location (' St EPE CORVF loop ',40);
820: --
821: -- Set the electable choice context variable
822: --
823: ben_epe_cache.g_currepe_row := l_currepe_set(epe_elenum);
821: -- Set the electable choice context variable
822: --
823: ben_epe_cache.g_currepe_row := l_currepe_set(epe_elenum);
824: --
825: hr_utility.set_location ('loop choices -> '||l_currepe_set(epe_elenum).elig_per_elctbl_chc_id,50);
826:
827: -- BOF FONM
828: l_fonm_cvg_strt_dt := null ;
829: l_fonm_rt_strt_dt := null ;
835: l_FONM_date := nvl(p_lf_evt_ocrd_dt, p_effective_date) ;
836: ben_manage_life_events.g_fonm_cvg_strt_dt := null ;
837: ben_manage_life_events.fonm := 'N' ;
838: end if ;
839: hr_utility.set_location ('premium fonm -> '||l_FONM_flag,50);
840:
841: if l_FONM_flag = 'Y' then
842:
843: if l_currepe_set(epe_elenum).fonm_cvg_strt_dt is not null then
862: end if ;
863: */
864:
865: end if ;
866: hr_utility.set_location ('g_fonm_cvg_strt_dt '||ben_manage_life_events.g_fonm_cvg_strt_dt,50);
867: -- EOF FONM
868:
869: -- l_enrt_bnft_id := l_currepe_set(epe_elenum).enrt_bnft_id;
870: -- l_coverage_value := null;
869: -- l_enrt_bnft_id := l_currepe_set(epe_elenum).enrt_bnft_id;
870: -- l_coverage_value := null;
871:
872: if l_currepe_set(epe_elenum).oipl_id is not NULL then
873: hr_utility.set_location ('getting apr_oipl -> '||l_currepe_set(epe_elenum).oipl_id,60);
874: -- FONM l_fonm_date send as param
875: open c_apr_oipl(l_currepe_set(epe_elenum).oipl_id,l_FONM_date);
876: fetch c_apr_oipl into l_apr;
877: if c_apr_oipl%notfound then
877: if c_apr_oipl%notfound then
878: --
879: -- no actual premiums for this oipl
880: --
881: hr_utility.set_location ('apr_oipl -> '||l_currepe_set(epe_elenum).oipl_id||' <- not found',70);
882: close c_apr_oipl;
883: l_ap_found := false;
884: else
885: -- FONM l_fonm_date send as param
887: fetch c_opt into l_opt;
888: close c_opt;
889: end if;
890: elsif l_currepe_set(epe_elenum).pl_id is not NULL then
891: hr_utility.set_location ('getting apr_pl -> '||l_currepe_set(epe_elenum).pl_id,80);
892: -- FONM l_fonm_date send as param
893: open c_apr_pl(l_currepe_set(epe_elenum).pl_id,l_FONM_date);
894: fetch c_apr_pl into l_apr;
895: if c_apr_pl%notfound then
895: if c_apr_pl%notfound then
896: --
897: -- no actual premiums for this pl
898: --
899: hr_utility.set_location ('apr_pl -> '||l_currepe_set(epe_elenum).pl_id||' <- not found',90);
900: close c_apr_pl;
901: l_ap_found := false;
902: end if;
903: else
905: end if;
906: --
907: -- loop through all actl prem for this elctbl_chc
908: --
909: hr_utility.set_location ('FONM CVG DATE -> '||l_fonm_date ,90);
910: hr_utility.set_location ('FONM Rate DATE ->'||l_fonm_rt_strt_dt ,90);
911: if l_ap_found then
912:
913:
906: --
907: -- loop through all actl prem for this elctbl_chc
908: --
909: hr_utility.set_location ('FONM CVG DATE -> '||l_fonm_date ,90);
910: hr_utility.set_location ('FONM Rate DATE ->'||l_fonm_rt_strt_dt ,90);
911: if l_ap_found then
912:
913:
914: -- fonm caching validation for premium
917: p_rec => l_fonm_per_rec);
918: if not nvl(l_fonm_cvg_strt_dt,l_FONM_date ) between l_fonm_per_rec.effective_start_date
919: and l_fonm_per_rec.effective_end_date then
920:
921: hr_utility.set_location('cache clearence ' || l_package ,10);
922: ben_use_cvg_rt_date.fonm_clear_down_cache;
923: else
924: ben_person_object.get_object(p_person_id => p_person_id,
925: p_rec => l_fonm_ass_rec);
924: ben_person_object.get_object(p_person_id => p_person_id,
925: p_rec => l_fonm_ass_rec);
926: if not nvl(l_fonm_cvg_strt_dt,l_FONM_date ) between l_fonm_ass_rec.effective_start_date
927: and l_fonm_ass_rec.effective_end_date then
928: hr_utility.set_location('cache clearence ' || l_package ,10);
929: ben_use_cvg_rt_date.fonm_clear_down_cache;
930: end if ;
931: end if ;
932: --
931: end if ;
932: --
933: --
934: loop
935: hr_utility.set_location (l_package||' St EPE AP loop ',100);
936: if l_currepe_set(epe_elenum).oipl_id is not null then
937: exit when c_apr_oipl%notfound;
938: elsif l_currepe_set(epe_elenum).pl_id is not null then
939: exit when c_apr_pl%notfound;
937: exit when c_apr_oipl%notfound;
938: elsif l_currepe_set(epe_elenum).pl_id is not null then
939: exit when c_apr_pl%notfound;
940: end if;
941: --hr_utility.set_location ('l_apr.actl_prem_id->'||l_apr.actl_prem_id,110);
942: -- hr_utility.set_location ('l_apr.prem_asnmt_cd -> '||l_apr.prem_asnmt_cd,110);
943: -- hr_utility.set_location ('l_apr.mlt_cd -> '||l_apr.mlt_cd,110);
944:
945: -- if l_apr.prem_asnmt_cd = 'ENRT' then
938: elsif l_currepe_set(epe_elenum).pl_id is not null then
939: exit when c_apr_pl%notfound;
940: end if;
941: --hr_utility.set_location ('l_apr.actl_prem_id->'||l_apr.actl_prem_id,110);
942: -- hr_utility.set_location ('l_apr.prem_asnmt_cd -> '||l_apr.prem_asnmt_cd,110);
943: -- hr_utility.set_location ('l_apr.mlt_cd -> '||l_apr.mlt_cd,110);
944:
945: -- if l_apr.prem_asnmt_cd = 'ENRT' then
946: compute_premium
939: exit when c_apr_pl%notfound;
940: end if;
941: --hr_utility.set_location ('l_apr.actl_prem_id->'||l_apr.actl_prem_id,110);
942: -- hr_utility.set_location ('l_apr.prem_asnmt_cd -> '||l_apr.prem_asnmt_cd,110);
943: -- hr_utility.set_location ('l_apr.mlt_cd -> '||l_apr.mlt_cd,110);
944:
945: -- if l_apr.prem_asnmt_cd = 'ENRT' then
946: compute_premium
947: (p_person_id => p_person_id,
983: l_comp_prem_idx := l_comp_prem_idx + 1;
984: g_computed_prem_tbl(l_comp_prem_idx).actl_prem_id := l_apr.actl_prem_id;
985: g_computed_prem_tbl(l_comp_prem_idx).val := l_val;
986: --
987: hr_utility.set_location ('Premium Count ' || l_comp_prem_idx,120);
988: hr_utility.set_location ('actl_prem_id ' || l_apr.actl_prem_id,120);
989: hr_utility.set_location ('Premium Value ' || l_val,120);
990: --
991: -- write enrt_prem record
984: g_computed_prem_tbl(l_comp_prem_idx).actl_prem_id := l_apr.actl_prem_id;
985: g_computed_prem_tbl(l_comp_prem_idx).val := l_val;
986: --
987: hr_utility.set_location ('Premium Count ' || l_comp_prem_idx,120);
988: hr_utility.set_location ('actl_prem_id ' || l_apr.actl_prem_id,120);
989: hr_utility.set_location ('Premium Value ' || l_val,120);
990: --
991: -- write enrt_prem record
992: --
985: g_computed_prem_tbl(l_comp_prem_idx).val := l_val;
986: --
987: hr_utility.set_location ('Premium Count ' || l_comp_prem_idx,120);
988: hr_utility.set_location ('actl_prem_id ' || l_apr.actl_prem_id,120);
989: hr_utility.set_location ('Premium Value ' || l_val,120);
990: --
991: -- write enrt_prem record
992: --
993: hr_utility.set_location ('writing enrt_prem ',120);
989: hr_utility.set_location ('Premium Value ' || l_val,120);
990: --
991: -- write enrt_prem record
992: --
993: hr_utility.set_location ('writing enrt_prem ',120);
994: --
995: -- Add enrt prem row to the varray
996: --
997: l_val_va.extend(1);
1084: --
1085: l_epr_elenum := l_epr_elenum+1;
1086:
1087: -- end if;
1088: hr_utility.set_location ('get next pl or oipl and loop back',130);
1089: if l_currepe_set(epe_elenum).oipl_id is not null then
1090: hr_utility.set_location ('next c_apr_oipl for oipl_id -> '||l_currepe_set(epe_elenum).oipl_id,130);
1091: fetch c_apr_oipl into l_apr;
1092: else
1086:
1087: -- end if;
1088: hr_utility.set_location ('get next pl or oipl and loop back',130);
1089: if l_currepe_set(epe_elenum).oipl_id is not null then
1090: hr_utility.set_location ('next c_apr_oipl for oipl_id -> '||l_currepe_set(epe_elenum).oipl_id,130);
1091: fetch c_apr_oipl into l_apr;
1092: else
1093: hr_utility.set_location ('next c_apr_pl for pl_id -> '||l_currepe_set(epe_elenum).pl_id,130);
1094: fetch c_apr_pl into l_apr;
1089: if l_currepe_set(epe_elenum).oipl_id is not null then
1090: hr_utility.set_location ('next c_apr_oipl for oipl_id -> '||l_currepe_set(epe_elenum).oipl_id,130);
1091: fetch c_apr_oipl into l_apr;
1092: else
1093: hr_utility.set_location ('next c_apr_pl for pl_id -> '||l_currepe_set(epe_elenum).pl_id,130);
1094: fetch c_apr_pl into l_apr;
1095: end if;
1096: hr_utility.set_location ('AFTER FETCH',140);
1097:
1092: else
1093: hr_utility.set_location ('next c_apr_pl for pl_id -> '||l_currepe_set(epe_elenum).pl_id,130);
1094: fetch c_apr_pl into l_apr;
1095: end if;
1096: hr_utility.set_location ('AFTER FETCH',140);
1097:
1098: end loop;
1099:
1100: end if;
1112: if p_mode in ('U','R') then
1113: --
1114: FOR i IN l_elig_per_elctbl_chc_id_va.FIRST .. l_elig_per_elctbl_chc_id_va.LAST loop
1115: --
1116: hr_utility.set_location(l_elig_per_elctbl_chc_id_va(i)||' '||l_enrt_bnft_id_va(i)||'actual'||l_actl_prem_id_va(i),111);
1117: l_enrt_prem_id := null;
1118: l_enrt_prem_id := ben_manage_unres_life_events.epr_exists
1119: (l_elig_per_elctbl_chc_id_va(i),
1120: l_enrt_bnft_id_va(i),
1332: -- Clear epe context row
1333: --
1334: ben_epe_cache.init_context_pileperow;
1335: --
1336: hr_utility.set_location ('Leaving '||l_package,99);
1337: end main;
1338: end ben_determine_actual_premium;