1 Package Body pqh_gin_bus as
2 /* $Header: pqginrhi.pkb 115.7 2004/03/15 03:05 svorugan noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pqh_gin_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_global_index_id number default null;
15 --
16 -- ---------------------------------------------------------------------------
17 -- |----------------------< set_security_group_id >--------------------------|
18 -- ---------------------------------------------------------------------------
19 --
20 Procedure set_security_group_id
21 (p_global_index_id in number
22 ,p_associated_column1 in varchar2 default null
23 ) is
24 --
25 -- Declare cursor
26 --
27 cursor csr_sec_grp is
28 select pbg.security_group_id,
29 pbg.legislation_code
30 from per_business_groups_perf pbg
31 where pbg.business_group_id = hr_general.get_business_group_id;
32 --
33 -- Declare local variables
34 --
35 l_security_group_id number;
36 l_proc varchar2(72) := g_package||'set_security_group_id';
37 l_legislation_code varchar2(150);
38 --
39 begin
40 --
41 hr_utility.set_location('Entering:'|| l_proc, 10);
42 --
43 -- Ensure that all the mandatory parameter are not null
44 --
45 hr_api.mandatory_arg_error
46 (p_api_name => l_proc
47 ,p_argument => 'global_index_id'
48 ,p_argument_value => p_global_index_id
49 );
50 --
51 open csr_sec_grp;
52 fetch csr_sec_grp into l_security_group_id
53 , l_legislation_code;
54 --
55 if csr_sec_grp%notfound then
56 --
57 close csr_sec_grp;
58 --
59 -- The primary key is invalid therefore we must error
60 --
61 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
62 hr_multi_message.add
63 (p_associated_column1
64 => nvl(p_associated_column1,'GLOBAL_INDEX_ID')
65 );
66 --
67 else
68 close csr_sec_grp;
69 --
70 -- Set the security_group_id in CLIENT_INFO
71 --
72 hr_api.set_security_group_id
73 (p_security_group_id => l_security_group_id
74 );
75 --
76 -- Set the sessions legislation context in HR_SESSION_DATA
77 --
78 hr_api.set_legislation_context(l_legislation_code);
79 end if;
80 --
81 hr_utility.set_location(' Leaving:'|| l_proc, 20);
82 --
83 end set_security_group_id;
84 --
85 -- ---------------------------------------------------------------------------
86 -- |---------------------< return_legislation_code >-------------------------|
87 -- ---------------------------------------------------------------------------
88 --
89 Function return_legislation_code
90 (p_global_index_id in number
91 )
92 Return Varchar2 Is
93 --
94 -- Declare cursor
95 --
96 cursor csr_leg_code is
97 select pbg.legislation_code
98 from per_business_groups_perf pbg
99 where pbg.business_group_id = hr_general.get_business_group_id;
100 --
101 -- Declare local variables
102 --
103 l_legislation_code varchar2(150);
104 l_proc varchar2(72) := g_package||'return_legislation_code';
105 --
106 Begin
107 --
108 hr_utility.set_location('Entering:'|| l_proc, 10);
109 --
110 -- Ensure that all the mandatory parameter are not null
111 --
112 hr_api.mandatory_arg_error
113 (p_api_name => l_proc
114 ,p_argument => 'global_index_id'
115 ,p_argument_value => p_global_index_id
116 );
117 --
118 if ( nvl(pqh_gin_bus.g_global_index_id, hr_api.g_number)
119 = p_global_index_id) then
120 --
121 -- The legislation code has already been found with a previous
122 -- call to this function. Just return the value in the global
123 -- variable.
124 --
125 l_legislation_code := pqh_gin_bus.g_legislation_code;
126 hr_utility.set_location(l_proc, 20);
127 else
128 --
129 -- The ID is different to the last call to this function
130 -- or this is the first call to this function.
131 --
132 open csr_leg_code;
133 fetch csr_leg_code into l_legislation_code;
134 --
135 if csr_leg_code%notfound then
136 --
137 -- The primary key is invalid therefore we must error
138 --
139 close csr_leg_code;
140 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
141 fnd_message.raise_error;
142 end if;
143 hr_utility.set_location(l_proc,30);
144 --
145 -- Set the global variables so the values are
146 -- available for the next call to this function.
147 --
148 close csr_leg_code;
149 pqh_gin_bus.g_global_index_id := p_global_index_id;
150 pqh_gin_bus.g_legislation_code := l_legislation_code;
151 end if;
152 hr_utility.set_location(' Leaving:'|| l_proc, 40);
153 return l_legislation_code;
154 end return_legislation_code;
155 --
156 -- ----------------------------------------------------------------------------
157 -- |-----------------------< chk_non_updateable_args >------------------------|
158 -- ----------------------------------------------------------------------------
159 -- {Start Of Comments}
160 --
161 -- Description:
162 -- This procedure is used to ensure that non updateable attributes have
163 -- not been updated. If an attribute has been updated an error is generated.
164 --
165 -- Pre Conditions:
166 -- g_old_rec has been populated with details of the values currently in
167 -- the database.
168 --
169 -- In Arguments:
170 -- p_rec has been populated with the updated values the user would like the
171 -- record set to.
172 --
173 -- Post Success:
174 -- Processing continues if all the non updateable attributes have not
175 -- changed.
176 --
177 -- Post Failure:
178 -- An application error is raised if any of the non updatable attributes
179 -- have been altered.
180 --
181 -- {End Of Comments}
182 -- ----------------------------------------------------------------------------
183 Procedure chk_non_updateable_args
184 (p_effective_date in date
185 ,p_rec in pqh_gin_shd.g_rec_type
186 ) IS
187 --
188 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
189 --
190 Begin
191 --
192 -- Only proceed with the validation if a row exists for the current
193 -- record in the HR Schema.
194 --
195 IF NOT pqh_gin_shd.api_updating
196 (p_global_index_id => p_rec.global_index_id
197 ,p_effective_date => p_effective_date
198 ,p_object_version_number => p_rec.object_version_number
199 ) THEN
200 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
201 fnd_message.set_token('PROCEDURE ', l_proc);
202 fnd_message.set_token('STEP ', '5');
203 fnd_message.raise_error;
204 END IF;
205
206 -- GROSS_INDEX
207
208 IF NVL(p_rec.gross_index, hr_api.g_number) <>
209 nvl(pqh_gin_shd.g_old_rec.gross_index
210 ,hr_api.g_number
211 ) then
212 hr_api.argument_changed_error
213 (p_api_name => l_proc
214 ,p_argument => 'GROSS_INDEX'
215 ,p_base_table => pqh_gin_shd.g_tab_nam
216 );
217 END IF;
218 --
219 End chk_non_updateable_args;
220 --
221 -- ----------------------------------------------------------------------------
222 -- |--------------------------< dt_update_validate >--------------------------|
223 -- ----------------------------------------------------------------------------
224 -- {Start Of Comments}
225 --
226 -- Description:
227 -- This procedure is used for referential integrity of datetracked
228 -- parent entities when a datetrack update operation is taking place
229 -- and where there is no cascading of update defined for this entity.
230 --
231 -- Prerequisites:
232 -- This procedure is called from the update_validate.
233 --
234 -- In Parameters:
235 --
236 -- Post Success:
237 -- Processing continues.
238 --
239 -- Post Failure:
240 --
241 -- Developer Implementation Notes:
242 -- This procedure should not need maintenance unless the HR Schema model
243 -- changes.
244 --
245 -- Access Status:
246 -- Internal Row Handler Use Only.
247 --
248 -- {End Of Comments}
249 -- ----------------------------------------------------------------------------
250 Procedure dt_update_validate
251 (p_datetrack_mode in varchar2
252 ,p_validation_start_date in date
253 ,p_validation_end_date in date
254 ) Is
255 --
256 l_proc varchar2(72) := g_package||'dt_update_validate';
257 --
258 Begin
259 --
260 -- Ensure that the p_datetrack_mode argument is not null
261 --
262 hr_api.mandatory_arg_error
263 (p_api_name => l_proc
264 ,p_argument => 'datetrack_mode'
265 ,p_argument_value => p_datetrack_mode
266 );
267 --
268 -- Mode will be valid, as this is checked at the start of the upd.
269 --
270 -- Ensure the arguments are not null
271 --
272 hr_api.mandatory_arg_error
273 (p_api_name => l_proc
274 ,p_argument => 'validation_start_date'
275 ,p_argument_value => p_validation_start_date
276 );
277 --
278 hr_api.mandatory_arg_error
279 (p_api_name => l_proc
280 ,p_argument => 'validation_end_date'
281 ,p_argument_value => p_validation_end_date
282 );
283 --
284 --
285 --
286 Exception
287 When Others Then
288 --
289 -- An unhandled or unexpected error has occurred which
290 -- we must report
291 --
292 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
293 fnd_message.set_token('PROCEDURE', l_proc);
294 fnd_message.set_token('STEP','15');
295 fnd_message.raise_error;
296 End dt_update_validate;
297 --
298 -- ----------------------------------------------------------------------------
299 -- |--------------------------< dt_delete_validate >--------------------------|
300 -- ----------------------------------------------------------------------------
301 -- {Start Of Comments}
302 --
303 -- Description:
304 -- This procedure is used for referential integrity of datetracked
305 -- child entities when either a datetrack DELETE or ZAP is in operation
306 -- and where there is no cascading of delete defined for this entity.
307 -- For the datetrack mode of DELETE or ZAP we must ensure that no
308 -- datetracked child rows exist between the validation start and end
309 -- dates.
310 --
311 -- Prerequisites:
312 -- This procedure is called from the delete_validate.
313 --
314 -- In Parameters:
315 --
316 -- Post Success:
317 -- Processing continues.
318 --
319 -- Post Failure:
320 -- If a row exists by determining the returning Boolean value from the
321 -- generic dt_api.rows_exist function then we must supply an error via
322 -- the use of the local exception handler l_rows_exist.
323 --
324 -- Developer Implementation Notes:
325 -- This procedure should not need maintenance unless the HR Schema model
326 -- changes.
327 --
328 -- Access Status:
329 -- Internal Row Handler Use Only.
330 --
331 -- {End Of Comments}
332 -- ----------------------------------------------------------------------------
333 Procedure dt_delete_validate
334 (p_global_index_id in number
335 ,p_datetrack_mode in varchar2
336 ,p_validation_start_date in date
337 ,p_validation_end_date in date
338 ) Is
339 --
340 l_proc varchar2(72) := g_package||'dt_delete_validate';
341 --
342 Begin
343 --
344 -- Ensure that the p_datetrack_mode argument is not null
345 --
346 hr_api.mandatory_arg_error
347 (p_api_name => l_proc
348 ,p_argument => 'datetrack_mode'
349 ,p_argument_value => p_datetrack_mode
350 );
351 --
352 -- Only perform the validation if the datetrack mode is either
353 -- DELETE or ZAP
354 --
355 If (p_datetrack_mode = hr_api.g_delete or
356 p_datetrack_mode = hr_api.g_zap) then
357 --
358 --
359 -- Ensure the arguments are not null
360 --
361 hr_api.mandatory_arg_error
362 (p_api_name => l_proc
363 ,p_argument => 'validation_start_date'
364 ,p_argument_value => p_validation_start_date
365 );
366 --
367 hr_api.mandatory_arg_error
368 (p_api_name => l_proc
369 ,p_argument => 'validation_end_date'
370 ,p_argument_value => p_validation_end_date
371 );
372 --
373 hr_api.mandatory_arg_error
374 (p_api_name => l_proc
375 ,p_argument => 'global_index_id'
376 ,p_argument_value => p_global_index_id
377 );
378 --
379 --
380 --
381 End If;
382 --
383 Exception
384 When Others Then
385 --
386 -- An unhandled or unexpected error has occurred which
387 -- we must report
388 --
389 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
390 fnd_message.set_token('PROCEDURE', l_proc);
391 fnd_message.set_token('STEP','15');
392 fnd_message.raise_error;
393 --
394 End dt_delete_validate;
395 --
396 -- Check procedures
397
398 Procedure chk_record_type (p_type_of_record in varchar2 )
399 IS
400
401 Cursor csr_record_type IS
402 Select null
403 from hr_lookups
404 where lookup_type = 'PQH_FR_TYPE_OF_INDICES'
405 and lookup_code = p_type_of_record;
406 --
407 l_value varchar2(30):= null;
408 --
409 Begin
410
411 Open csr_record_type;
412 --
413 Fetch csr_record_type into l_value;
414
415 If (csr_record_type%NOTFOUND) then
416 --
417 fnd_message.set_name('PQH','PQH_FR_INVALID_INDICES_TYPE');
418 hr_multi_message.add (p_associated_column1 => 'TYPE_OF_RECORD');
419 --
420 End If;
421 --
422 Close csr_record_type;
423
424 End chk_record_type;
425
426 --
427 --
428 Procedure chk_IND_values_inputted(p_type_of_record in varchar2,
429 p_gross_index in number,
430 p_increased_index in number)
431 IS
432
433 Begin
434
435 -- Gross_index, increased_index are associated with IND
436 -- Housing Indeminity housing_indemnity_rate, Basic Salary Rate basic_salary_rate are associated with INM
437
438 If (p_type_of_record = 'INM' ) then
439 --
440 If (p_gross_index is not null or
441 p_increased_index is not null) then
442 --
443 fnd_message.set_name('PQH','PQH_FR_INVALID_INM_VALUES');
444 hr_multi_message.add;
445 --
446 End if;
447
448 --
449 End if;
450
451 End chk_IND_values_inputted;
452
453 --
454 Procedure chk_INM_values_inputted(p_type_of_record in varchar2,
455 p_housing_indemnity_rate in number,
456 p_basic_salary_rate in number)
457 IS
458
459 Begin
460
461 -- Gross_index, increased_index are associated with IND
462 -- Housing Indeminity housing_indemnity_rate, Basic Salary Rate basic_salary_rate are associated with INM
463
464 If (p_type_of_record = 'IND' ) then
465 --
466 If (p_housing_indemnity_rate is not null or
467 p_basic_salary_rate is not null) then
468 --
469 fnd_message.set_name('PQH','PQH_FR_INVALID_IND_VALUES');
470 hr_multi_message.add;
471 --
472 End if;
473
474 --
475 End if;
476
477 End chk_INM_values_inputted;
478 --
479 --
480 Procedure chk_INM_record_existence
481 IS
482 --
483 Cursor csr_INM_record_existence IS
484 Select null
485 from pqh_fr_global_indices_f
486 where type_of_record = 'INM';
487 --
488 l_value varchar2(10);
489
490 Begin
491
492 Open csr_INM_record_existence;
493 --
494 Fetch csr_INM_record_existence into l_value;
495
496 If csr_INM_record_existence%FOUND then
497 --
498 fnd_message.set_name('PQH','PQH_FR_NO_SECOND_INM_ROW');
499 hr_multi_message.add;
500 --
501 End If;
502 --
503 Close csr_INM_record_existence;
504 --
505 End chk_INM_record_existence;
506 --
507 --
508 Procedure chk_currency(p_currency_code in varchar2 )
509 IS
510 Cursor csr_currency is
511 Select null
512 from fnd_currencies_vl
513 where currency_code = p_currency_code
514 and currency_flag = 'Y'
515 and enabled_flag = 'Y';
516
517 l_value varchar2(10);
518 begin
519 --
520
521 If p_currency_code is not null then
522 --
523 Open csr_currency;
524 --
525 Fetch csr_currency into l_value;
526
527 If csr_currency%notfound then
528 fnd_message.set_name('PQH','PQH_FR_INVALID_CURRENCY');
529 hr_multi_message.add;
530 End if;
531 --
532 Close csr_currency;
533 --
534 End if;
535 --
536 End chk_currency;
537 --
538 --
539 --This chk will be done, before creating an entry for Global Index
540 --
541 Procedure chk_inm_existance(p_effective_date date)
542 IS
543 Cursor csr_ind_existance is
544 Select null
545 from pqh_fr_global_indices_f
546 where p_effective_date between effective_start_date and effective_end_date
547 and type_of_record = 'INM';
548 --
549 l_value varchar2(10);
550 --
551 begin
552
553 Open csr_ind_existance;
554 --
555 Fetch csr_ind_existance into l_value;
556
560 fnd_message.set_token('DATE',p_effective_date);
557 If csr_ind_existance%NOTFOUND then
558 --
559 fnd_message.set_name('PQH','PQH_FR_NO_INDM_RATES');
561 hr_multi_message.add;
562 --
563 End if;
564 --
565 Close csr_ind_existance;
566 --
567 End chk_inm_existance;
568
569 --
570 Procedure chk_steps_exist_for_index(p_global_index_id number, p_effective_date date)
571 IS
572 Cursor csr_current_record IS
573 Select Gross_index
574 from pqh_fr_global_indices_f
575 where global_index_id = p_global_index_id
576 and p_effective_date between effective_start_date and effective_end_date;
577 --
578 l_gross_index number;
579 l_exists varchar2(10);
580 Begin
581
582 Open csr_current_record;
583 --
584 Fetch csr_current_record into l_gross_index;
585 --
586 Close csr_current_record;
587
588 Select pqh_corps_utility.chk_steps_exist_for_index(l_gross_index) into l_exists from dual;
589
590 if (l_exists = 'Y') then
591 --
592 fnd_message.set_name('PQH','PQH_FR_STEPS_EXIST_FOR_INDEX');
593 hr_multi_message.add;
594 --
595 End if;
596
597
598
599 End;
600
601 procedure chk_unique_insert(p_gross_index number)
602 IS
603
604 Cursor csr_unique is
605 Select null
606 from pqh_fr_global_indices_f
607 where gross_index =p_gross_index;
608 --
609 l_value varchar2(1);
610 Begin
611
612 Open csr_unique;
613 --
614 Fetch csr_unique into l_value;
615
616 If csr_unique%found Then
617 --
618 fnd_message.set_name('PQH','PQH_FR_RECORD_IB_EXIST');
619 fnd_message.set_token('IB',p_gross_index);
620 hr_multi_message.add;
621
622 --
623 End if;
624 --
625 End chk_unique_insert;
626
627 ---
628 procedure chk_unique_update(p_gross_index number, p_increased_index number,p_global_index_id number)
629 IS
630
631 Cursor csr_unique is
632 Select null
633 from pqh_fr_global_indices_f
634 where gross_index =p_gross_index
635 and increased_index = p_increased_index
636 and global_index_id <> p_global_index_id;
637 --
638 l_value varchar2(1);
639 Begin
640
641 Open csr_unique;
642 --
643 Fetch csr_unique into l_value;
644
645 If csr_unique%found Then
646 --
647 fnd_message.set_name('PQH','PQH_FR_RECORD_COMB_EXIST');
648 fnd_message.set_token('IB',p_gross_index);
649 fnd_message.set_token('INM',p_increased_index);
650 hr_multi_message.add;
651
652 --
653 End if;
654 --
655 End chk_unique_update;
656
657 --
658 procedure chk_is_negetive_BS_rate(p_basic_salary_rate number)
659 IS
660 --
661 Begin
662
663 If (round(p_basic_salary_rate,3) <= 0) then
664 --
665 fnd_message.set_name('PQH','PQH_FR_NO_NEG_BS_RATE');
666 hr_multi_message.add;
667 --
668 End if;
669
670 --
671 End chk_is_negetive_BS_rate;
672
673 --
674 procedure chk_is_negetive_HI_rate(p_housing_indemnity_rate number)
675 IS
676 --
677 Begin
678 If (round(p_housing_indemnity_rate,3) <= 0) then
679 --
680
681 fnd_message.set_name('PQH','PQH_FR_NO_NEG_HI_RATE');
682 hr_multi_message.add;
683
684 --
685 End if;
686
687 --
688 End chk_is_negetive_HI_rate;
689
690 --
691 procedure chk_is_negetive_GI_rate(p_gross_index number)
692 IS
693 --
694 Begin
695 If (p_gross_index <= 0 ) then
696 --
697 fnd_message.set_name('PQH','PQH_FR_NO_NEG_GI_RATE');
698 hr_multi_message.add;
699
700 --
701 End if;
702
703 --
704 End chk_is_negetive_GI_rate;
705
706
707 --
708 procedure chk_is_negetive_II_rate(p_increased_index number)
709 IS
710 --
711 Begin
712 If (p_increased_index <= 0 ) then
713 --
714 fnd_message.set_name('PQH','PQH_FR_NO_NEG_II_RATE');
715 hr_multi_message.add;
716
717 --
718 End if;
719 --
720 End chk_is_negetive_II_rate;
721
722 --
723 -- ----------------------------------------------------------------------------
724 -- |---------------------------< insert_validate >----------------------------|
725 -- ----------------------------------------------------------------------------
726 Procedure insert_validate
727 (p_rec in pqh_gin_shd.g_rec_type
728 ,p_effective_date in date
729 ,p_datetrack_mode in varchar2
730 ,p_validation_start_date in date
731 ,p_validation_end_date in date
732 ) is
733 --
734 l_proc varchar2(72) := g_package||'insert_validate';
735 --
736 Begin
737 hr_utility.set_location('Entering:'||l_proc, 5);
738 --
739 -- Call all supporting business operations
740 --
741
742 hr_api.validate_bus_grp_id
743 (p_business_group_id => nvl(hr_general.get_business_group_id,0) );
744
745 chk_unique_insert(p_rec.gross_index);
746
747 hr_multi_message.end_validation_set;
748
749 chk_record_type ( p_rec.type_of_record );
750
751 chk_currency (p_rec.currency_code);
752
753 If (p_rec.type_of_record = 'INM') then
754 --
755 -- System will not allowed to have second entry from Indemnity,
756 -- As user can always update (create date-track version) for the same entry.
757 --
758 chk_INM_record_existence;
759
760 chk_is_negetive_BS_rate(p_rec.basic_salary_rate);
761
762 chk_is_negetive_HI_rate(p_rec.housing_indemnity_rate);
763
764 --
765 End if;
766
767 If (p_rec.type_of_record ='IND') then
768 --
769 -- Checks is there any Indemnity defined in the system as on the effective date
770 -- or not .. If not system will throw an error
771 -- Bcoz , with out an Indemnity having indeces is no meaning.
772 --
773 chk_inm_existance(p_effective_date);
774
775 chk_is_negetive_GI_rate(p_rec.gross_index);
776
777 chk_is_negetive_II_rate(p_rec.increased_index);
778 --
779 End if;
780
781 hr_multi_message.end_validation_set;
782
783 --
784 -- Validate Dependent Attributes
785 --
786 chk_IND_values_inputted(p_rec.type_of_record ,
787 p_rec.gross_index ,
788 p_rec.increased_index );
789
790 chk_INM_values_inputted(p_rec.type_of_record ,
791 p_rec.housing_indemnity_rate ,
792 p_rec.basic_salary_rate );
793
794 hr_multi_message.end_validation_set;
795 --
796 hr_utility.set_location(' Leaving:'||l_proc, 10);
797 End insert_validate;
798 --
799 -- ----------------------------------------------------------------------------
800 -- |---------------------------< update_validate >----------------------------|
801 -- ----------------------------------------------------------------------------
802 Procedure update_validate
803 (p_rec in pqh_gin_shd.g_rec_type
804 ,p_effective_date in date
805 ,p_datetrack_mode in varchar2
806 ,p_validation_start_date in date
807 ,p_validation_end_date in date
808 ) is
809 --
810 l_proc varchar2(72) := g_package||'update_validate';
811 --
812 Begin
813 hr_utility.set_location('Entering:'||l_proc, 5);
814 --
815 -- Call all supporting business operations
816 --
817
818 hr_api.validate_bus_grp_id
819 (p_business_group_id => nvl(hr_general.get_business_group_id,0) );
820
821 chk_unique_update(p_rec.gross_index,p_rec.increased_index,p_rec.global_index_id);
822
823 hr_multi_message.end_validation_set;
824
825
826 If (p_rec.type_of_record = 'INM') then
827 --
828 --
829
830 chk_is_negetive_BS_rate(p_rec.basic_salary_rate);
831
832 chk_is_negetive_HI_rate(p_rec.housing_indemnity_rate);
833
834 --
835 End if;
836
837 If (p_rec.type_of_record ='IND') then
838 --
839 --
840
841 chk_is_negetive_GI_rate(p_rec.gross_index);
842
843 chk_is_negetive_II_rate(p_rec.increased_index);
844 --
845 End if;
846
847 chk_record_type ( p_rec.type_of_record );
848
849 chk_currency (p_rec.currency_code);
850 --
851 -- Validate Dependent Attributes
852 --
853 chk_IND_values_inputted(p_rec.type_of_record ,
854 p_rec.gross_index ,
855 p_rec.increased_index );
856
857 chk_INM_values_inputted(p_rec.type_of_record ,
858 p_rec.housing_indemnity_rate ,
859 p_rec.basic_salary_rate );
860
861 hr_multi_message.end_validation_set;
862
863 --
864 -- Call the datetrack update integrity operation
865 --
866 dt_update_validate
867 (p_datetrack_mode => p_datetrack_mode
868 ,p_validation_start_date => p_validation_start_date
869 ,p_validation_end_date => p_validation_end_date
870 );
871 --
872 chk_non_updateable_args
873 (p_effective_date => p_effective_date
874 ,p_rec => p_rec
875 );
876 --
877 --
878 hr_utility.set_location(' Leaving:'||l_proc, 10);
879 End update_validate;
880 --
881 -- ----------------------------------------------------------------------------
882 -- |---------------------------< delete_validate >----------------------------|
883 -- ----------------------------------------------------------------------------
884 Procedure delete_validate
885 (p_rec in pqh_gin_shd.g_rec_type
886 ,p_effective_date in date
887 ,p_datetrack_mode in varchar2
888 ,p_validation_start_date in date
889 ,p_validation_end_date in date
890 ) is
891 --
892 l_proc varchar2(72) := g_package||'delete_validate';
893 --
894 Begin
895 hr_utility.set_location('Entering:'||l_proc, 5);
896 --
897 -- Call all supporting business operations
898 --
899 dt_delete_validate
900 (p_datetrack_mode => p_datetrack_mode
901 ,p_validation_start_date => p_validation_start_date
902 ,p_validation_end_date => p_validation_end_date
903 ,p_global_index_id => p_rec.global_index_id
904 );
905 --
906
907 chk_steps_exist_for_index(p_rec.global_index_id, p_effective_date);
908
909
910 hr_utility.set_location(' Leaving:'||l_proc, 10);
911 End delete_validate;
912 --
913 end pqh_gin_bus;