72: 24-Sep-09 stee 115.37 Bug 8685338 : Removed the exception handling when a rule fails.
73: 01-Jan-12 amnaraya 120.6.12000000.12 Enh 13478736: Broke dual Maintenance from 11i - 12.0B
74: Implemented the logic for newly added Assignment Types CWAO, EAAO, ECWA for
75: OLM Enh. OLM will always pass the correct assignment_id for evaluating the eligibility
76: so created a new procedure get_assgn_object in ben_person_object for fetching the assignment
77: details by passing the person_id and assignment_id.
78: 06-Mar-12 velvanop 120.6.12000000.13 Enh Bug 13809302: Evaluate the Eligibility Profiles attached to the Communication and Life Event. Added new param p_source
79: to function Eligible. If the param is 'C' or 'L', evaluate the eligibility profiles attached under Related coverages tab.
80: */
2553: p_business_group_id in number,
2554: p_score_compute_mode in boolean default false,
2555: p_profile_score_tab in out nocopy scoreTab,
2556: p_effective_date in date,
2557: p_per_per_typ in ben_person_object.
2558: g_cache_typ_table) is
2559: --
2560: l_proc varchar2(100) := g_package||'check_per_typ_elig';
2561: --
3854: --
3855: hr_utility.set_location('Entering : '||l_proc,10);
3856: --
3857: if p_postal_code is null then
3858: ben_person_object.get_object(p_person_id => p_person_id,
3859: p_rec => l_pad_rec);
3860: else
3861: l_pad_rec.postal_code := p_postal_code;
3862: end if;
3999: -- Getting eligibility profile zip code range by eligibility profile
4000: --
4001: --
4002: if p_postal_code is null then
4003: ben_person_object.get_object(p_person_id => p_person_id,
4004: p_rec => l_pad_rec);
4005: else
4006: l_pad_rec.postal_code := p_postal_code;
4007: end if;
4958: else
4959: --
4960: /* Start of Changes for WWBUG: 2141209 */
4961: if p_assignment_id is not null then
4962: ben_person_object.get_object(p_assignment_id => p_assignment_id,
4963: p_rec => l_aei_rec);
4964: --
4965: l_ok1 := nvl((nvl(l_aei_rec.aei_information11,'-1') =
4966: l_inst_dets(l_insttorrw_num).absence_attendance_type_id),FALSE);
5568: ,p_inst_count => l_inst_count);
5569: --
5570: if l_inst_count > 0 then
5571: --
5572: ben_person_object.get_object(p_person_id => p_person_id,
5573: p_rec => l_ass_rec);
5574: --
5575: for l_count in l_inst_dets.first .. l_inst_dets.last loop
5576: --
5897: -- =========
5898: -- 1) Grab all profiles for this eligibility profile id
5899: -- 2) Check that the flag corresponds to the person record. If not error.
5900: --
5901: ben_person_object.get_object(p_person_id => p_person_id,
5902: p_rec => l_rec);
5903: --
5904: for l_insttorrw_num in l_inst_dets.first .. l_inst_dets.last loop
5905: --
5972: -- 2) If the leaving reason code is excluded then person is not eligible
5973: -- 3) If the leaving reason code is not excluded then person is eligible.
5974: --
5975: if p_leaving_reason is null then
5976: ben_person_object.get_object(p_person_id => p_person_id,
5977: p_rec => l_rec);
5978: else
5979: l_rec.leaving_reason := p_leaving_reason;
5980: end if;
6089: -- 1) Grab all profiles for this eligibility profile id
6090: -- 2) If the leaving reason code is excluded then person is not eligible
6091: -- 3) If the leaving reason code is not excluded then person is eligible.
6092: --
6093: ben_person_object.get_object(p_person_id => p_person_id,
6094: p_rec => l_rec);
6095: --
6096: for l_insttorrw_num in l_inst_dets.first .. l_inst_dets.last loop
6097: --
8931: l_pil_row ben_per_in_ler%rowtype;
8932: --
8933: l_cagrelig_cnt pls_integer;
8934: l_pl_typ_id number;
8935: l_typ_rec ben_person_object.g_cache_typ_table;
8936: l_appass_rec ben_person_object.g_cache_ass_table;
8937: l_comp_obj_tree_row ben_manage_life_events.g_cache_proc_objects_rec;
8938: l_comp_rec ben_derive_part_and_rate_facts.g_cache_structure;
8939: l_oiplip_rec ben_derive_part_and_rate_facts.g_cache_structure;
8932: --
8933: l_cagrelig_cnt pls_integer;
8934: l_pl_typ_id number;
8935: l_typ_rec ben_person_object.g_cache_typ_table;
8936: l_appass_rec ben_person_object.g_cache_ass_table;
8937: l_comp_obj_tree_row ben_manage_life_events.g_cache_proc_objects_rec;
8938: l_comp_rec ben_derive_part_and_rate_facts.g_cache_structure;
8939: l_oiplip_rec ben_derive_part_and_rate_facts.g_cache_structure;
8940: --
9408: --
9409: if l_eligprof_dets.count > 0 then
9410: --
9411: if p_person_id is not null then
9412: ben_person_object.get_object(p_person_id => p_person_id,
9413: p_rec => l_typ_rec);
9414: --
9415: ben_person_object.get_object(p_person_id => p_person_id,
9416: p_rec => l_per_rec);
9411: if p_person_id is not null then
9412: ben_person_object.get_object(p_person_id => p_person_id,
9413: p_rec => l_typ_rec);
9414: --
9415: ben_person_object.get_object(p_person_id => p_person_id,
9416: p_rec => l_per_rec);
9417: --
9418: -- if the person cache is not in the date range, clear the cahce
9419: --
9425: hr_utility.set_location('cache end'||l_per_rec.effective_end_date ,10);
9426:
9427: ben_use_cvg_rt_date.fonm_clear_down_cache;
9428: --
9429: ben_person_object.get_object(p_person_id => p_person_id,
9430: p_rec => l_typ_rec);
9431: --
9432: ben_person_object.get_object(p_person_id => p_person_id,
9433: p_rec => l_per_rec);
9428: --
9429: ben_person_object.get_object(p_person_id => p_person_id,
9430: p_rec => l_typ_rec);
9431: --
9432: ben_person_object.get_object(p_person_id => p_person_id,
9433: p_rec => l_per_rec);
9434:
9435: hr_utility.set_location('nw cache start'||l_per_rec.effective_start_date ,10);
9436: hr_utility.set_location('nw cache end'||l_per_rec.effective_end_date ,10);
9436: hr_utility.set_location('nw cache end'||l_per_rec.effective_end_date ,10);
9437: else
9438:
9439: -- Bug 6399423
9440: /* ben_person_object.get_object(p_person_id => p_person_id,
9441: p_rec => l_ass_rec);
9442: */
9443:
9444: ben_person_object.get_object(p_person_id => p_person_id,
9440: /* ben_person_object.get_object(p_person_id => p_person_id,
9441: p_rec => l_ass_rec);
9442: */
9443:
9444: ben_person_object.get_object(p_person_id => p_person_id,
9445: p_rec => l_ass_rec1);
9446: -- Bug 6399423
9447:
9448: hr_utility.set_location('cache asg start'||l_ass_rec1.effective_start_date ,10);
9522: if l_eligprof_dets(l_elptorrw_num).asmt_to_use_cd = 'EAO' then
9523: --
9524: -- Employee assignment only
9525: --
9526: ben_person_object.get_object(p_person_id => p_person_id,
9527: p_rec => l_ass_rec);
9528: --
9529: elsif l_eligprof_dets(l_elptorrw_num).asmt_to_use_cd = 'BAO' then
9530: --
9529: elsif l_eligprof_dets(l_elptorrw_num).asmt_to_use_cd = 'BAO' then
9530: --
9531: -- Benefit assignment only
9532: --
9533: ben_person_object.get_benass_object(p_person_id => p_person_id,
9534: p_rec => l_ass_rec);
9535: --
9536: elsif l_eligprof_dets(l_elptorrw_num).asmt_to_use_cd = 'AAO' then
9537: --
9547: l_appass_rec.delete;
9548: l_appass_rec(1) := ben_manage_life_events.g_irec_ass_rec ;
9549: else
9550: --
9551: ben_person_object.get_object(p_person_id => p_person_id,
9552: p_rec => l_appass_rec);
9553: --
9554: end if;
9555: --
9590: hr_utility.set_location(' p_effective_date :' || p_effective_date,99);
9591:
9592:
9593: else
9594: ben_person_object.get_allass_object(p_person_id => p_person_id,
9595: p_rec => l_appass_rec);
9596: end if; -- 4958846 :irec
9597: --
9598: if not l_appass_rec.exists(1) then
9613: elsif l_eligprof_dets(l_elptorrw_num).asmt_to_use_cd = 'ETB' then
9614: --
9615: -- Employee then Benefits assignment only
9616: --
9617: ben_person_object.get_object(p_person_id => p_person_id,
9618: p_rec => l_ass_rec);
9619: --
9620: if l_ass_rec.assignment_id is null then
9621: --
9620: if l_ass_rec.assignment_id is null then
9621: --
9622: -- Get Benefits Assignment
9623: --
9624: ben_person_object.get_benass_object(p_person_id => p_person_id,
9625: p_rec => l_ass_rec);
9626: --
9627: end if;
9628: --
9629: elsif l_eligprof_dets(l_elptorrw_num).asmt_to_use_cd = 'BTE' then
9630: --
9631: -- Benefits then Employee assignment only
9632: --
9633: ben_person_object.get_benass_object(p_person_id => p_person_id,
9634: p_rec => l_ass_rec);
9635: --
9636: if l_ass_rec.assignment_id is null then
9637: --
9636: if l_ass_rec.assignment_id is null then
9637: --
9638: -- Get Employee Assignment
9639: --
9640: ben_person_object.get_object(p_person_id => p_person_id,
9641: p_rec => l_ass_rec);
9642: --
9643: end if;
9644: --
9645: elsif l_eligprof_dets(l_elptorrw_num).asmt_to_use_cd = 'EBA' then
9646: --
9647: -- Employee then Benefits then Applicant assignment only
9648: --
9649: ben_person_object.get_object(p_person_id => p_person_id,
9650: p_rec => l_ass_rec);
9651: --
9652: if l_ass_rec.assignment_id is null then
9653: --
9652: if l_ass_rec.assignment_id is null then
9653: --
9654: -- Get Benefits Assignment
9655: --
9656: ben_person_object.get_benass_object(p_person_id => p_person_id,
9657: p_rec => l_ass_rec);
9658: --
9659: if l_ass_rec.assignment_id is null then
9660: --
9670: l_appass_rec.delete;
9671: l_appass_rec(1) := ben_manage_life_events.g_irec_ass_rec ;
9672: else
9673: --
9674: ben_person_object.get_object(p_person_id => p_person_id,
9675: p_rec => l_appass_rec);
9676: --
9677: end if;
9678: --
9701: end if;
9702: hr_utility.set_location('asmt_to_use_cd '||l_eligprof_dets(l_elptorrw_num).asmt_to_use_cd,67);
9703: --hr_utility.set_location('p_person_id '||p_person_id,671);
9704: --hr_utility.set_location('p_assignment_id '||p_assignment_id,671);
9705: ben_person_object.get_assgn_object( p_person_id => p_person_id,
9706: p_assignment_id => p_assignment_id,
9707: p_rec => l_ass_rec);
9708: hr_utility.set_location('p_person_id '||l_ass_rec.person_id,672);
9709: hr_utility.set_location('p_assignment_id '||l_ass_rec.assignment_id,672);
10006: --
10007: hr_utility.set_location(' here 2 ',999);
10008: if l_ass_rec.soft_coding_keyflex_id is not null then
10009: --
10010: ben_person_object.get_object
10011: (p_soft_coding_keyflex_id => l_ass_rec.soft_coding_keyflex_id,
10012: p_rec => l_hsc_rec);
10013: --
10014: if l_hsc_rec.segment1 is not null and