1 Package Body pay_ipd_ins as
2 /* $Header: pyipdrhi.pkb 120.4 2011/11/09 12:41:18 rsahai ship $ */
3 --
7 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
8 g_package varchar2(33) := ' pay_ipd_ins.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_insert_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml insert logic for datetrack. The
17 -- functions of this procedure are as follows:
18 -- 1) Get the object_version_number.
19 -- 2) To set the effective start and end dates to the corresponding
20 -- validation start and end dates. Also, the object version number
21 -- record attribute is set.
22 -- 3) To set and unset the g_api_dml status as required (as we are about to
23 -- perform dml).
24 -- 4) To insert the row into the schema with the derived effective start
25 -- and end dates and the object version number.
26 -- 5) To trap any constraint violations that may have occurred.
27 -- 6) To raise any other errors.
28 --
29 -- Prerequisites:
30 -- This is an internal private procedure which must be called from the
31 -- insert_dml and pre_update (logic permitting) procedure and must have
32 -- all mandatory arguments set.
33 --
34 -- In Parameters:
35 -- A Pl/Sql record structure.
36 --
37 -- Post Success:
38 -- The specified row will be inserted into the schema.
39 --
40 -- Post Failure:
41 -- On the insert dml failure it is important to note that we always reset the
42 -- g_api_dml status to false.
43 -- If a check or unique integrity constraint violation is raised the
44 -- constraint_error procedure will be called.
45 -- If any other error is reported, the error will be raised after the
46 -- g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 -- This is an internal datetrack maintenance procedure which should
50 -- not be modified in anyway.
51 --
52 -- Access Status:
53 -- Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_insert_dml
58 (p_rec in out nocopy pay_ipd_shd.g_rec_type
59 ,p_effective_date in date
60 ,p_datetrack_mode in varchar2
61 ,p_validation_start_date in date
62 ,p_validation_end_date in date
63 ) is
64 -- Cursor to select 'old' created AOL who column values
65 --
66 Cursor C_Sel1 Is
67 select t.created_by,
68 t.creation_date
69 from pay_ie_paye_details_f t
70 where t.paye_details_id = p_rec.paye_details_id
71 and t.effective_start_date =
72 pay_ipd_shd.g_old_rec.effective_start_date
73 and t.effective_end_date = (p_validation_start_date - 1);
74 --
75 l_proc varchar2(72) := g_package||'dt_insert_dml';
76 l_created_by pay_ie_paye_details_f.created_by%TYPE;
77 l_creation_date pay_ie_paye_details_f.creation_date%TYPE;
78 l_last_update_date pay_ie_paye_details_f.last_update_date%TYPE;
79 l_last_updated_by pay_ie_paye_details_f.last_updated_by%TYPE;
80 l_last_update_login pay_ie_paye_details_f.last_update_login%TYPE;
81 --
82 Begin
83 hr_utility.set_location('Entering:'||l_proc, 5);
84 --
85 -- Get the object version number for the insert
86 --
87 p_rec.object_version_number :=
88 dt_api.get_object_version_number
89 (p_base_table_name => 'pay_ie_paye_details_f'
90 ,p_base_key_column => 'paye_details_id'
91 ,p_base_key_value => p_rec.paye_details_id
92 );
93 --
94 -- Set the effective start and end dates to the corresponding
95 -- validation start and end dates
96 --
97 p_rec.effective_start_date := p_validation_start_date;
98 p_rec.effective_end_date := p_validation_end_date;
99 --
100 -- If the datetrack_mode is not INSERT then we must populate the WHO
101 -- columns with the 'old' creation values and 'new' updated values.
102 --
103 If (p_datetrack_mode <> hr_api.g_insert) then
104 hr_utility.set_location(l_proc, 10);
105 --
106 -- Select the 'old' created values
107 --
108 Open C_Sel1;
109 Fetch C_Sel1 Into l_created_by, l_creation_date;
110 If C_Sel1%notfound Then
111 --
112 -- The previous 'old' created row has not been found. We need
113 -- to error as an internal datetrack problem exists.
114 --
115 Close C_Sel1;
116 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
117 fnd_message.set_token('PROCEDURE', l_proc);
118 fnd_message.set_token('STEP','10');
119 fnd_message.raise_error;
120 End If;
121 Close C_Sel1;
122 --
123 -- Set the AOL updated WHO values
124 --
125 l_last_update_date := sysdate;
126 l_last_updated_by := fnd_global.user_id;
127 l_last_update_login := fnd_global.login_id;
128 End If;
129 --
130 --
131 --
132 -- Insert the row into: pay_ie_paye_details_f
133 --
134 insert into pay_ie_paye_details_f
135 (paye_details_id
136 ,effective_start_date
137 ,effective_end_date
138 ,object_version_number
139 ,assignment_id
140 ,info_source
141 ,comm_period_no
142 ,tax_basis
143 ,certificate_start_date
144 ,certificate_end_date
145 ,tax_assess_basis
146 ,weekly_tax_credit
147 ,weekly_std_rate_cut_off
148 ,monthly_tax_credit
149 ,monthly_std_rate_cut_off
150 ,request_id
151 ,program_application_id
152 ,program_id
153 ,program_update_date
154 ,certificate_issue_date
155 ,created_by
156 ,creation_date
157 ,last_update_date
158 ,last_updated_by
159 ,last_update_login
160 --13359423
161 ,yrly_tax_cred
162 ,yrly_tax_rate_1
163 ,yrly_tax_rate_2
164 ,mthly_tax_rate_2
165 ,wkly_tax_rate_2
166 ,tax_rate_3
167 ,yrly_tax_rate_3
168 ,mthly_tax_rate_3
169 ,wkly_tax_rate_3
170 ,tax_rate_4
171 ,yrly_tax_rate_4
172 ,mthly_tax_rate_4
173 ,wkly_tax_rate_4
174 ,tax_rate_5
175 ,in_exempt_usc
176 ,total_usc_pay_todate
177 ,total_usc_tax_todate
178 ,usc_rate_1
179 ,usc_yrly_cutoff_1
180 ,usc_mthly_cutoff_1
181 ,usc_wkly_cutoff_1
182 ,usc_rate_2
183 ,usc_yrly_cutoff_2
184 ,usc_mthly_cutoff_2
185 ,usc_wkly_cutoff_2
186 ,usc_rate_3
187 ,usc_yrly_cutoff_3
188 ,usc_mthly_cutoff_3
189 ,usc_wkly_cutoff_3
190 ,usc_rate_4
191 ,usc_yrly_cutoff_4
192 ,usc_mthly_cutoff_4
193 ,usc_wkly_cutoff_4
194 ,usc_rate_5
195 ,usc_tax_basis
196 ,usc_info_source
197 --13359423
198 )
199 Values
200 (p_rec.paye_details_id
201 ,p_rec.effective_start_date
202 ,p_rec.effective_end_date
203 ,p_rec.object_version_number
204 ,p_rec.assignment_id
205 ,p_rec.info_source
206 ,p_rec.comm_period_no
207 ,p_rec.tax_basis
208 ,p_rec.certificate_start_date
209 ,p_rec.certificate_end_date
210 ,p_rec.tax_assess_basis
211 ,p_rec.weekly_tax_credit
212 ,p_rec.weekly_std_rate_cut_off
213 ,p_rec.monthly_tax_credit
214 ,p_rec.monthly_std_rate_cut_off
215 ,p_rec.request_id
216 ,p_rec.program_application_id
217 ,p_rec.program_id
218 ,p_rec.program_update_date
219 ,p_rec.certificate_issue_date
220 ,l_created_by
221 ,l_creation_date
222 ,l_last_update_date
223 ,l_last_updated_by
224 ,l_last_update_login
225 --13359423
226 ,p_rec.yrly_tax_cred
227 ,p_rec.yrly_tax_rate_1
228 ,p_rec.yrly_tax_rate_2
229 ,p_rec.mthly_tax_rate_2
230 ,p_rec.wkly_tax_rate_2
231 ,p_rec.tax_rate_3
232 ,p_rec.yrly_tax_rate_3
233 ,p_rec.mthly_tax_rate_3
234 ,p_rec.wkly_tax_rate_3
235 ,p_rec.tax_rate_4
236 ,p_rec.yrly_tax_rate_4
237 ,p_rec.mthly_tax_rate_4
238 ,p_rec.wkly_tax_rate_4
239 ,p_rec.tax_rate_5
240 ,p_rec.in_exempt_usc
241 ,p_rec.total_usc_pay_todate
242 ,p_rec.total_usc_tax_todate
243 ,p_rec.usc_rate_1
244 ,p_rec.usc_yrly_cutoff_1
245 ,p_rec.usc_mthly_cutoff_1
246 ,p_rec.usc_wkly_cutoff_1
247 ,p_rec.usc_rate_2
248 ,p_rec.usc_yrly_cutoff_2
249 ,p_rec.usc_mthly_cutoff_2
250 ,p_rec.usc_wkly_cutoff_2
251 ,p_rec.usc_rate_3
252 ,p_rec.usc_yrly_cutoff_3
253 ,p_rec.usc_mthly_cutoff_3
254 ,p_rec.usc_wkly_cutoff_3
255 ,p_rec.usc_rate_4
256 ,p_rec.usc_yrly_cutoff_4
257 ,p_rec.usc_mthly_cutoff_4
258 ,p_rec.usc_wkly_cutoff_4
259 ,p_rec.usc_rate_5
260 ,p_rec.usc_tax_basis
261 ,p_rec.usc_info_source
262 --13359423
263 );
264 --
265 --
266 hr_utility.set_location(' Leaving:'||l_proc, 15);
267 --
268 Exception
269 When hr_api.check_integrity_violated Then
270 -- A check constraint has been violated
271 --
272 pay_ipd_shd.constraint_error
273 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
274 When hr_api.unique_integrity_violated Then
275 -- Unique integrity has been violated
276 --
277 pay_ipd_shd.constraint_error
278 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
279 When Others Then
280 --
281 Raise;
282 End dt_insert_dml;
283 --
284 -- ----------------------------------------------------------------------------
285 -- |------------------------------< insert_dml >------------------------------|
286 -- ----------------------------------------------------------------------------
287 Procedure insert_dml
288 (p_rec in out nocopy pay_ipd_shd.g_rec_type
289 ,p_effective_date in date
290 ,p_datetrack_mode in varchar2
291 ,p_validation_start_date in date
292 ,p_validation_end_date in date
293 ) is
294 --
295 l_proc varchar2(72) := g_package||'insert_dml';
296 --
297 Begin
298 hr_utility.set_location('Entering:'||l_proc, 5);
299 --
300 pay_ipd_ins.dt_insert_dml
301 (p_rec => p_rec
302 ,p_effective_date => p_effective_date
303 ,p_datetrack_mode => p_datetrack_mode
304 ,p_validation_start_date => p_validation_start_date
305 ,p_validation_end_date => p_validation_end_date
306 );
307 --
308 hr_utility.set_location(' Leaving:'||l_proc, 10);
309 End insert_dml;
310 --
311 -- ----------------------------------------------------------------------------
312 -- |------------------------------< pre_insert >------------------------------|
313 -- ----------------------------------------------------------------------------
314 -- {Start Of Comments}
315 --
316 -- Description:
317 -- This private procedure contains any processing which is required before
318 -- the insert dml. Presently, if the entity has a corresponding primary
319 -- key which is maintained by an associating sequence, the primary key for
320 -- the entity will be populated with the next sequence value in
321 -- preparation for the insert dml.
322 -- Also, if comments are defined for this entity, the comments insert
323 -- logic will also be called, generating a comment_id if required.
324 --
325 -- Prerequisites:
326 -- This is an internal procedure which is called from the ins procedure.
327 --
328 -- In Parameters:
329 -- A Pl/Sql record structure.
330 --
331 -- Post Success:
332 -- Processing continues.
333 --
334 -- Post Failure:
335 -- If an error has occurred, an error message and exception will be raised
336 -- but not handled.
337 --
338 -- Developer Implementation Notes:
339 -- Any pre-processing required before the insert dml is issued should be
340 -- coded within this procedure. As stated above, a good example is the
341 -- generation of a primary key number via a corresponding sequence.
342 -- It is important to note that any 3rd party maintenance should be reviewed
343 -- before placing in this procedure.
344 --
345 -- Access Status:
346 -- Internal Row Handler Use Only.
347 --
348 -- {End Of Comments}
349 -- ----------------------------------------------------------------------------
350 Procedure pre_insert
351 (p_rec in out nocopy pay_ipd_shd.g_rec_type
352 ,p_effective_date in date
353 ,p_datetrack_mode in varchar2
354 ,p_validation_start_date in date
355 ,p_validation_end_date in date
356 ) is
357 --
358 l_proc varchar2(72) := g_package||'pre_insert';
359 --
360 Cursor C_Sel1 is select pay_ie_paye_details_s.nextval from sys.dual;
361 --
362 Begin
363 hr_utility.set_location('Entering:'||l_proc, 5);
364 --
365 --
366 -- Select the next sequence number
367 --
368 Open C_Sel1;
369 Fetch C_Sel1 Into p_rec.paye_details_id;
370 Close C_Sel1;
371 --
372 --
373 hr_utility.set_location(' Leaving:'||l_proc, 10);
374 End pre_insert;
375 --
376 -- ----------------------------------------------------------------------------
377 -- |----------------------------< post_insert >-------------------------------|
378 -- ----------------------------------------------------------------------------
379 -- {Start Of Comments}
380 --
381 -- Description:
382 -- This private procedure contains any processing which is required after
383 -- the insert dml.
384 --
385 -- Prerequisites:
386 -- This is an internal procedure which is called from the ins procedure.
387 --
388 -- In Parameters:
389 -- A Pl/Sql record structure.
390 --
391 -- Post Success:
392 -- Processing continues.
393 --
394 -- Post Failure:
395 -- If an error has occurred, an error message and exception will be raised
396 -- but not handled.
397 --
398 -- Developer Implementation Notes:
399 -- Any post-processing required after the insert dml is issued should be
400 -- coded within this procedure. It is important to note that any 3rd party
401 -- maintenance should be reviewed before placing in this procedure.
402 --
403 -- Access Status:
404 -- Internal Row Handler Use Only.
405 --
406 -- {End Of Comments}
407 -- ----------------------------------------------------------------------------
408 Procedure post_insert
409 (p_rec in pay_ipd_shd.g_rec_type
410 ,p_effective_date in date
411 ,p_datetrack_mode in varchar2
412 ,p_validation_start_date in date
413 ,p_validation_end_date in date
414 ) is
415 --
416 l_proc varchar2(72) := g_package||'post_insert';
417 --
418 Begin
419 hr_utility.set_location('Entering:'||l_proc, 5);
420 begin
421 --
422 pay_ipd_rki.after_insert
423 (p_effective_date
424 => p_effective_date
425 ,p_validation_start_date
426 => p_validation_start_date
427 ,p_validation_end_date
428 => p_validation_end_date
429 ,p_paye_details_id
430 => p_rec.paye_details_id
431 ,p_effective_start_date
432 => p_rec.effective_start_date
433 ,p_effective_end_date
434 => p_rec.effective_end_date
435 ,p_object_version_number
436 => p_rec.object_version_number
437 ,p_assignment_id
438 => p_rec.assignment_id
439 ,p_info_source
440 => p_rec.info_source
441 ,p_comm_period_no
442 => p_rec.comm_period_no
443 ,p_tax_basis
444 => p_rec.tax_basis
445 ,p_certificate_start_date
446 => p_rec.certificate_start_date
447 ,p_certificate_end_date
448 => p_rec.certificate_end_date
449 ,p_tax_assess_basis
450 => p_rec.tax_assess_basis
451 ,p_weekly_tax_credit
452 => p_rec.weekly_tax_credit
453 ,p_weekly_std_rate_cut_off
454 => p_rec.weekly_std_rate_cut_off
455 ,p_monthly_tax_credit
456 => p_rec.monthly_tax_credit
457 ,p_monthly_std_rate_cut_off
458 => p_rec.monthly_std_rate_cut_off
459 ,p_request_id
460 => p_rec.request_id
461 ,p_program_application_id
462 => p_rec.program_application_id
463 ,p_program_id
464 => p_rec.program_id
465 ,p_program_update_date
469 );
466 => p_rec.program_update_date
467 ,p_certificate_issue_date
468 => p_rec.certificate_issue_date
470 --
471 exception
472 --
473 when hr_api.cannot_find_prog_unit then
474 --
475 hr_api.cannot_find_prog_unit_error
476 (p_module_name => 'PAY_IE_PAYE_DETAILS_F'
477 ,p_hook_type => 'AI');
478 --
479 end;
480 --
481 hr_utility.set_location(' Leaving:'||l_proc, 10);
482 End post_insert;
483 --
484 -- ----------------------------------------------------------------------------
485 -- |-------------------------------< ins_lck >--------------------------------|
486 -- ----------------------------------------------------------------------------
487 -- {Start Of Comments}
488 --
489 -- Description:
490 -- The ins_lck process has one main function to perform. When inserting
491 -- a datetracked row, we must validate the DT mode.
492 --
493 -- Prerequisites:
494 -- This procedure can only be called for the datetrack mode of INSERT.
495 --
496 -- In Parameters:
497 --
498 -- Post Success:
499 -- On successful completion of the ins_lck process the parental
500 -- datetracked rows will be locked providing the p_enforce_foreign_locking
501 -- argument value is TRUE.
502 -- If the p_enforce_foreign_locking argument value is FALSE then the
503 -- parential rows are not locked.
504 --
505 -- Post Failure:
506 -- The Lck process can fail for:
507 -- 1) When attempting to lock the row the row could already be locked by
508 -- another user. This will raise the HR_Api.Object_Locked exception.
509 -- 2) When attempting to the lock the parent which doesn't exist.
510 -- For the entity to be locked the parent must exist!
511 --
512 -- Developer Implementation Notes:
513 -- None.
514 --
515 -- Access Status:
516 -- Internal Row Handler Use Only.
517 --
518 -- {End Of Comments}
519 -- ----------------------------------------------------------------------------
520 Procedure ins_lck
521 (p_effective_date in date
522 ,p_datetrack_mode in varchar2
523 ,p_rec in pay_ipd_shd.g_rec_type
524 ,p_validation_start_date out nocopy date
525 ,p_validation_end_date out nocopy date
526 ) is
527 --
528 l_proc varchar2(72) := g_package||'ins_lck';
529 l_validation_start_date date;
530 l_validation_end_date date;
531 --
532 Begin
533 hr_utility.set_location('Entering:'||l_proc, 5);
534 --
535 -- Validate the datetrack mode mode getting the validation start
536 -- and end dates for the specified datetrack operation.
537 --
538 dt_api.validate_dt_mode
539 (p_effective_date => p_effective_date
540 ,p_datetrack_mode => p_datetrack_mode
541 ,p_base_table_name => 'pay_ie_paye_details_f'
542 ,p_base_key_column => 'paye_details_id'
543 ,p_base_key_value => p_rec.paye_details_id
544 ,p_parent_table_name1 => 'per_all_assignments_f'
545 ,p_parent_key_column1 => 'assignment_id'
546 ,p_parent_key_value1 => p_rec.assignment_id
547 ,p_enforce_foreign_locking => true
548 ,p_validation_start_date => l_validation_start_date
549 ,p_validation_end_date => l_validation_end_date
550 );
551 --
552 -- Set the validation start and end date OUT arguments
553 --
554 p_validation_start_date := l_validation_start_date;
555 p_validation_end_date := l_validation_end_date;
556 --
557 hr_utility.set_location(' Leaving:'||l_proc, 10);
558 --
559 End ins_lck;
560 --
561 -- ----------------------------------------------------------------------------
562 -- |---------------------------------< ins >----------------------------------|
563 -- ----------------------------------------------------------------------------
564 Procedure ins
565 (p_effective_date in date
566 ,p_rec in out nocopy pay_ipd_shd.g_rec_type
567 ) is
568 --
569 l_proc varchar2(72) := g_package||'ins';
570 l_datetrack_mode varchar2(30) := hr_api.g_insert;
571 l_validation_start_date date;
572 l_validation_end_date date;
573 --
574 Begin
575 hr_utility.set_location('Entering:'||l_proc, 5);
576 --
577 -- Call the lock operation
578 --
579 pay_ipd_ins.ins_lck
580 (p_effective_date => p_effective_date
581 ,p_datetrack_mode => l_datetrack_mode
582 ,p_rec => p_rec
583 ,p_validation_start_date => l_validation_start_date
584 ,p_validation_end_date => l_validation_end_date
585 );
586 --
587 -- Call the supporting insert validate operations
588 --
589 pay_ipd_bus.insert_validate
590 (p_rec => p_rec
591 ,p_effective_date => p_effective_date
592 ,p_datetrack_mode => l_datetrack_mode
593 ,p_validation_start_date => l_validation_start_date
594 ,p_validation_end_date => l_validation_end_date
595 );
596 --
597 -- Call the supporting pre-insert operation
598 --
599 pay_ipd_ins.pre_insert
600 (p_rec => p_rec
601 ,p_effective_date => p_effective_date
602 ,p_datetrack_mode => l_datetrack_mode
603 ,p_validation_start_date => l_validation_start_date
604 ,p_validation_end_date => l_validation_end_date
605 );
606 --
607 -- Insert the row
608 --
609 pay_ipd_ins.insert_dml
610 (p_rec => p_rec
611 ,p_effective_date => p_effective_date
612 ,p_datetrack_mode => l_datetrack_mode
613 ,p_validation_start_date => l_validation_start_date
614 ,p_validation_end_date => l_validation_end_date
615 );
616 --
617 -- Call the supporting post-insert operation
618 --
619 pay_ipd_ins.post_insert
620 (p_rec => p_rec
621 ,p_effective_date => p_effective_date
622 ,p_datetrack_mode => l_datetrack_mode
623 ,p_validation_start_date => l_validation_start_date
624 ,p_validation_end_date => l_validation_end_date
625 );
626 --
627 hr_utility.set_location('Leaving:'||l_proc,10);
628 end ins;
629 --
630 -- ----------------------------------------------------------------------------
631 -- |---------------------------------< ins >----------------------------------|
632 -- ----------------------------------------------------------------------------
633 Procedure ins
634 (p_effective_date in date
635 ,p_assignment_id in number
636 ,p_info_source in varchar2
637 ,p_comm_period_no in number
638 ,p_tax_basis in varchar2
639 ,p_certificate_start_date in date
640 ,p_tax_assess_basis in varchar2
641 ,p_certificate_end_date in date default null
642 ,p_weekly_tax_credit in number default null
643 ,p_weekly_std_rate_cut_off in number default null
644 ,p_monthly_tax_credit in number default null
645 ,p_monthly_std_rate_cut_off in number default null
646 ,p_request_id in number default null
647 ,p_program_application_id in number default null
648 ,p_program_id in number default null
649 ,p_program_update_date in date default null
650 ,p_certificate_issue_date in date default null
651 ,p_paye_details_id out nocopy number
652 ,p_object_version_number out nocopy number
653 ,p_effective_start_date out nocopy date
654 ,p_effective_end_date out nocopy date
655 --13359423
656 ,p_yrly_tax_cred in NUMBER DEFAULT NULL
657 ,p_yrly_tax_rate_1 in number default null
658 ,p_yrly_tax_rate_2 in number default null
659 ,p_mthly_tax_rate_2 in number default null
660 ,p_wkly_tax_rate_2 in number default null
661 ,p_tax_rate_3 in number default null
662 ,p_yrly_tax_rate_3 in number default null
663 ,p_mthly_tax_rate_3 in number default null
664 ,p_wkly_tax_rate_3 in number default null
665 ,p_tax_rate_4 in number default null
666 ,p_yrly_tax_rate_4 in number default null
667 ,p_mthly_tax_rate_4 in number default null
668 ,p_wkly_tax_rate_4 in number default null
669 ,p_tax_rate_5 in number default null
670 ,p_in_exempt_usc in varchar2 default null
671 ,p_total_usc_pay_todate in number default null
672 ,p_total_usc_tax_todate in number default null
673 ,p_usc_rate_1 in number default null
674 ,p_usc_yrly_cutoff_1 in number default null
675 ,p_usc_mthly_cutoff_1 in number default null
676 ,p_usc_wkly_cutoff_1 in number default null
677 ,p_usc_rate_2 in number default null
678 ,p_usc_yrly_cutoff_2 in number default null
679 ,p_usc_mthly_cutoff_2 in number default null
680 ,p_usc_wkly_cutoff_2 in number default null
681 ,p_usc_rate_3 in number default null
682 ,p_usc_yrly_cutoff_3 in number default null
683 ,p_usc_mthly_cutoff_3 in number default null
684 ,p_usc_wkly_cutoff_3 in number default null
685 ,p_usc_rate_4 in number default null
686 ,p_usc_yrly_cutoff_4 in number default null
687 ,p_usc_mthly_cutoff_4 in number default null
688 ,p_usc_wkly_cutoff_4 in number default null
689 ,p_usc_rate_5 in number default null
690 ,p_usc_tax_basis in varchar2 default null
691 ,p_usc_info_source in varchar2 default null
692 --13359423
693 ) is
694 --
695 l_rec pay_ipd_shd.g_rec_type;
696 l_proc varchar2(72) := g_package||'ins';
697 --
698 Begin
699 hr_utility.set_location('Entering:'||l_proc, 5);
700 --
701 -- Call conversion function to turn arguments into the
702 -- p_rec structure.
703 --
704 l_rec :=
705 pay_ipd_shd.convert_args
706 (null
707 ,null
708 ,null
709 ,null
710 ,p_assignment_id
711 ,p_info_source
712 ,p_comm_period_no
713 ,p_tax_basis
714 ,p_certificate_start_date
715 ,p_certificate_end_date
716 ,p_tax_assess_basis
717 ,p_weekly_tax_credit
718 ,p_weekly_std_rate_cut_off
719 ,p_monthly_tax_credit
720 ,p_monthly_std_rate_cut_off
721 ,p_request_id
722 ,p_program_application_id
723 ,p_program_id
724 ,p_program_update_date
725 ,p_certificate_issue_date
726 --13359423
727 ,p_yrly_tax_cred
728 ,p_yrly_tax_rate_1
729 ,p_yrly_tax_rate_2
730 ,p_mthly_tax_rate_2
731 ,p_wkly_tax_rate_2
732 ,p_tax_rate_3
733 ,p_yrly_tax_rate_3
734 ,p_mthly_tax_rate_3
735 ,p_wkly_tax_rate_3
736 ,p_tax_rate_4
737 ,p_yrly_tax_rate_4
738 ,p_mthly_tax_rate_4
739 ,p_wkly_tax_rate_4
740 ,p_tax_rate_5
741 ,p_in_exempt_usc
742 ,p_total_usc_pay_todate
743 ,p_total_usc_tax_todate
744 ,p_usc_rate_1
745 ,p_usc_yrly_cutoff_1
746 ,p_usc_mthly_cutoff_1
747 ,p_usc_wkly_cutoff_1
748 ,p_usc_rate_2
749 ,p_usc_yrly_cutoff_2
750 ,p_usc_mthly_cutoff_2
751 ,p_usc_wkly_cutoff_2
752 ,p_usc_rate_3
753 ,p_usc_yrly_cutoff_3
754 ,p_usc_mthly_cutoff_3
755 ,p_usc_wkly_cutoff_3
756 ,p_usc_rate_4
757 ,p_usc_yrly_cutoff_4
758 ,p_usc_mthly_cutoff_4
759 ,p_usc_wkly_cutoff_4
760 ,p_usc_rate_5
761 ,p_usc_tax_basis
762 ,p_usc_info_source
763 --13359423
764 );
765 --
766 -- Having converted the arguments into the pay_ipd_rec
767 -- plsql record structure we call the corresponding record
768 -- business process.
769 --
770 pay_ipd_ins.ins
771 (p_effective_date
772 ,l_rec
773 );
774 --
775 -- Set the OUT arguments.
776 --
777 p_paye_details_id := l_rec.paye_details_id;
778 p_effective_start_date := l_rec.effective_start_date;
779 p_effective_end_date := l_rec.effective_end_date;
780 p_object_version_number := l_rec.object_version_number;
781 --
782 --
783 hr_utility.set_location(' Leaving:'||l_proc, 10);
784 End ins;
785 --
786 end pay_ipd_ins;