1 Package pay_sid_bus as
2 /* $Header: pysidrhi.pkh 120.1 2005/07/05 06:25:39 vikgupta noship $ */
3 --
4 -- ---------------------------------------------------------------------------
5 -- |----------------------< set_security_group_id >--------------------------|
6 -- ---------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- Sets the security_group_id in CLIENT_INFO for the appropriate business
11 -- group context.
12 --
13 -- Prerequisites:
14 -- The primary key identified by p_prsi_details_id
15 -- already exists.
16 --
17 -- In Arguments:
18 -- p_prsi_details_id
19 --
20 --
21 -- Post Success:
22 -- The security_group_id will be set in CLIENT_INFO.
23 --
24 -- Post Failure:
25 -- An error is raised if the value does not exist.
26 --
27 -- Access Status:
28 -- Internal Development Use Only.
29 --
30 -- {End Of Comments}
31 -- ---------------------------------------------------------------------------
32 procedure set_security_group_id
33 (p_prsi_details_id in number
34 );
35 --
36 --
37 -- ---------------------------------------------------------------------------
38 -- |---------------------< return_legislation_code >-------------------------|
39 -- ---------------------------------------------------------------------------
40 -- {Start Of Comments}
41 --
42 -- Description:
43 -- Return the legislation code for a specific primary key value
44 --
45 -- Prerequisites:
46 -- The primary key identified by p_prsi_details_id
47 -- already exists.
48 --
49 -- In Arguments:
50 -- p_prsi_details_id
51 --
52 --
53 -- Post Success:
54 -- The business group's legislation code will be returned.
55 --
56 -- Post Failure:
57 -- An error is raised if the value does not exist.
58 --
59 -- Access Status:
60 -- Internal Development Use Only.
61 --
62 -- {End Of Comments}
63 -- ---------------------------------------------------------------------------
64 FUNCTION return_legislation_code
65 (p_prsi_details_id in number
66 ) RETURN varchar2;
67 --
68 -- ---------------------------------------------------------------------------
69 -- |---------------------< chk_assignment_id >-------------------------|
70 -- ---------------------------------------------------------------------------
71 -- {Start Of Comments}
72 --
73 -- Description:
74 -- check if assignment already exists and valid as of the effectuve date
75 --
76 -- Prerequisites:
77 --
78 -- In Arguments:
79 -- p_effective_date
80 -- p_assignment_id
81 --
82 --
83 -- Post Success:
84 -- processing continues as no error is raised.
85 --
86 -- Post Failure:
87 -- An error is raised if the assignment does not exist.
88 --
89 -- Access Status:
90 -- Internal Development Use Only.
91 --
92 -- {End Of Comments}
93 -- ---------------------------------------------------------------------------
94 PROCEDURE chk_assignment_id
95 (p_effective_date IN DATE
96 , p_assignment_id IN NUMBER
97 );
98 --
99 --
100 -- ---------------------------------------------------------------------------
101 -- |------------------------< chk_director_flag >----------------------------|
102 -- ---------------------------------------------------------------------------
103 -- {Start Of Comments}
104 --
105 -- Description:
106 -- check if director_flag already exists in lookup_type YES_NO
107 --
108 -- Prerequisites:
109 --
110 -- In Arguments:
111 -- p_effective_date
112 -- p_director_flag
113 --
114 --
115 -- Post Success:
116 -- processing continues as no error is raised.
117 --
118 -- Post Failure:
119 -- An error is raised if the director_flag does not exist.
120 --
121 -- Access Status:
122 -- Internal Development Use Only.
123 --
124 -- {End Of Comments}
125 -- ---------------------------------------------------------------------------
126 PROCEDURE chk_director_flag
127 (p_effective_date IN DATE
128 , p_director_flag IN VARCHAR2
129 );
130 --
131 --
132 -- ---------------------------------------------------------------------------
133 -- |---------------------< chk_contribution_class >-------------------------|
134 -- ---------------------------------------------------------------------------
135 -- {Start Of Comments}
136 --
137 -- Description:
138 -- check if contribution_class already exists in lookup_type
139 -- IE_PRSI_CONT_CLASS
140 --
141 -- Prerequisites:
142 --
143 -- In Arguments:
144 -- p_effective_date
145 -- p_contribution_class
146 --
147 --
148 -- Post Success:
149 -- processing continues as no error is raised.
150 --
151 -- Post Failure:
152 -- An error is raised if the contribution_class does not exist.
153 --
154 -- Access Status:
155 -- Internal Development Use Only.
156 --
157 -- {End Of Comments}
158 -- ---------------------------------------------------------------------------
159 PROCEDURE chk_contribution_class
160 (p_effective_date IN DATE
161 , p_contribution_class IN VARCHAR2
162 );
163 --
164 --
165 -- ---------------------------------------------------------------------------
166 -- |---------------------< chk_overridden_subclass >-------------------------|
167 -- ---------------------------------------------------------------------------
168 -- {Start Of Comments}
169 --
170 -- Description:
171 -- check if overridden_subclass already exists in lookup_type
172 -- IE_PRSI_CONT_SUBCLASS
173 --
174 -- Prerequisites:
175 --
176 -- In Arguments:
177 -- p_effective_date
178 -- p_overridden_subclass
179 --
180 --
181 -- Post Success:
182 -- processing continues as no error is raised.
183 --
184 -- Post Failure:
185 -- An error is raised if the overridden_subclass does not exist.
186 --
187 -- Access Status:
188 -- Internal Development Use Only.
189 --
190 -- {End Of Comments}
191 -- ---------------------------------------------------------------------------
192 PROCEDURE chk_overridden_subclass
193 (p_effective_date IN DATE
194 , p_overridden_subclass IN VARCHAR2
195 );
196 --
197 --
198 -- ---------------------------------------------------------------------------
199 -- |---------------------< chk_overlapping_record >-------------------------|
200 -- ---------------------------------------------------------------------------
201 -- {Start Of Comments}
202 --
203 -- Description:
204 -- check if PRSI record already exists for the assignment
205 --
206 -- Prerequisites:
207 --
208 -- In Arguments:
209 -- p_assignment_id
210 -- p_validation_start_date
211 -- p_validation_end_date
212 --
213 -- Post Success:
214 -- processing continues as no error is raised.
215 --
216 -- Post Failure:
217 -- An error is raised if PRSI record already exists for the assignment
218 --
219 -- Access Status:
220 -- Internal Development Use Only.
221 --
222 -- {End Of Comments}
223 -- ---------------------------------------------------------------------------
224 PROCEDURE chk_overlapping_record
225 ( p_assignment_id IN NUMBER
226 , p_validation_start_date DATE
227 , p_validation_end_date DATE
228 );
229 --
230 --
231 -- ---------------------------------------------------------------------------
232 -- |------------------------< chk_soc_ben_flag >----------------------------|
233 -- ---------------------------------------------------------------------------
234 -- {Start Of Comments}
235 --
236 -- Description:
237 -- check if soc_ben_flag already exists in lookup_type YES_NO
238 --
239 -- Prerequisites:
240 --
241 -- In Arguments:
242 -- p_effective_date
243 -- p_soc_ben_flag
244 --
245 --
246 -- Post Success:
247 -- processing continues as no error is raised.
248 --
249 -- Post Failure:
250 -- An error is raised if the soc_ben_flag does not exist.
251 --
252 -- Access Status:
253 -- Internal Development Use Only.
254 --
255 -- {End Of Comments}
256 -- ---------------------------------------------------------------------------
257 PROCEDURE chk_soc_ben_flag
258 (p_effective_date IN DATE
259 , p_soc_ben_flag IN VARCHAR2
260 );
261 --
262 --
263 -- ---------------------------------------------------------------------------
264 -- |---------------------< chk_soc_ben_start_date >--------------------------|
265 -- ---------------------------------------------------------------------------
266 -- {Start Of Comments}
267 --
268 -- Description:
269 -- check if soc_ben_start_date is not null when soc_ben_flag is 'N'
270 --
271 -- Prerequisites:
272 --
273 -- In Arguments:
274 -- p_effective_date
275 -- p_soc_ben_flag
276 -- p_soc_ben_start_date
277 --
278 --
279 -- Post Success:
280 -- processing continues as no error is raised.
281 --
282 -- Post Failure:
283 -- An error is raised if the soc_ben_start_date is not null and
284 -- soc_ben_flag is 'N'
285 --
286 -- Access Status:
287 -- Internal Development Use Only.
288 --
289 -- {End Of Comments}
290 -- ---------------------------------------------------------------------------
291 PROCEDURE chk_soc_ben_start_date
292 (p_effective_date IN DATE
293 , p_soc_ben_flag IN VARCHAR2
294 , p_soc_ben_start_date IN DATE
295 );
296 --
297 --
298 -- ---------------------------------------------------------------------------
299 -- |------------------------< get_std_ins_weeks >----------------------------|
300 -- ---------------------------------------------------------------------------
301 -- {Start Of Comments}
302 --
303 -- Description:
304 -- Get standard default number of insurable weeks in current pay period
305 --
306 -- Prerequisites:
307 --
308 -- In Arguments:
309 -- p_effective_date
310 -- p_assignment_id
311 --
312 --
313 -- Post Success:
314 -- returns standard default number of insurable weeks in current pay period
315 --
316 -- Post Failure:
317 --
318 -- Access Status:
319 -- Internal Development Use Only.
320 --
321 -- {End Of Comments}
322 -- ---------------------------------------------------------------------------
323 FUNCTION get_std_ins_weeks
324 (p_effective_date IN DATE
325 , p_assignment_id IN NUMBER
326 ) RETURN NUMBER ;
327 --
328 --
329 -- ---------------------------------------------------------------------------
330 -- |---------------------< chk_overridden_ins_weeks >------------------------|
331 -- ---------------------------------------------------------------------------
332 -- {Start Of Comments}
333 --
334 -- Description:
335 -- check that overridden insurable weeks are not more than standard default
336 -- number of insurable weeks in current pay period.
337 --
338 -- Prerequisites:
339 --
340 -- In Arguments:
341 -- p_effective_date
342 -- p_assignment_id
343 -- p_overridden_ins_weeks
344 --
345 --
346 -- Post Success:
347 -- Process continues
348 --
349 -- Post Failure:
350 --
351 -- Access Status:
352 -- Internal Development Use Only.
353 --
354 -- {End Of Comments}
355 -- ---------------------------------------------------------------------------
356 PROCEDURE chk_overridden_ins_weeks
357 (p_effective_date IN DATE
358 , p_assignment_id IN NUMBER
359 , p_overridden_ins_weeks IN NUMBER
360 );
361 --
362 --
363 -- ---------------------------------------------------------------------------
364 -- |--------------------< chk_exemption_start_end_dates >--------------------|
365 -- ---------------------------------------------------------------------------
366 -- {Start Of Comments}
367 --
368 -- Description:
369 -- check if exemption start date is before or equal to certificate end date
370 --
371 -- Prerequisites:
372 --
373 -- In Arguments:
374 -- p_exemption_start_date
375 -- p_exemption_end_date
376 --
377 --
378 -- Post Success:
379 -- processing continues as no error is raised.
380 --
381 -- Post Failure:
382 -- An error is raised if the exemption_start_date is after
383 -- exemption_end_Date
384 --
385 -- Access Status:
386 -- Internal Development Use Only.
387 --
388 -- {End Of Comments}
389 -- ---------------------------------------------------------------------------
390 PROCEDURE chk_exemption_start_end_dates
391 (p_exemption_start_Date IN DATE
392 , p_exemption_end_date IN DATE
393 ) ;
394 --
395 --
396 -- ---------------------------------------------------------------------------
397 -- |------------------------< chk_community_flag >----------------------------|
398 -- ---------------------------------------------------------------------------
402 -- check if community_flag already exists in lookup_type YES_NO
399 -- {Start Of Comments}
400 --
401 -- Description:
403 --
404 -- Prerequisites:
405 --
406 -- In Arguments:
407 -- p_effective_date
408 -- p_community_flag
409 --
410 --
411 -- Post Success:
412 -- processing continues as no error is raised.
413 --
414 -- Post Failure:
415 -- An error is raised if the community_flag does not exist.
416 --
417 -- Access Status:
418 -- Internal Development Use Only.
419 --
420 -- {End Of Comments}
421 -- ---------------------------------------------------------------------------
422 PROCEDURE chk_community_flag
423 (p_effective_date IN DATE
424 , p_community_flag IN VARCHAR2
425 ) ;
426 --
427 --
428 -- ----------------------------------------------------------------------------
429 -- |---------------------------< insert_validate >----------------------------|
430 -- ----------------------------------------------------------------------------
431 -- {Start Of Comments}
432 --
433 -- Description:
434 -- This procedure controls the execution of all insert business rules
435 -- validation.
436 --
437 -- Prerequisites:
438 -- This private procedure is called from ins procedure.
439 --
440 -- In Parameters:
441 -- A Pl/Sql record structre.
442 --
443 -- Post Success:
444 -- Processing continues.
445 --
446 -- Post Failure:
447 -- If a business rules fails the error will not be handled by this procedure
448 -- unless explicity coded.
449 --
450 -- Developer Implementation Notes:
451 -- For insert, your business rules should be executed from this procedure and
452 -- should ideally (unless really necessary) just be straight procedure or
453 -- function calls. Try and avoid using conditional branching logic.
454 --
455 -- Access Status:
456 -- Internal Row Handler Use Only.
457 --
458 -- {End Of Comments}
459 -- ----------------------------------------------------------------------------
460 Procedure insert_validate
461 (p_rec in pay_sid_shd.g_rec_type
462 ,p_effective_date in date
463 ,p_datetrack_mode in varchar2
464 ,p_validation_start_date in date
465 ,p_validation_end_date in date
466 );
467 --
468 -- ----------------------------------------------------------------------------
469 -- |---------------------------< update_validate >----------------------------|
470 -- ----------------------------------------------------------------------------
471 -- {Start Of Comments}
472 --
473 -- Description:
474 -- This procedure controls the execution of all update business rules
475 -- validation.
476 --
477 -- Prerequisites:
478 -- This private procedure is called from upd procedure.
479 --
480 -- In Parameters:
481 -- A Pl/Sql record structre.
482 --
483 -- Post Success:
484 -- Processing continues.
485 --
486 -- Post Failure:
487 -- If a business rules fails the error will not be handled by this procedure
488 -- unless explicity coded.
489 --
490 -- Developer Implementation Notes:
491 -- For update, your business rules should be executed from this procedure and
492 -- should ideally (unless really necessary) just be straight procedure or
493 -- function calls. Try and avoid using conditional branching logic.
494 --
495 -- Access Status:
496 -- Internal Row Handler Use Only.
497 --
498 -- {End Of Comments}
499 -- ----------------------------------------------------------------------------
500 Procedure update_validate
501 (p_rec in pay_sid_shd.g_rec_type
502 ,p_effective_date in date
503 ,p_datetrack_mode in varchar2
504 ,p_validation_start_date in date
505 ,p_validation_end_date in date
506 );
507 --
508 -- ----------------------------------------------------------------------------
509 -- |---------------------------< delete_validate >----------------------------|
510 -- ----------------------------------------------------------------------------
511 -- {Start Of Comments}
512 --
513 -- Description:
514 -- This procedure controls the execution of all delete business rules
515 -- validation.
516 --
517 -- Prerequisites:
521 -- A Pl/Sql record structure.
518 -- This private procedure is called from del procedure.
519 --
520 -- In Parameters:
522 --
523 -- Post Success:
524 -- Processing continues.
525 --
526 -- Post Failure:
527 -- If a business rules fails the error will not be handled by this procedure
528 -- unless explicity coded.
529 --
530 -- Developer Implementation Notes:
531 -- For delete, your business rules should be executed from this procedure and
532 -- should ideally (unless really necessary) just be straight procedure or
533 -- function calls. Try and avoid using conditional branching logic.
534 --
535 -- Access Status:
536 -- Internal Row Handler Use Only.
537 --
538 -- {End Of Comments}
539 -- ----------------------------------------------------------------------------
540 Procedure delete_validate
541 (p_rec in pay_sid_shd.g_rec_type
542 ,p_effective_date in date
543 ,p_datetrack_mode in varchar2
544 ,p_validation_start_date in date
545 ,p_validation_end_date in date
546 );
547 --
548 end pay_sid_bus;