1 Package pay_ppd_bus as
2 /* $Header: pyppdrhi.pkh 120.1 2006/01/02 00:35 mseshadr 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_paye_details_id
15 -- already exists.
16 --
17 -- In Arguments:
18 -- p_paye_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_paye_details_id in number
34 ,p_associated_column1 in varchar2 default null
35 );
36 --
37 --
38 -- ---------------------------------------------------------------------------
39 -- |---------------------< return_legislation_code >-------------------------|
40 -- ---------------------------------------------------------------------------
41 -- {Start Of Comments}
42 --
43 -- Description:
44 -- Return the legislation code for a specific primary key value
45 --
46 -- Prerequisites:
47 -- The primary key identified by p_paye_details_id
48 -- already exists.
49 --
50 -- In Arguments:
51 -- p_paye_details_id
52 --
53 --
54 -- Post Success:
55 -- The business group's legislation code will be returned.
56 --
57 -- Post Failure:
58 -- An error is raised if the value does not exist.
59 --
60 -- Access Status:
61 -- Internal Development Use Only.
62 --
63 -- {End Of Comments}
64 -- ---------------------------------------------------------------------------
65 FUNCTION return_legislation_code
66 (p_paye_details_id in number
67 ) RETURN varchar2;
68 --
69 --
70 -- ----------------------------------------------------------------------------
71 -- |---------------------------< insert_validate >----------------------------|
72 -- ----------------------------------------------------------------------------
73 -- {Start Of Comments}
74 --
75 -- Description:
76 -- This procedure controls the execution of all insert business rules
77 -- validation.
78 --
79 -- Prerequisites:
80 -- This private procedure is called from ins procedure.
81 --
82 -- In Parameters:
83 -- A Pl/Sql record structre.
84 --
85 -- Post Success:
86 -- Processing continues.
87 --
88 -- Post Failure:
89 -- If a business rules fails the error will not be handled by this procedure
90 -- unless explicity coded.
91 --
92 -- Developer Implementation Notes:
93 -- For insert, your business rules should be executed from this procedure and
94 -- should ideally (unless really necessary) just be straight procedure or
95 -- function calls. Try and avoid using conditional branching logic.
96 --
97 -- Access Status:
98 -- Internal Row Handler Use Only.
99 --
100 -- {End Of Comments}
101 -- ----------------------------------------------------------------------------
102 Procedure insert_validate
103 (p_rec in pay_ppd_shd.g_rec_type
104 ,p_effective_date in date
105 ,p_datetrack_mode in varchar2
106 ,p_validation_start_date in date
107 ,p_validation_end_date in date
108 );
109 --
110 -- ----------------------------------------------------------------------------
111 -- |---------------------------< update_validate >----------------------------|
112 -- ----------------------------------------------------------------------------
113 -- {Start Of Comments}
114 --
115 -- Description:
116 -- This procedure controls the execution of all update business rules
117 -- validation.
118 --
119 -- Prerequisites:
120 -- This private procedure is called from upd procedure.
121 --
122 -- In Parameters:
123 -- A Pl/Sql record structre.
124 --
125 -- Post Success:
126 -- Processing continues.
127 --
128 -- Post Failure:
129 -- If a business rules fails the error will not be handled by this procedure
130 -- unless explicity coded.
131 --
132 -- Developer Implementation Notes:
133 -- For update, your business rules should be executed from this procedure and
134 -- should ideally (unless really necessary) just be straight procedure or
135 -- function calls. Try and avoid using conditional branching logic.
136 --
137 -- Access Status:
138 -- Internal Row Handler Use Only.
139 --
140 -- {End Of Comments}
141 -- ----------------------------------------------------------------------------
142 Procedure update_validate
143 (p_rec in pay_ppd_shd.g_rec_type
144 ,p_effective_date in date
145 ,p_datetrack_mode in varchar2
146 ,p_validation_start_date in date
147 ,p_validation_end_date in date
148 );
149 --
150 -- ----------------------------------------------------------------------------
151 -- |---------------------------< delete_validate >----------------------------|
152 -- ----------------------------------------------------------------------------
153 -- {Start Of Comments}
154 --
155 -- Description:
156 -- This procedure controls the execution of all delete business rules
157 -- validation.
158 --
159 -- Prerequisites:
160 -- This private procedure is called from del procedure.
161 --
162 -- In Parameters:
163 -- A Pl/Sql record structure.
164 --
165 -- Post Success:
166 -- Processing continues.
167 --
168 -- Post Failure:
169 -- If a business rules fails the error will not be handled by this procedure
170 -- unless explicity coded.
171 --
172 -- Developer Implementation Notes:
173 -- For delete, your business rules should be executed from this procedure and
174 -- should ideally (unless really necessary) just be straight procedure or
175 -- function calls. Try and avoid using conditional branching logic.
176 --
177 -- Access Status:
178 -- Internal Row Handler Use Only.
179 --
180 -- {End Of Comments}
181 -- ----------------------------------------------------------------------------
182 Procedure delete_validate
183 (p_rec in pay_ppd_shd.g_rec_type
184 ,p_effective_date in date
185 ,p_datetrack_mode in varchar2
186 ,p_validation_start_date in date
187 ,p_validation_end_date in date
188 );
189 --
190 -- ----------------------------------------------------------------------------
191 -- |-----------------------< chk_non_updateable_args >------------------------|
192 -- ----------------------------------------------------------------------------
193 -- {Start Of Comments}
194 --
195 -- Description:
196 -- This procedure is used to ensure that non updateable attributes have
197 -- not been updated. If an attribute has been updated an error is generated.
198 --
199 -- Pre Conditions:
200 -- g_old_rec has been populated with details of the values currently in
201 -- the database.
202 --
203 -- In Arguments:
204 -- p_rec has been populated with the updated values the user would like the
205 -- record set to.
206 --
207 -- Post Success:
208 -- Processing continues if all the non updateable attributes have not
209 -- changed.
210 --
211 -- Post Failure:
212 -- An application error is raised if any of the non updatable attributes
213 -- have been altered.
214 --
215 -- {End Of Comments}
216 -- ----------------------------------------------------------------------------
217 Procedure chk_non_updateable_args
218 (p_effective_date in date
219 ,p_rec in pay_ppd_shd.g_rec_type
220 );
221 --
222 -- ----------------------------------------------------------------------------
223 -- |-----------------------< chk_contract_category >--------------------------|
224 -- ----------------------------------------------------------------------------
225 -- {Start Of Comments}
226 --
227 -- Description:
228 -- This procedure validates the Contract Category.
229 --
230 -- Prerequisites:
231 --
232 --
233 -- In Parameters:
234 -- p_payee_details_id
235 -- p_effective_date
236 -- p_contract_category
237 -- p_validation_start_date
238 -- p_validation_end_date
239 -- p_object_version_number
240 --
241 -- Post Success:
242 -- Processing continues.
243 --
244 -- Post Failure:
245 -- An error is raised if the validation fails.
246 --
247 --
248 -- Access Status:
249 -- Internal Development Use Only.
250 --
251 -- {End Of Comments}
252 -- ----------------------------------------------------------------------------
253 Procedure chk_contract_category
254 (p_paye_details_id in number
255 ,p_effective_date in date
256 ,p_contract_category in varchar2
257 ,p_validation_start_date in date
258 ,p_validation_end_date in date
259 ,p_object_version_number in number
260 );
261 -- ----------------------------------------------------------------------------
262 -- |-------------------------< chk_per_asg_id >-------------------------------|
263 -- ----------------------------------------------------------------------------
264 -- {Start Of Comments}
265 --
266 -- Description:
267 -- This procedure validates the Person/Assignment Id.
268 --
269 -- Prerequisites:
270 --
271 --
272 -- In Parameters:
273 -- p_effective_date
274 -- p_per_or_asg_id
275 -- p_contract_category
276 -- p_business_group_id
277 -- p_object_version_number
278 --
279 -- Post Success:
280 -- Processing continues.
281 --
282 -- Post Failure:
283 -- An error is raised if the validation fails.
284 --
285 --
286 -- Access Status:
287 -- Internal Development Use Only.
288 --
289 -- {End Of Comments}
290 -- ----------------------------------------------------------------------------
291 Procedure chk_per_asg_id
292 (p_effective_date in date
293 ,p_per_or_asg_id in number
294 ,p_contract_category in varchar2
295 ,p_business_group_id in number
296 ,p_object_version_number in number
297 );
298 -- ----------------------------------------------------------------------------
299 -- |-----------------------< chk_business_group_id >--------------------------|
300 -- ----------------------------------------------------------------------------
301 -- {Start Of Comments}
302 --
303 -- Description:
304 -- This procedure validates the Business Group Id.
305 --
306 -- Prerequisites:
307 --
308 --
309 -- In Parameters:
310 -- p_paye_details_id
311 -- p_effective_date
312 -- p_business_group_id
313 -- p_validation_start_date
314 -- p_validation_end_date
315 -- p_object_version_number
316 --
317 -- Post Success:
318 -- Processing continues.
319 --
320 -- Post Failure:
321 -- An error is raised if the validation fails.
322 --
323 --
324 -- Access Status:
325 -- Internal Development Use Only.
326 --
327 -- {End Of Comments}
328 -- ----------------------------------------------------------------------------
329 Procedure chk_business_group_id
330 (p_paye_details_id in number
331 ,p_effective_date in date
332 ,p_business_group_id in number
333 ,p_validation_start_date in date
334 ,p_validation_end_date in date
335 ,p_object_version_number in number
336 );
337 -- ----------------------------------------------------------------------------
338 -- |--------------------< chk_rate_of_tax >-----------------------------------|
339 -- ----------------------------------------------------------------------------
340 -- {Start Of Comments}
341 --
342 -- Description:
343 -- This procedure validates the Labor Contribution values.
344 --
345 -- Prerequisites:
346 --
347 --
348 -- In Parameters:
349 -- p_paye_details_id
350 -- p_effective_date
351 -- p_rate_of_tax
352 -- p_contract_category
353 -- p_validation_start_date
354 -- p_validation_end_date
355 -- p_object_version_number
356 -- p_per_or_asg_id
357 --
358 -- Post Success:
359 -- Processing continues.
360 --
361 -- Post Failure:
362 -- An error is raised if the validation fails.
363 --
364 --
365 -- Access Status:
366 -- Internal Development Use Only.
367 --
368 -- {End Of Comments}
369 -- ----------------------------------------------------------------------------
370 Procedure chk_rate_of_tax
371 (p_paye_details_id in number
372 ,p_effective_date in date
373 ,p_rate_of_tax in varchar2
374 ,p_contract_category in varchar2
375 ,p_validation_start_date in date
376 ,p_validation_end_date in date
377 ,p_object_version_number in number
378 ,p_per_or_asg_id in number
379 );
380 -- ----------------------------------------------------------------------------
381 -- |--------------------< chk_tax_reduction >---------------------------------|
382 -- ----------------------------------------------------------------------------
383 -- {Start Of Comments}
384 --
385 -- Description:
386 -- This procedure validates the Labor Contribution values.
387 --
388 -- Prerequisites:
389 --
390 --
391 -- In Parameters:
392 -- p_paye_details_id
393 -- p_effective_date
394 -- p_tax_reduction
395 -- p_validation_start_date
396 -- p_validation_end_date
397 -- p_object_version_number
398 --
399 -- Post Success:
400 -- Processing continues.
401 --
402 -- Post Failure:
403 -- An error is raised if the validation fails.
404 --
405 --
406 -- Access Status:
407 -- Internal Development Use Only.
408 --
409 -- {End Of Comments}
410 -- ----------------------------------------------------------------------------
411 Procedure chk_tax_reduction
412 (p_paye_details_id in number
413 ,p_effective_date in date
414 ,p_tax_reduction in varchar2
415 ,p_validation_start_date in date
416 ,p_validation_end_date in date
417 ,p_object_version_number in number
418 );
419 -- ----------------------------------------------------------------------------
420 -- |--------------------< chk_tax_calc_with_spouse_child >--------------------|
421 -- ----------------------------------------------------------------------------
422 -- {Start Of Comments}
423 --
424 -- Description:
425 -- This procedure validates the Labor Contribution values.
426 --
427 -- Prerequisites:
428 --
429 --
430 -- In Parameters:
431 -- p_paye_details_id
432 -- p_effective_date
433 -- p_tax_calc_with_spouse_child
434 -- p_validation_start_date
435 -- p_validation_end_date
436 -- p_object_version_number
437 --
438 -- Post Success:
439 -- Processing continues.
440 --
441 -- Post Failure:
442 -- An error is raised if the validation fails.
443 --
444 --
445 -- Access Status:
446 -- Internal Development Use Only.
447 --
448 -- {End Of Comments}
449 -- ----------------------------------------------------------------------------
450 Procedure chk_tax_calc_with_spouse_child
451 (p_paye_details_id in number
452 ,p_effective_date in date
453 ,p_tax_calc_with_spouse_child in varchar2
454 ,p_validation_start_date in date
455 ,p_validation_end_date in date
456 ,p_object_version_number in number
457 );
458 -- ----------------------------------------------------------------------------
459 -- |--------------------< chk_income_reduction >------------------------------|
460 -- ----------------------------------------------------------------------------
461 -- {Start Of Comments}
462 --
463 -- Description:
464 -- This procedure validates the Labor Contribution values.
465 --
466 -- Prerequisites:
467 --
468 --
469 -- In Parameters:
470 -- p_paye_details_id
471 -- p_effective_date
472 -- p_tax_calc_with_spouse_child
473 -- p_validation_start_date
474 -- p_validation_end_date
475 -- p_object_version_number
476 --
477 -- Post Success:
478 -- Processing continues.
479 --
480 -- Post Failure:
481 -- An error is raised if the validation fails.
482 --
483 --
484 -- Access Status:
485 -- Internal Development Use Only.
486 --
487 -- {End Of Comments}
488 -- ----------------------------------------------------------------------------
489 Procedure chk_income_reduction
490 (p_paye_details_id in number
491 ,p_effective_date in date
492 ,p_income_reduction in varchar2
493 ,p_validation_start_date in date
494 ,p_validation_end_date in date
495 ,p_object_version_number in number
496 );
497 end pay_ppd_bus;