[Home] [Help]
PACKAGE BODY: APPS.PAY_BCT_BUS
Source
1 Package Body pay_bct_bus as
2 /* $Header: pybctrhi.pkb 120.0.12000000.4 2007/08/20 08:21:49 ayegappa noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pay_bct_bus.'; -- Global package name
9 --
10 -- The following two global variables are only to be
11 -- used by the return_legislation_code function.
12 --
13 g_legislation_code varchar2(150) default null;
14 g_batch_control_id number default null;
15 --
16 -- ---------------------------------------------------------------------------
17 -- |----------------------< set_security_group_id >--------------------------|
18 -- ---------------------------------------------------------------------------
19 --
20 Procedure set_security_group_id
21 (p_batch_control_id in number
22 ) is
23 --
24 -- Declare cursor
25 --
26 -- In the following cursor statement add join(s) between
27 -- pay_batch_control_totals and PER_BUSINESS_GROUPS
28 -- so that the security_group_id for
29 -- the current business group context can be derived.
30 -- Remove this comment when the edit has been completed.
31 cursor csr_sec_grp is
32 select pbg.security_group_id
33 from per_business_groups pbg
34 , pay_batch_control_totals bct
35 , pay_batch_headers bth
36 where bct.batch_control_id = p_batch_control_id
37 and bth.batch_id = bct.batch_id
38 and pbg.business_group_id = bth.business_group_id;
39 --
40 -- Declare local variables
41 --
42 l_security_group_id number;
43 l_proc varchar2(72) := g_package||'set_security_group_id';
44 --
45 begin
46 --
47 hr_utility.set_location('Entering:'|| l_proc, 10);
48 --
49 -- Ensure that all the mandatory parameter are not null
50 --
51 hr_api.mandatory_arg_error
52 (p_api_name => l_proc
53 ,p_argument => 'batch_control_id'
54 ,p_argument_value => p_batch_control_id
55 );
56 --
57 open csr_sec_grp;
58 fetch csr_sec_grp into l_security_group_id;
59 --
60 if csr_sec_grp%notfound then
61 --
62 close csr_sec_grp;
63 --
64 -- The primary key is invalid therefore we must error
65 --
66 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
67 fnd_message.raise_error;
68 --
69 end if;
70 close csr_sec_grp;
71 --
72 -- Set the security_group_id in CLIENT_INFO
73 --
74 hr_api.set_security_group_id
75 (p_security_group_id => l_security_group_id
76 );
77 --
78 hr_utility.set_location(' Leaving:'|| l_proc, 20);
79 --
80 end set_security_group_id;
81 --
82 -- ---------------------------------------------------------------------------
83 -- |---------------------< return_legislation_code >-------------------------|
84 -- ---------------------------------------------------------------------------
85 --
86 Function return_legislation_code
87 (p_batch_control_id in number
88 )
89 Return Varchar2 Is
90 --
91 -- Declare cursor
92 --
93 -- In the following cursor statement add join(s) between
94 -- pay_batch_control_totals and PER_BUSINESS_GROUPS
95 -- so that the legislation_code for
96 -- the current business group context can be derived.
97 -- Remove this comment when the edit has been completed.
98 cursor csr_leg_code is
99 select pbg.legislation_code
100 from per_business_groups pbg
101 , pay_batch_control_totals bct
102 , pay_batch_headers bth
103 where bct.batch_control_id = p_batch_control_id
104 and bth.batch_id = bct.batch_id
105 and pbg.business_group_id = bth.business_group_id;
106 --
107 -- Declare local variables
108 --
109 l_legislation_code varchar2(150);
110 l_proc varchar2(72) := g_package||'return_legislation_code';
111 --
112 Begin
113 --
114 hr_utility.set_location('Entering:'|| l_proc, 10);
115 --
116 -- Ensure that all the mandatory parameter are not null
117 --
118 hr_api.mandatory_arg_error
119 (p_api_name => l_proc
120 ,p_argument => 'batch_control_id'
121 ,p_argument_value => p_batch_control_id
122 );
123 --
124 if ( nvl(pay_bct_bus.g_batch_control_id, hr_api.g_number)
125 = p_batch_control_id) then
126 --
127 -- The legislation code has already been found with a previous
128 -- call to this function. Just return the value in the global
129 -- variable.
130 --
131 l_legislation_code := pay_bct_bus.g_legislation_code;
132 hr_utility.set_location(l_proc, 20);
133 else
134 --
135 -- The ID is different to the last call to this function
136 -- or this is the first call to this function.
137 --
138 open csr_leg_code;
139 fetch csr_leg_code into l_legislation_code;
140 --
141 if csr_leg_code%notfound then
142 --
143 -- The primary key is invalid therefore we must error
144 --
145 close csr_leg_code;
146 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
147 fnd_message.raise_error;
148 end if;
149 hr_utility.set_location(l_proc,30);
150 --
151 -- Set the global variables so the values are
152 -- available for the next call to this function.
153 --
154 close csr_leg_code;
155 pay_bct_bus.g_batch_control_id := p_batch_control_id;
156 pay_bct_bus.g_legislation_code := l_legislation_code;
157 end if;
158 hr_utility.set_location(' Leaving:'|| l_proc, 40);
159 return l_legislation_code;
160 end return_legislation_code;
161 --
162 -- ----------------------------------------------------------------------------
163 -- |-----------------------< chk_non_updateable_args >------------------------|
164 -- ----------------------------------------------------------------------------
165 -- {Start Of Comments}
166 --
167 -- Description:
168 -- This procedure is used to ensure that non updateable attributes have
169 -- not been updated. If an attribute has been updated an error is generated.
170 --
171 -- Pre Conditions:
172 -- g_old_rec has been populated with details of the values currently in
173 -- the database.
174 --
175 -- In Arguments:
176 -- p_rec has been populated with the updated values the user would like the
177 -- record set to.
178 --
179 -- Post Success:
180 -- Processing continues if all the non updateable attributes have not
181 -- changed.
182 --
183 -- Post Failure:
184 -- An application error is raised if any of the non updatable attributes
185 -- have been altered.
186 --
187 -- {End Of Comments}
188 -- ----------------------------------------------------------------------------
189 Procedure chk_non_updateable_args
190 (p_rec in pay_bct_shd.g_rec_type
191 ) IS
192 --
193 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
194 l_error EXCEPTION;
195 l_argument varchar2(30);
196 --
197 Begin
198 --
199 -- Only proceed with the validation if a row exists for the current
200 -- record in the HR Schema.
201 --
202 IF NOT pay_bct_shd.api_updating
203 (p_batch_control_id => p_rec.batch_control_id
204 ,p_object_version_number => p_rec.object_version_number
205 ) THEN
206 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
207 fnd_message.set_token('PROCEDURE ', l_proc);
208 fnd_message.set_token('STEP ', '5');
209 fnd_message.raise_error;
210 END IF;
211 --
212 hr_utility.set_location(l_proc, 10);
213 --
214 if nvl(p_rec.batch_id, hr_api.g_number) <>
215 pay_bct_shd.g_old_rec.batch_id then
216 l_argument := 'batch_id';
217 raise l_error;
218 end if;
219 --
220 EXCEPTION
221 WHEN l_error THEN
222 hr_api.argument_changed_error
223 (p_api_name => l_proc
224 ,p_argument => l_argument);
225 WHEN OTHERS THEN
226 RAISE;
227 End chk_non_updateable_args;
228 --
229 -- ----------------------------------------------------------------------------
230 -- |-----------------------< chk_transferred_status >-------------------------|
231 -- ----------------------------------------------------------------------------
232 --
233 -- Desciption :
234 --
235 -- Check whether the existing batch control is transferred or not. If it
236 -- is transferred then raise error.
237 --
238 --
239 -- Pre-conditions :
240 --
241 --
242 -- In Arguments :
243 -- p_batch_control_id
244 --
245 -- Post Success :
246 -- Processing continues
247 --
248 -- Post Failure :
249 -- An application error will be raised and processing is
250 -- terminated
251 --
252 -- Access Status :
253 -- Internal Table Handler Use only.
254 --
255 -- {End of Comments}
256 --
257 -- ---------------------------------------------------------------------------
258 Procedure chk_transferred_status (p_batch_control_id number) Is
259 --
260 cursor csr_status is
261 select 'Y'
262 from pay_batch_control_totals pct
263 where pct.batch_control_id = p_batch_control_id
264 and pct.control_status = 'T';
265 --
266 l_transferred varchar2(1);
267 --
268 Begin
269 --
270 open csr_status;
271 fetch csr_status into l_transferred;
272 if csr_status%found then
273 close csr_status;
274 Fnd_Message.Set_Name('PER', 'HR_289754_BEE_REC_TRANSFERRED');
275 fnd_message.raise_error;
276 end if;
277 --
278 close csr_status;
279 --
280 End chk_transferred_status;
281 --
282 -- ---------------------------------------------------------------------------
283 -- |----------------------------< chk_batch_id >----------------------------|
284 -- ---------------------------------------------------------------------------
285 --
286 -- Desciption :
287 --
288 -- Validate that on insert BATCH_ID is not null and that
289 -- it exists in pay_batch_headers.
290 --
291 --
292 -- Pre-conditions :
293 --
294 --
295 -- In Arguments :
296 -- p_batch_control_id
297 -- p_batch_id
298 --
299 -- Post Success :
300 -- Processing continues
301 --
302 -- Post Failure :
303 -- An application error will be raised and processing is
304 -- terminated
305 --
306 -- Access Status :
307 -- Internal Table Handler Use only.
308 --
309 -- {End of Comments}
310 --
311 -- ---------------------------------------------------------------------------
312 procedure chk_batch_id
313 (p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE,
314 p_batch_id in pay_batch_control_totals.batch_id%TYPE
315 ) is
316 --
317 l_proc varchar2(72) := g_package||'chk_batch_id';
318 l_dummy number;
319 --
320 cursor csr_batch_id_exists is
321 select null
322 from pay_batch_headers bth
323 where bth.batch_id = p_batch_id;
324 --
325 begin
326 hr_utility.set_location('Entering:'||l_proc, 1);
327 --
328 -- Check mandatory batch_id is set
329 --
330 hr_api.mandatory_arg_error
331 (p_api_name => l_proc
332 ,p_argument => 'BATCH_ID'
333 ,p_argument_value => p_batch_id
334 );
335 --
336 hr_utility.set_location(l_proc, 5);
337 --
338 --
339 --
340 -- Only proceed with validation if :
341 -- a) on insert (non-updateable param)
342 --
343 if (p_batch_control_id is null) then
344 --
345 hr_utility.set_location(l_proc, 10);
346 --
347 -- Check that the batch_id is in the pay_batch_headers.
348 --
349 open csr_batch_id_exists;
350 fetch csr_batch_id_exists into l_dummy;
351 if csr_batch_id_exists%notfound then
352 close csr_batch_id_exists;
353 pay_bct_shd.constraint_error('PAY_BATCH_CONTROL_TOTALS_FK1');
354 end if;
355 close csr_batch_id_exists;
356 end if;
357 --
358 hr_utility.set_location(' Leaving:'||l_proc, 15);
359 --
360 end chk_batch_id;
361 --
362 -- ---------------------------------------------------------------------------
363 -- |-------------------------< chk_control_status >-----------------------|
364 -- ---------------------------------------------------------------------------
365 --
366 -- Desciption :
367 --
368 -- Validate that on insert and update control_status is not null.
369 -- Also to validate against HR_LOOKUP.LOOKUP_CODE where LOOKUP_TYPE
370 -- 'BATCH_STATUS'.
371 --
372 --
373 -- Pre-conditions :
374 --
375 --
376 -- In Arguments :
377 -- p_control_status
378 -- p_session_date
379 -- p_batch_control_id
380 -- p_object_version_number
381 --
382 -- Post Success :
383 -- Processing continues
384 --
385 -- Post Failure :
386 -- An application error will be raised and processing is
387 -- terminated
388 --
389 -- Access Status :
390 -- Internal Table Handler Use only.
391 --
392 -- {End of Comments}
393 --
394 -- ---------------------------------------------------------------------------
395 procedure chk_control_status
396 (p_control_status in pay_batch_control_totals.control_status%TYPE,
397 p_session_date in date,
398 p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE,
399 p_object_version_number in pay_batch_control_totals.object_version_number%TYPE
400 ) is
401 --
402 l_proc varchar2(72) := g_package||'chk_control_status';
403 l_api_updating boolean;
404 --
405 begin
406 hr_utility.set_location('Entering:'||l_proc, 1);
407 --
408 -- Check mandatory batch_name exists
409 --
410 hr_api.mandatory_arg_error
411 (p_api_name => l_proc
412 ,p_argument => 'control_status'
413 ,p_argument_value => p_control_status
414 );
415 --
416 -- Check mandatory session_date exists
417 --
418 hr_api.mandatory_arg_error
419 (p_api_name => l_proc
420 ,p_argument => 'session_date'
421 ,p_argument_value => p_session_date
422 );
423 --
424 hr_utility.set_location(l_proc, 10);
425 --
426 l_api_updating := pay_bct_shd.api_updating
427 (p_batch_control_id => p_batch_control_id,
428 p_object_version_number => p_object_version_number
429 );
430 hr_utility.set_location(l_proc,20);
431 --
432 -- Only proceed with SQL validation if absolutely necessary
433 --
434 if ((l_api_updating and
438 --
435 nvl(pay_bct_shd.g_old_rec.control_status,hr_api.g_varchar2) <>
436 nvl(p_control_status,hr_api.g_varchar2))
437 or (NOT l_api_updating)) then
439 hr_utility.set_location(l_proc,30);
440 --
441 -- Validate against the hr_lookup.
442 --
443 if hr_api.not_exists_in_hr_lookups
444 (p_effective_date => p_session_date,
445 p_lookup_type => 'BATCH_STATUS',
446 p_lookup_code => p_control_status) then
447 pay_bct_shd.constraint_error('PAY_BCHTOT_CONTROL_STATUS_CHK');
448 end if;
449 --
450 end if;
451 --
452 hr_utility.set_location(' Leaving:'||l_proc, 40);
453 --
454 end chk_control_status;
455 --
456 -- ---------------------------------------------------------------------------
457 -- |----------------------------< chk_control_type >-------------------------|
458 -- ---------------------------------------------------------------------------
459 --
460 -- Desciption :
461 --
462 -- Validate control_type against HR_LOOKUP.LOOKUP_CODE where LOOKUP_TYPE
463 -- 'CONTROL_TYPE'.
464 --
465 --
466 -- Pre-conditions :
467 --
468 --
469 -- In Arguments :
470 -- p_control_type
471 -- p_session_date
472 -- p_batch_control_id
473 -- p_object_version_number
474 --
475 -- Post Success :
476 -- Processing continues
477 --
478 -- Post Failure :
479 -- An application error will be raised and processing is
480 -- terminated
481 --
482 -- Access Status :
483 -- Internal Table Handler Use only.
484 --
485 -- {End of Comments}
486 --
487 -- ---------------------------------------------------------------------------
488 procedure chk_control_type
489 (p_control_type in pay_batch_control_totals.control_type%TYPE,
490 p_session_date in date,
491 p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE,
492 p_object_version_number in pay_batch_control_totals.object_version_number%TYPE
493 ) is
494 --
495 l_proc varchar2(72) := g_package||'chk_control_type';
496 l_api_updating boolean;
497 --
498 begin
499 hr_utility.set_location('Entering:'||l_proc, 1);
500 --
501 -- Check mandatory session_date exists
502 --
503 hr_api.mandatory_arg_error
504 (p_api_name => l_proc
505 ,p_argument => 'session_date'
506 ,p_argument_value => p_session_date
507 );
508 --
509 hr_utility.set_location(l_proc, 10);
510 --
511 l_api_updating := pay_bct_shd.api_updating
512 (p_batch_control_id => p_batch_control_id,
513 p_object_version_number => p_object_version_number
514 );
515 hr_utility.set_location(l_proc,20);
516 --
517 -- Only proceed with SQL validation if absolutely necessary
518 --
519 if ((l_api_updating and
520 nvl(pay_bct_shd.g_old_rec.control_type,hr_api.g_varchar2) <>
521 nvl(p_control_type,hr_api.g_varchar2))
522 or (NOT l_api_updating)) then
523 --
524 hr_utility.set_location(l_proc,30);
525 --
526 -- Validate against the hr_lookup.
527 --
528 if (p_control_type is not null) then
529 --
530 hr_utility.set_location(l_proc,35);
531 --
532 -- Validate against the hr_lookup.
533 --
534 if hr_api.not_exists_in_hr_lookups
535 (p_effective_date => p_session_date,
536 p_lookup_type => 'CONTROL_TYPE',
537 p_lookup_code => p_control_type) then
538 fnd_message.set_name('PAY','HR_7462_PLK_INVLD_VALUE');
539 fnd_message.set_token('COLUMN_NAME','CONTROL_TYPE');
540 fnd_message.raise_error;
541 end if;
542 --
543 end if;
544 --
545 end if;
546 --
547 hr_utility.set_location(' Leaving:'||l_proc, 40);
548 --
549 end chk_control_type;
550 --
551 -- added for bug 6013383
552 -- checks for the format of the number passed as control total
553 -- User can enter value in display format (e.g. 99,999.9 OR 99.999,99 depending upon the ICX format)
554 -- it checks for the correct format and gives error if format is Invalid.
555 -- In insert_dml() and update_dml() , it is converted to database format (99999.99)
556 --
557 -- ---------------------------------------------------------------------------
558 procedure chk_control_total
559 (p_control_type in pay_batch_control_totals.control_type%TYPE,
560 p_control_total in pay_batch_control_totals.control_total%TYPE,
561 p_batch_id in pay_batch_headers.batch_id%TYPE
562 ) is
563 --
564 l_proc varchar2(72) := g_package||'chk_control_total';
565 l_api_updating boolean;
566 l_curr_code varchar2(10);
567 l_control_total_dup pay_batch_control_totals.control_total%TYPE;
568 l_control_total_dup1 pay_batch_control_totals.control_total%TYPE;
569
570 l_range_flag varchar2(2):='F';
571
572 --
573 begin
574
575 hr_utility.set_location('Entering:'||l_proc, 10);
576 --
580 select CURRENCY_CODE into l_curr_code
577 l_control_total_dup := p_control_total ;
578
579 -- gets currency_code
581 from PER_BUSINESS_GROUPS perbg,
582 pay_batch_headers pybeeh
583 where perbg.BUSINESS_GROUP_ID = pybeeh.BUSINESS_GROUP_ID and
584 pybeeh.batch_id = p_batch_id;
585 --
586
587 if p_control_type like '%_TOTAL_%' OR p_control_type like '%_COUNT_%' then
588
589 hr_utility.set_location('Validating Control_Total Number format' || l_proc ,20) ;
590
591 hr_chkfmt.checkformat ( l_control_total_dup ,
592 'NUMBER' ,
593 l_control_total_dup1,
594 null ,
595 null ,
596 'N' ,
597 l_range_flag,
598 null );
599
600 end if;
601 --
602 hr_utility.set_location(' Leaving:'||l_proc, 30);
603 --
604 end chk_control_total;
605 --
606 -- ---------------------------------------------------------------------------
607 -- |-------------------------------< chk_delete >----------------------------|
608 -- ---------------------------------------------------------------------------
609 --
610 -- Desciption :
611 --
612 -- Check if there is no child row exists in
613 -- PAY_MESSAGE_LINES.
614 --
615 --
616 -- Pre-conditions :
617 --
618 --
619 -- In Arguments :
620 -- p_batch_control_id
621 --
622 -- Post Success :
623 -- Processing continues
624 --
625 -- Post Failure :
626 -- An application error will be raised and processing is
627 -- terminated
628 --
629 -- Access Status :
630 -- Internal Table Handler Use only.
631 --
632 -- {End of Comments}
633 --
634 -- ---------------------------------------------------------------------------
635 procedure chk_delete
636 (p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE
637 ) is
638 --
639 l_proc varchar2(72) := g_package||'chk_delete';
640 l_exists varchar2(1);
641 --
642 cursor csr_message_lines is
643 select null
644 from pay_message_lines pml
645 where pml.source_id = p_batch_control_id
646 and pml.source_type = 'C';
647 --
648 begin
649 hr_utility.set_location('Entering:'||l_proc, 1);
650 --
651 -- Check mandatory session_date exists
652 --
653 hr_api.mandatory_arg_error
654 (p_api_name => l_proc
655 ,p_argument => 'batch_control_id'
656 ,p_argument_value => p_batch_control_id
657 );
658 --
659 hr_utility.set_location('Entering:'||l_proc, 10);
660 --
661 open csr_message_lines;
662 --
663 fetch csr_message_lines into l_exists;
664 --
665 If csr_message_lines%found Then
666 --
667 close csr_message_lines;
668 --
669 fnd_message.set_name('PAY','PAY_34576_BHT_CHILD_EXISTS');
670 fnd_message.raise_error;
671 --
672 End If;
673 --
674 close csr_message_lines;
675 --
676 hr_utility.set_location(' Leaving:'||l_proc, 20);
677 --
678 end chk_delete;
679 --
680 -- ----------------------------------------------------------------------------
681 -- |---------------------------< insert_validate >----------------------------|
682 -- ----------------------------------------------------------------------------
683 Procedure insert_validate
684 (p_session_date in date,
685 p_rec in pay_bct_shd.g_rec_type
686 ) is
687 --
688 l_proc varchar2(72) := g_package||'insert_validate';
689 --
690 Begin
691 hr_utility.set_location('Entering:'||l_proc, 5);
692 --
693 -- Call all supporting business operations
694 --
695 --
696 hr_utility.set_location(l_proc, 10);
697 --
698 chk_batch_id(p_batch_control_id => p_rec.batch_control_id
699 ,p_batch_id => p_rec.batch_id);
700 --
701 pay_bth_bus.set_security_group_id(p_batch_id => p_rec.batch_id);
702 --
703 hr_utility.set_location(l_proc, 20);
704 --
705 chk_control_status(p_control_status => p_rec.control_status
706 ,p_session_date => p_session_date
707 ,p_batch_control_id => p_rec.batch_control_id
708 ,p_object_version_number => p_rec.object_version_number);
709 --
710 hr_utility.set_location(l_proc, 30);
711 --
712 chk_control_type(p_control_type => p_rec.control_type
713 ,p_session_date => p_session_date
714 ,p_batch_control_id => p_rec.batch_control_id
715 ,p_object_version_number => p_rec.object_version_number);
716 --
717 -- added for bug 6013383
718 chk_control_total
719 (p_control_type => p_rec.control_type,
720 p_control_total => p_rec.control_total,
721 p_batch_id => p_rec.batch_id
722 );
723 --
724 hr_utility.set_location(' Leaving:'||l_proc, 40);
725 End insert_validate;
726 --
727 -- ----------------------------------------------------------------------------
728 -- |---------------------------< update_validate >----------------------------|
729 -- ----------------------------------------------------------------------------
730 Procedure update_validate
731 (p_session_date in date,
732 p_rec in pay_bct_shd.g_rec_type
733 ) is
734 --
735 l_proc varchar2(72) := g_package||'update_validate';
736 --
737 Begin
738 hr_utility.set_location('Entering:'||l_proc, 5);
739 --
740 -- Call all supporting business operations
741 --
742 --
743 pay_bct_bus.set_security_group_id(p_batch_control_id => p_rec.batch_control_id);
744 --
745 chk_non_updateable_args
746 (p_rec => p_rec
747 );
748 --
749 hr_utility.set_location(l_proc, 20);
750 --
751 --
752 chk_transferred_status(p_batch_control_id => p_rec.batch_control_id);
753 --
754 hr_utility.set_location(l_proc, 25);
755 --
756 chk_control_status(p_control_status => p_rec.control_status
757 ,p_session_date => p_session_date
758 ,p_batch_control_id => p_rec.batch_control_id
759 ,p_object_version_number => p_rec.object_version_number);
760 --
761 hr_utility.set_location(l_proc, 30);
762 --
763 chk_control_type(p_control_type => p_rec.control_type
764 ,p_session_date => p_session_date
765 ,p_batch_control_id => p_rec.batch_control_id
766 ,p_object_version_number => p_rec.object_version_number);
767 --
771 p_control_total => p_rec.control_total,
768 -- added for bug 6013383
769 chk_control_total
770 (p_control_type => p_rec.control_type,
772 p_batch_id => p_rec.batch_id
773 );
774 --
775 hr_utility.set_location(' Leaving:'||l_proc, 40);
776 End update_validate;
777 --
778 -- ----------------------------------------------------------------------------
779 -- |---------------------------< delete_validate >----------------------------|
780 -- ----------------------------------------------------------------------------
781 Procedure delete_validate
782 (p_rec in pay_bct_shd.g_rec_type
783 ) is
784 --
785 l_proc varchar2(72) := g_package||'delete_validate';
786 --
787 Begin
788 hr_utility.set_location('Entering:'||l_proc, 5);
789 --
790 -- Call all supporting business operations
791 --
792 --
793 if payplnk.g_payplnk_call <> true then
794 chk_transferred_status(p_batch_control_id => p_rec.batch_control_id);
795 end if;
796 --
797 hr_utility.set_location(l_proc, 25);
798 --
799 chk_delete(p_batch_control_id => p_rec.batch_control_id);
800 --
801 hr_utility.set_location(' Leaving:'||l_proc, 10);
802 End delete_validate;
803 --
804 end pay_bct_bus;