[Home] [Help]
PACKAGE BODY: APPS.PAY_ZA_BUS_ADD_ENDDATE
Source
1 PACKAGE BODY PAY_ZA_BUS_ADD_ENDDATE AS
2 /* $Header: payzabus.pkb 120.0 2010/08/18 10:45:09 appldev noship $ */
3 PROCEDURE qualify_person(p_person_id number, p_qualifier out nocopy varchar2) AS
4
5 cursor csr_person is
6 select 1
7 from per_all_people_f papf,
8 per_addresses pa
9 where papf.effective_end_date >= to_date('01/03/2009','DD/MM/YYYY')
10 and papf.person_id = p_person_id
11 and papf.business_group_id in (select business_group_id
12 from per_business_groups
13 where legislation_code='ZA')
14 and pa.person_id = papf.person_id
15 and style = 'ZA_SARS'
16 and primary_flag = 'N'
17 and address_type = 'ZA_BUS';
18
19 l_exists number;
20
21 BEGIN
22 hr_utility.set_location('Entering qualify_person',10);
23
24 p_qualifier :='N';
25 open csr_person;
26 fetch csr_person into l_exists;
27 if csr_person%found then
28 p_qualifier := 'Y';
29 end if;
30 close csr_person;
31
32 hr_utility.set_location('Exiting qualify_person',20);
33 END qualify_person;
34
35 PROCEDURE enddate_bus_add(p_person_id number) AS
36 BEGIN
37
38 hr_utility.set_location('Entering enddate_bus_add',50);
39 hr_utility.set_location('p_person_id = ' || p_person_id,60);
40
41 update per_addresses
42 set date_to = date_from - 1
43 where person_id = p_person_id
44 and style = 'ZA_SARS'
45 and primary_flag = 'N'
46 and address_type = 'ZA_BUS';
47
48 hr_utility.set_location('Exiting enddate_bus_add',70);
49
50 END enddate_bus_add;
51
52 END PAY_ZA_BUS_ADD_ENDDATE;