DBA Data[Home] [Help]

PACKAGE: APPS.PER_PERIODS_OF_SERVICE_PKG_V2

Source


1 PACKAGE PER_PERIODS_OF_SERVICE_PKG_V2 AS
2 /* $Header: pepds02t.pkh 120.1 2006/05/08 08:43:58 lsilveir noship $ */
3 --
4 -- flemonni
5 -- hire date changes bug # 625423
6 --
7 -- |--------------------------------------------------------------------------|
8 -- |-- < Get_Max_Last_Process_date >------------------------------------------|
9 -- |--------------------------------------------------------------------------|
10 -- {Start Of Comments}
11 --
12 -- Description:
13 -- gets the most recent final process date of a period of service
14 --
15 -- Prerequisites:
16 -- none
17 --
18 -- Post Success:
19 -- returns the final process date
20 --
21 -- Post Failure:
22 -- returns null
23 --
24 -- Access Status:
25 --   Public.
26 --
27 -- {End Of Comments}
28 -- ----------------------------------------------------------------------------
29 FUNCTION Get_Max_Last_Process_date
30   ( p_person_id IN NUMBER
31   )
32 RETURN DATE;
33 -- |--------------------------------------------------------------------------|
34 -- |-- < Get_Valid_Hire_Dates >-----------------------------------------------|
35 -- |--------------------------------------------------------------------------|
36 -- {Start Of Comments}
37 --
38 -- Description:
39 -- checks the person / assignemnt and periods_of_service tables in the schema
40 -- for a min max range of hire date
41 --
42 -- Prerequisites:
43 -- none
44 --
45 -- Post Success:
46 -- the minimum and maximum hire dates are returned as well as whether a
47 -- back to back contract is permissible
48 --
49 -- Post Failure:
50 -- error raised
51 --
52 -- Access Status:
53 --   Public.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 PROCEDURE Get_Valid_Hire_Dates
58   ( p_person_id			IN per_all_people_f.person_id%TYPE
59   , p_session_date		IN DATE
60   , p_dob			IN DATE
61   , p_business_group_id		IN NUMBER
62   , p_min_date 			OUT NOCOPY DATE
63   , p_max_date			OUT NOCOPY DATE
64   , p_b2b_allowed		OUT NOCOPY BOOLEAN
65   , p_pds_not_terminated	OUT NOCOPY BOOLEAN
66   );
67 -- |--------------------------------------------------------------------------|
68 -- |-- < IsBackToBackContract >-----------------------------------------------|
69 -- |--------------------------------------------------------------------------|
70 -- {Start Of Comments}
71 --
72 -- Description:
73 -- given a hire date checks whether the period of service was created as
74 -- a back to back contract
75 --
76 -- Prerequisites:
77 -- none
78 --
79 -- Post Success:
80 -- returns true
81 --
82 -- Post Failure:
83 -- returns false
84 --
85 -- Access Status:
86 --   Public.
87 --
88 -- {End Of Comments}
89 -- ----------------------------------------------------------------------------
90 FUNCTION IsBackToBackContract
91   ( p_person_id			IN per_people_f.person_id%TYPE
92   , p_hire_date_of_current_pds	IN DATE
93   )
94 RETURN BOOLEAN;
95 -- |--------------------------------------------------------------------------|
96 -- |-- < Get_Current_PDS_Start_Date >-----------------------------------------|
97 -- |--------------------------------------------------------------------------|
98 -- {Start Of Comments}
99 --
100 -- Description:
101 -- gets the start date of the period of service id
102 --
103 -- Prerequisites:
104 -- if p_type is null, searches for the current employment (i.e. not terminated)
105 -- if p_type is RECENT, then checks for the most recent pds, terminated or not
106 --
107 -- Post Success:
108 -- returns the start date
109 --
110 -- Post Failure:
111 -- returns null
112 --
113 -- Access Status:
114 --   Public.
115 --
116 -- {End Of Comments}
117 -- ----------------------------------------------------------------------------
118 FUNCTION Get_Current_PDS_Start_Date
119   ( p_person_id 	IN per_all_people_f.person_id%TYPE
120   , p_type 		IN VARCHAR2 DEFAULT NULL
121   )
122 RETURN DATE;
123 -- |--------------------------------------------------------------------------|
124 -- |-- < Get_Current_Open_PDS_id >--------------------------------------------|
125 -- |--------------------------------------------------------------------------|
126 -- {Start Of Comments}
127 --
128 -- Description:
129 -- gets the most recent (open) period of service id
130 --
131 -- Prerequisites:
132 -- none
133 --
134 -- Post Success:
135 -- returns the period of service id
136 --
137 -- Post Failure:
138 -- returns null
139 --
140 -- Access Status:
141 --   Public.
142 --
143 -- {End Of Comments}
144 -- ----------------------------------------------------------------------------
145 FUNCTION Get_Current_Open_PDS_id
146   ( p_person_id 	IN per_people_f.person_id%TYPE
147   )
148 RETURN NUMBER;
149 -- |--------------------------------------------------------------------------|
150 -- |-- < Is_Max_PDS_Not_Closed >----------------------------------------------|
151 -- |--------------------------------------------------------------------------|
152 -- {Start Of Comments}
153 --
154 -- Description:
155 -- checks whther most recent pds is terminated or not (final process date is
156 -- filled in)
157 --
158 -- Prerequisites:
159 -- none
160 --
161 -- Post Success:
162 -- returns true
163 --
164 -- Post Failure:
165 -- returns false
166 --
167 -- Access Status:
168 --   Public.
169 --
170 -- {End Of Comments}
171 -- ----------------------------------------------------------------------------
172 FUNCTION Is_Max_PDS_Not_Closed
173   ( p_person_id 	IN per_people_f.person_id%TYPE
174   )
175 RETURN BOOLEAN;
176 END PER_PERIODS_OF_SERVICE_PKG_V2;