[Home] [Help]
PACKAGE BODY: APPS.HR_CLE_BUS
Source
4 -- ----------------------------------------------------------------------------
1 Package Body hr_cle_bus as
2 /* $Header: hrclerhi.pkb 115.6 2002/12/03 09:27:16 hjonnala noship $ */
3 --
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' hr_cle_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_soc_ins_contr_lvls_id number default null;
15 --
16 -- ---------------------------------------------------------------------------
17 -- |----------------------< set_security_group_id >--------------------------|
18 -- ---------------------------------------------------------------------------
19 --
20 Procedure set_security_group_id
21 (p_soc_ins_contr_lvls_id in number
22 ) is
23 --
24 -- Declare cursor
25 --
26 cursor csr_sec_grp is
27 select pbg.security_group_id
28 from per_business_groups pbg
29 , hr_de_soc_ins_contr_lvls_f cle
30 , hr_organization_units hou
31 where cle.soc_ins_contr_lvls_id = p_soc_ins_contr_lvls_id
32 and pbg.business_group_id = hou.business_group_id
33 and hou.organization_id = cle.organization_id;
34 --
35 -- Declare local variables
36 --
37
38 l_security_group_id number;
39 l_proc varchar2(72) := g_package||'set_security_group_id';
40
41 --
42 begin
43 --
44 hr_utility.set_location('Entering:'|| l_proc, 10);
45 --
46 -- Ensure that all the mandatory parameter are not null
47 --
48 hr_api.mandatory_arg_error
49 (p_api_name => l_proc
50 ,p_argument => 'soc_ins_contr_lvls_id'
51 ,p_argument_value => p_soc_ins_contr_lvls_id
52 );
53 --
54 open csr_sec_grp;
55 fetch csr_sec_grp into l_security_group_id;
56 --
57 if csr_sec_grp%notfound then
58 --
59 close csr_sec_grp;
60 --
61 -- The primary key is invalid therefore we must error
62 --
63 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
64 fnd_message.raise_error;
65 --
66 end if;
67 close csr_sec_grp;
68 --
69 -- Set the security_group_id in CLIENT_INFO
70 --
71 hr_api.set_security_group_id
72 (p_security_group_id => l_security_group_id
73 );
74 --
75 hr_utility.set_location(' Leaving:'|| l_proc, 20);
76 --
77 end set_security_group_id;
78 --
79 -- ---------------------------------------------------------------------------
80 -- |---------------------< return_legislation_code >-------------------------|
81 -- ---------------------------------------------------------------------------
82 --
83 Function return_legislation_code
84 (p_soc_ins_contr_lvls_id in number
85 )
86 Return Varchar2 Is
87 --
88 -- Declare cursor
89 --
90
91 cursor csr_leg_code is
92 select pbg.legislation_code
93 from per_business_groups pbg
94 , hr_de_soc_ins_contr_lvls_f cle
95 , hr_organization_units hou
96 where cle.soc_ins_contr_lvls_id = p_soc_ins_contr_lvls_id
97 and cle.organization_id = hou.organization_id
98 and pbg.business_group_id = hou.business_group_id;
99
100 --
101 -- Declare local variables
102 --
103
104 l_legislation_code varchar2(150);
105 l_proc varchar2(72) := g_package||'return_legislation_code';
106 --
107 Begin
108 --
109 hr_utility.set_location('Entering:'|| l_proc, 10);
110 --
111 -- Ensure that all the mandatory parameter are not null
112 --
113 hr_api.mandatory_arg_error
114 (p_api_name => l_proc
115 ,p_argument => 'soc_ins_contr_lvls_id'
116 ,p_argument_value => p_soc_ins_contr_lvls_id
117 );
118 --
119 if ( nvl(hr_cle_bus.g_soc_ins_contr_lvls_id, hr_api.g_number)
120 = p_soc_ins_contr_lvls_id) then
121 --
122 -- The legislation code has already been found with a previous
123 -- call to this function. Just return the value in the global
127 hr_utility.set_location(l_proc, 20);
124 -- variable.
125 --
126 l_legislation_code := hr_cle_bus.g_legislation_code;
128 else
129 --
130 -- The ID is different to the last call to this function
131 -- or this is the first call to this function.
132 --
133 open csr_leg_code;
134 fetch csr_leg_code into l_legislation_code;
135 --
136 if csr_leg_code%notfound then
137 --
138 -- The primary key is invalid therefore we must error
139 --
140 close csr_leg_code;
141 fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
142 fnd_message.raise_error;
143 end if;
144 hr_utility.set_location(l_proc,30);
145 --
146 -- Set the global variables so the values are
147 -- available for the next call to this function.
148 --
149 close csr_leg_code;
150 hr_cle_bus.g_soc_ins_contr_lvls_id := p_soc_ins_contr_lvls_id;
151 hr_cle_bus.g_legislation_code := l_legislation_code;
152 end if;
153 hr_utility.set_location(' Leaving:'|| l_proc, 40);
154 return l_legislation_code;
155 end return_legislation_code;
156 --
157 -- ----------------------------------------------------------------------------
158 -- |------------------------------< chk_df >----------------------------------|
159 -- ----------------------------------------------------------------------------
160 --
161 -- Description:
162 -- Validates all the Descriptive Flexfield values.
163 --
164 -- Prerequisites:
165 -- All other columns have been validated. Must be called as the
166 -- last step from insert_validate and update_validate.
167 --
168 -- In Arguments:
169 -- p_rec
170 --
171 -- Post Success:
172 -- If the Descriptive Flexfield structure column and data values are
173 -- all valid this procedure will end normally and processing will
174 -- continue.
175 --
176 -- Post Failure:
177 -- If the Descriptive Flexfield structure column value or any of
178 -- the data values are invalid then an application error is raised as
179 -- a PL/SQL exception.
180 --
181 -- Access Status:
182 -- Internal Row Handler Use Only.
183 --
184 -- ----------------------------------------------------------------------------
185 procedure chk_df
189 l_proc varchar2(72) := g_package || 'chk_df';
186 (p_rec in hr_cle_shd.g_rec_type
187 ) is
188 --
190 --
191 begin
192 hr_utility.set_location('Entering:'||l_proc,10);
193 --
194 if ((p_rec.soc_ins_contr_lvls_id is not null) and (
195 nvl(hr_cle_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
196 nvl(p_rec.attribute_category, hr_api.g_varchar2) or
197 nvl(hr_cle_shd.g_old_rec.attribute1, hr_api.g_varchar2) <>
198 nvl(p_rec.attribute1, hr_api.g_varchar2) or
199 nvl(hr_cle_shd.g_old_rec.attribute2, hr_api.g_varchar2) <>
200 nvl(p_rec.attribute2, hr_api.g_varchar2) or
201 nvl(hr_cle_shd.g_old_rec.attribute3, hr_api.g_varchar2) <>
202 nvl(p_rec.attribute3, hr_api.g_varchar2) or
203 nvl(hr_cle_shd.g_old_rec.attribute4, hr_api.g_varchar2) <>
204 nvl(p_rec.attribute4, hr_api.g_varchar2) or
205 nvl(hr_cle_shd.g_old_rec.attribute5, hr_api.g_varchar2) <>
206 nvl(p_rec.attribute5, hr_api.g_varchar2) or
207 nvl(hr_cle_shd.g_old_rec.attribute6, hr_api.g_varchar2) <>
208 nvl(p_rec.attribute6, hr_api.g_varchar2) or
209 nvl(hr_cle_shd.g_old_rec.attribute7, hr_api.g_varchar2) <>
210 nvl(p_rec.attribute7, hr_api.g_varchar2) or
211 nvl(hr_cle_shd.g_old_rec.attribute8, hr_api.g_varchar2) <>
212 nvl(p_rec.attribute8, hr_api.g_varchar2) or
213 nvl(hr_cle_shd.g_old_rec.attribute9, hr_api.g_varchar2) <>
214 nvl(p_rec.attribute9, hr_api.g_varchar2) or
215 nvl(hr_cle_shd.g_old_rec.attribute10, hr_api.g_varchar2) <>
216 nvl(p_rec.attribute10, hr_api.g_varchar2) or
217 nvl(hr_cle_shd.g_old_rec.attribute11, hr_api.g_varchar2) <>
218 nvl(p_rec.attribute11, hr_api.g_varchar2) or
219 nvl(hr_cle_shd.g_old_rec.attribute12, hr_api.g_varchar2) <>
220 nvl(p_rec.attribute12, hr_api.g_varchar2) or
221 nvl(hr_cle_shd.g_old_rec.attribute13, hr_api.g_varchar2) <>
222 nvl(p_rec.attribute13, hr_api.g_varchar2) or
223 nvl(hr_cle_shd.g_old_rec.attribute14, hr_api.g_varchar2) <>
224 nvl(p_rec.attribute14, hr_api.g_varchar2) or
225 nvl(hr_cle_shd.g_old_rec.attribute15, hr_api.g_varchar2) <>
226 nvl(p_rec.attribute15, hr_api.g_varchar2) or
227 nvl(hr_cle_shd.g_old_rec.attribute16, hr_api.g_varchar2) <>
228 nvl(p_rec.attribute16, hr_api.g_varchar2) or
229 nvl(hr_cle_shd.g_old_rec.attribute17, hr_api.g_varchar2) <>
233 nvl(hr_cle_shd.g_old_rec.attribute19, hr_api.g_varchar2) <>
230 nvl(p_rec.attribute17, hr_api.g_varchar2) or
231 nvl(hr_cle_shd.g_old_rec.attribute18, hr_api.g_varchar2) <>
232 nvl(p_rec.attribute18, hr_api.g_varchar2) or
234 nvl(p_rec.attribute19, hr_api.g_varchar2) or
235 nvl(hr_cle_shd.g_old_rec.attribute20, hr_api.g_varchar2) <>
236 nvl(p_rec.attribute20, hr_api.g_varchar2) or
237 nvl(hr_cle_shd.g_old_rec.attribute21, hr_api.g_varchar2) <>
238 nvl(p_rec.attribute21, hr_api.g_varchar2) or
239 nvl(hr_cle_shd.g_old_rec.attribute22, hr_api.g_varchar2) <>
240 nvl(p_rec.attribute22, hr_api.g_varchar2) or
241 nvl(hr_cle_shd.g_old_rec.attribute23, hr_api.g_varchar2) <>
242 nvl(p_rec.attribute23, hr_api.g_varchar2) or
243 nvl(hr_cle_shd.g_old_rec.attribute24, hr_api.g_varchar2) <>
244 nvl(p_rec.attribute24, hr_api.g_varchar2) or
245 nvl(hr_cle_shd.g_old_rec.attribute25, hr_api.g_varchar2) <>
246 nvl(p_rec.attribute25, hr_api.g_varchar2) or
247 nvl(hr_cle_shd.g_old_rec.attribute26, hr_api.g_varchar2) <>
248 nvl(p_rec.attribute26, hr_api.g_varchar2) or
249 nvl(hr_cle_shd.g_old_rec.attribute27, hr_api.g_varchar2) <>
250 nvl(p_rec.attribute27, hr_api.g_varchar2) or
251 nvl(hr_cle_shd.g_old_rec.attribute28, hr_api.g_varchar2) <>
252 nvl(p_rec.attribute28, hr_api.g_varchar2) or
253 nvl(hr_cle_shd.g_old_rec.attribute29, hr_api.g_varchar2) <>
254 nvl(p_rec.attribute29, hr_api.g_varchar2) or
255 nvl(hr_cle_shd.g_old_rec.attribute30, hr_api.g_varchar2) <>
256 nvl(p_rec.attribute30, hr_api.g_varchar2) ))
257 or (p_rec.soc_ins_contr_lvls_id is null) then
258 --
259 -- Only execute the validation if absolutely necessary:
260 -- a) During update, the structure column value or any
261 -- of the attribute values have actually changed.
262 -- b) During insert.
263 --
264 hr_dflex_utility.ins_or_upd_descflex_attribs
265 (p_appl_short_name => 'PER'
266 ,p_descflex_name => 'HR_DE_SOC_INS_CLE'
267 ,p_attribute_category => p_rec.attribute_category
268 ,p_attribute1_name => 'ATTRIBUTE1'
269 ,p_attribute1_value => p_rec.attribute1
270 ,p_attribute2_name => 'ATTRIBUTE2'
271 ,p_attribute2_value => p_rec.attribute2
272 ,p_attribute3_name => 'ATTRIBUTE3'
273 ,p_attribute3_value => p_rec.attribute3
274 ,p_attribute4_name => 'ATTRIBUTE4'
275 ,p_attribute4_value => p_rec.attribute4
276 ,p_attribute5_name => 'ATTRIBUTE5'
277 ,p_attribute5_value => p_rec.attribute5
278 ,p_attribute6_name => 'ATTRIBUTE6'
279 ,p_attribute6_value => p_rec.attribute6
280 ,p_attribute7_name => 'ATTRIBUTE7'
281 ,p_attribute7_value => p_rec.attribute7
282 ,p_attribute8_name => 'ATTRIBUTE8'
283 ,p_attribute8_value => p_rec.attribute8
284 ,p_attribute9_name => 'ATTRIBUTE9'
285 ,p_attribute9_value => p_rec.attribute9
286 ,p_attribute10_name => 'ATTRIBUTE10'
287 ,p_attribute10_value => p_rec.attribute10
288 ,p_attribute11_name => 'ATTRIBUTE11'
289 ,p_attribute11_value => p_rec.attribute11
290 ,p_attribute12_name => 'ATTRIBUTE12'
291 ,p_attribute12_value => p_rec.attribute12
292 ,p_attribute13_name => 'ATTRIBUTE13'
293 ,p_attribute13_value => p_rec.attribute13
294 ,p_attribute14_name => 'ATTRIBUTE14'
295 ,p_attribute14_value => p_rec.attribute14
296 ,p_attribute15_name => 'ATTRIBUTE15'
297 ,p_attribute15_value => p_rec.attribute15
298 ,p_attribute16_name => 'ATTRIBUTE16'
299 ,p_attribute16_value => p_rec.attribute16
300 ,p_attribute17_name => 'ATTRIBUTE17'
301 ,p_attribute17_value => p_rec.attribute17
302 ,p_attribute18_name => 'ATTRIBUTE18'
303 ,p_attribute18_value => p_rec.attribute18
304 ,p_attribute19_name => 'ATTRIBUTE19'
305 ,p_attribute19_value => p_rec.attribute19
306 ,p_attribute20_name => 'ATTRIBUTE20'
310 ,p_attribute22_name => 'ATTRIBUTE22'
307 ,p_attribute20_value => p_rec.attribute20
308 ,p_attribute21_name => 'ATTRIBUTE21'
309 ,p_attribute21_value => p_rec.attribute21
311 ,p_attribute22_value => p_rec.attribute22
312 ,p_attribute23_name => 'ATTRIBUTE23'
313 ,p_attribute23_value => p_rec.attribute23
314 ,p_attribute24_name => 'ATTRIBUTE24'
315 ,p_attribute24_value => p_rec.attribute24
316 ,p_attribute25_name => 'ATTRIBUTE25'
317 ,p_attribute25_value => p_rec.attribute25
318 ,p_attribute26_name => 'ATTRIBUTE26'
319 ,p_attribute26_value => p_rec.attribute26
320 ,p_attribute27_name => 'ATTRIBUTE27'
321 ,p_attribute27_value => p_rec.attribute27
322 ,p_attribute28_name => 'ATTRIBUTE28'
323 ,p_attribute28_value => p_rec.attribute28
324 ,p_attribute29_name => 'ATTRIBUTE29'
325 ,p_attribute29_value => p_rec.attribute29
326 ,p_attribute30_name => 'ATTRIBUTE30'
327 ,p_attribute30_value => p_rec.attribute30
328 );
329 end if;
330 --
331 hr_utility.set_location(' Leaving:'||l_proc,20);
332 end chk_df;
333 --
334 -- ----------------------------------------------------------------------------
335 -- |-----------------------< chk_non_updateable_args >------------------------|
336 -- ----------------------------------------------------------------------------
337 -- {Start Of Comments}
338 --
339 -- Description:
340 -- This procedure is used to ensure that non updateable attributes have
341 -- not been updated. If an attribute has been updated an error is generated.
342 --
343 -- Pre Conditions:
344 -- g_old_rec has been populated with details of the values currently in
345 -- the database.
346 --
347 -- In Arguments:
348 -- p_rec has been populated with the updated values the user would like the
349 -- record set to.
350 --
351 -- Post Success:
352 -- Processing continues if all the non updateable attributes have not
353 -- changed.
354 --
355 -- Post Failure:
356 -- An application error is raised if any of the non updatable attributes
357 -- have been altered.
358 --
359 -- {End Of Comments}
360 -- ----------------------------------------------------------------------------
361 Procedure chk_non_updateable_args
362 (p_effective_date in date
363 ,p_rec in hr_cle_shd.g_rec_type
364 ) IS
365 --
366 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
367 l_error EXCEPTION;
368 l_argument varchar2(30);
369 --
370 Begin
371 --
372 -- Only proceed with the validation if a row exists for the current
373 -- record in the HR Schema.
374 --
375 IF NOT hr_cle_shd.api_updating
376 (p_soc_ins_contr_lvls_id => p_rec.soc_ins_contr_lvls_id
377 ,p_effective_date => p_effective_date
378 ,p_object_version_number => p_rec.object_version_number
379 ) THEN
380 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
381 fnd_message.set_token('PROCEDURE ', l_proc);
382 fnd_message.set_token('STEP ', '5');
383 fnd_message.raise_error;
384 END IF;
385
386 IF nvl(p_rec.organization_id, hr_api.g_number) <>
387 nvl(hr_cle_shd.g_old_rec.organization_id,hr_api.g_number) THEN
388 --
389 l_argument := 'organization_id';
390 RAISE l_error;
391 --
392 END IF;
393
394 EXCEPTION
395 WHEN l_error THEN
396 hr_api.argument_changed_error
397 (p_api_name => l_proc
398 ,p_argument => l_argument);
399 WHEN OTHERS THEN
400 RAISE;
401 End chk_non_updateable_args;
402
403 --
404 -- ----------------------------------------------------------------------------
405 -- |-----------------------< chk_organization_id >--------------------------|
406 -- ----------------------------------------------------------------------------
407 -- {Start Of Comments}
408 --
409 -- Description:
410 -- This procedure is used to ensure that organization_id is a foriegn key
411 -- to hr_organization_units and it is unique for given start and end date
412 -- Organization Classifictaion for given organization shold be Mandatory
413 -- Health Provider
414 -- Pre Conditions:
415 -- g_old_rec has been populated with details of the values currently in
416 -- the database.
417 --
418 -- In Arguments:
419 -- p_effective_date
420 -- p_validation_start_date
421 -- p_validation_end_date
422 -- p_organization_id
423 -- p_soc_ins_contr_lvls_id
427 --
424 --
425 -- Post Success:
426 -- Processing continues if organization id is valid
428 -- Post Failure:
429 -- An application error is raised if organization_id is not set properly
430 --
431 -- {End Of Comments}
432 -- ----------------------------------------------------------------------------
433 Procedure chk_organization_id
434 (p_effective_date in date
435 ,p_validation_start_date in date
436 ,p_validation_end_date in date
437 ,p_organization_id in hr_de_soc_ins_contr_lvls_f.organization_id%type
438 ,p_soc_ins_contr_lvls_id in hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type
439
440 ) IS
441
442 CURSOR csr_chk_organization_id1 IS
443 SELECT 'Y'
444 FROM hr_organization_units hou
445 WHERE hou.organization_id = p_organization_id
446 and p_validation_start_date between hou.date_from and nvl(hou.date_to,p_validation_end_date);
447
448 CURSOR csr_chk_organization_id2 IS
449 SELECT 'Y'
450 FROM hr_organization_units hou
451 WHERE hou.organization_id = p_organization_id
452 and p_validation_end_date between hou.date_from and nvl(hou.date_to,p_validation_end_date);
453
454 CURSOR csr_chk_organization_id3 IS
455 SELECT 'Y'
456 FROM hr_DE_SOC_INS_CONTR_LVLS_F hsi
457 WHERE hsi.organization_id = p_organization_id
458 and p_validation_end_date between hsi.effective_start_date and nvl(hsi.effective_end_date,p_validation_end_date);
459
460 CURSOR csr_chk_organization_id4 IS
461 SELECT 'Y'
462 FROM hr_DE_SOC_INS_CONTR_LVLS_F hsi
463 WHERE hsi.organization_id = p_organization_id
464 and p_validation_start_date between hsi.effective_start_date and nvl(hsi.effective_end_date,p_validation_end_date);
465
466 CURSOR csr_chk_org_class IS
467 SELECT 'Y'
468 FROM hr_organization_information hoi
469 WHERE hoi.organization_id = p_organization_id
470 and hoi.org_information_context = 'CLASS'
474 --
471 and hoi.org_information1 IN ('DE_MAN_HEALTH_PROV', 'DE_ADD_SEC_PEN_PROV');
472
473
475 l_proc varchar2(72) := g_package || 'chk_organization_id';
476 l_error EXCEPTION;
477 l_argument varchar2(30);
478 l_var varchar2(1);
479 --
480 Begin
481
482 hr_utility.set_location('Entering:'||l_proc, 10);
483 --
484 -- Only proceed with the validation if inserting
485 --
486 hr_utility.trace('effective_date' ||p_effective_date);
487 hr_utility.trace('effective_start_date' ||p_validation_start_date);
488 hr_utility.trace('effective_end_date' ||p_validation_end_date);
489 hr_utility.trace('organization' ||p_organization_id);
490 if p_soc_ins_contr_lvls_id is null then
491
492 hr_utility.set_location('Entering:'||l_proc, 20);
493 --
494 -- Only proceed with the validation if inserting
495 --
496
497 if p_organization_id is null then
498
499 hr_utility.set_message(800,'HR_DE_INVALID_ORGANIZATION');
500 hr_utility.raise_error;
501 end if;
502
503 OPEN csr_chk_organization_id1;
504 FETCH csr_chk_organization_id1 INTO l_var;
505
506 IF csr_chk_organization_id1%NOTFOUND THEN
507 hr_utility.set_location(l_proc,30);
508 CLOSE csr_chk_organization_id1;
509 hr_utility.set_message(800, 'HR_DE_INVALID_ORGANIZATION');
510 hr_utility.raise_error;
511 END IF;
512
513 CLOSE csr_chk_organization_id1;
514 hr_utility.set_location(l_proc,40);
515
516 OPEN csr_chk_organization_id2;
517 FETCH csr_chk_organization_id2 INTO l_var;
518
519 IF csr_chk_organization_id2%NOTFOUND THEN
520 hr_utility.set_location(l_proc,50);
521 CLOSE csr_chk_organization_id2;
522 hr_utility.set_message(800, 'HR_DE_INVALID_ORGANIZATION');
523 hr_utility.raise_error;
524 END IF;
525
526 hr_utility.set_location(l_proc,60);
527 CLOSE csr_chk_organization_id2;
528
529 OPEN csr_chk_organization_id3;
530 FETCH csr_chk_organization_id3 INTO l_var;
531
532 IF csr_chk_organization_id3%FOUND THEN
533 hr_utility.set_location(l_proc,70);
534 CLOSE csr_chk_organization_id3;
535 hr_utility.set_message(800, 'HR_DE_INVALID_ORGANIZATION');
536 hr_utility.raise_error;
537 END IF;
538
539 CLOSE csr_chk_organization_id3;
540 hr_utility.set_location(l_proc,80);
541
542 OPEN csr_chk_organization_id4;
543 FETCH csr_chk_organization_id4 INTO l_var;
544
545 IF csr_chk_organization_id4%FOUND THEN
546 hr_utility.set_location(l_proc,90);
547 CLOSE csr_chk_organization_id4;
551
548 hr_utility.set_message(800, 'HR_DE_INVALID_ORGANIZATION');
549 hr_utility.raise_error;
550 END IF;
552 CLOSE csr_chk_organization_id4;
553 hr_utility.set_location(l_proc,100);
554
555 OPEN csr_chk_org_class;
556 FETCH csr_chk_org_class INTO l_var;
557
558 IF csr_chk_org_class%NOTFOUND THEN
559 hr_utility.set_location(l_proc,110);
560 CLOSE csr_chk_org_class;
561 hr_utility.set_message(800, 'HR_DE_INVALID_ORGANIZATION');
562 hr_utility.raise_error;
563 END IF;
564
565 CLOSE csr_chk_org_class;
566 hr_utility.set_location(l_proc,200);
567
568
569 end if;
570
571 End chk_organization_id;
572
573
574 --
575 -- ---------------------------------------------------------------------------
576 -- |---------------------------< chk_normal_amount>--------------------------|
577 -- ---------------------------------------------------------------------------
578 --
579 -- Desciption :
580 --
581 -- Validate normal_amount value on insert and update
582 --
583 --
584 -- Pre-conditions :
585 --
586 --
587 -- In Arguments :
588 -- p_normal_amount
589 -- p_soc_ins_contr_lvls_id
590 -- Post Success :
591 -- Processing continues
592 --
593 -- Post Failure :
594 -- An application error will be raised and processing is
595 -- terminated
596 --
597 -- Access Status :
598 -- Internal Table Handler Use only.
599 --
600 -- {End of Comments}
601 --
602 -- ---------------------------------------------------------------------------
603 --
604 PROCEDURE chk_normal_amount
605 ( p_normal_amount IN hr_de_soc_ins_contr_lvls_f.normal_amount%type
606 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
607
608 --
609 l_proc VARCHAR2(72) := g_package || 'chk_normal_amount';
610 l_dummy VARCHAR2(1);
611 l_validated boolean := TRUE;
612 --
613
614 BEGIN
615 --
616 hr_utility.set_location('Entering:'||l_proc, 10);
617
618 --
619 -- Only proceed with validation if :
620 -- a) Inserting or
621 -- b) The value for normal amount has changed
622 --
623
624 IF P_NORMAL_AMOUNT IS NOT NULL THEN
625 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
626 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
627 (hr_cle_shd.g_old_rec.normal_amount <> p_normal_amount))) THEN
628 --
629 hr_utility.set_location(l_proc, 20);
630
631 IF ( P_NORMAL_AMOUNT < 0 ) then
632 --
633 hr_utility.set_location(l_proc, 30);
634 hr_utility.set_message(800, 'HR_DE_INVALID_NORMAL_AMOUNT');
635 hr_utility.raise_error;
636 --
637 END IF;
638 --
639 END IF;
640 --
641 END IF;
642 hr_utility.set_location('Leaving '||l_proc, 40);
643 --
644 --
645 END chk_normal_amount;
646 --
647
648 --
649 -- ---------------------------------------------------------------------------
650 -- |---------------------------< chk_increased_amount>--------------------------|
651 -- ---------------------------------------------------------------------------
652 --
653 -- Desciption :
654 --
655 -- Validate normal_amount value on insert and update
656 --
657 --
658 -- Pre-conditions :
659 --
660 --
661 -- In Arguments :
662 -- p_increased_amount
663 -- p_soc_ins_contr_lvls_id
664 -- Post Success :
665 -- Processing continues
666 --
667 -- Post Failure :
668 -- An application error will be raised and processing is
669 -- terminated
670 --
671 -- Access Status :
672 -- Internal Table Handler Use only.
673 --
674 -- {End of Comments}
675 --
676 -- ---------------------------------------------------------------------------
677 --
678 PROCEDURE chk_increased_amount
679 ( p_increased_amount IN hr_de_soc_ins_contr_lvls_f.increased_amount%type
680 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
681
682 --
683 l_proc VARCHAR2(72) := g_package || 'chk_increased_amount';
684 l_dummy VARCHAR2(1);
685 l_validated boolean := TRUE;
686 --
687
688 BEGIN
689 --
690 hr_utility.set_location('Entering:'||l_proc, 10);
691
692 --
693 -- Only proceed with validation if :
694 -- a) Inserting or
695 -- b) The value for increased amount has changed
696 --
697 IF P_INCREASED_AMOUNT IS NOT NULL THEN
698 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
699 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
700 (hr_cle_shd.g_old_rec.increased_amount <> p_increased_amount))) THEN
701 --
702 hr_utility.set_location(l_proc, 20);
703
704 IF (P_INCREASED_AMOUNT < 0) then
705 --
706 hr_utility.set_location(l_proc, 30);
707 hr_utility.set_message(800, 'HR_DE_INVALID_INCREASED_AMOUNT');
708 hr_utility.raise_error;
709 --
710 END IF;
711 --
712 END IF;
713 END IF;
714 --
715 hr_utility.set_location('Leaving '||l_proc, 40);
716 --
717 --
718 END chk_increased_amount;
719 --
720
721 --
722 -- ---------------------------------------------------------------------------
723 -- |---------------------------< chk_reduced_amount>--------------------------|
724 -- ---------------------------------------------------------------------------
725 --
729 --
726 -- Desciption :
727 --
728 -- Validate normal_amount value on insert and update
730 --
731 -- Pre-conditions :
732 --
733 --
734 -- In Arguments :
735 -- p_reduced_amount
736 -- p_soc_ins_contr_lvls_id
737 -- Post Success :
738 -- Processing continues
739 --
740 -- Post Failure :
741 -- An application error will be raised and processing is
742 -- terminated
743 --
744 -- Access Status :
745 -- Internal Table Handler Use only.
746 --
747 -- {End of Comments}
748 --
749 -- ---------------------------------------------------------------------------
750 --
751 PROCEDURE chk_reduced_amount
752 ( p_reduced_amount IN hr_de_soc_ins_contr_lvls_f.reduced_amount%type
753 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
754
755 --
756 l_proc VARCHAR2(72) := g_package || 'chk_reduced_amount';
757 l_dummy VARCHAR2(1);
758 l_validated boolean := TRUE;
759 --
760
761 BEGIN
762 --
763 hr_utility.set_location('Entering:'||l_proc, 10);
764
765 --
766 -- Only proceed with validation if :
767 -- a) Inserting or
768 -- b) The value for reduced amount has changed
769 --
770 IF P_REDUCED_AMOUNT IS NOT NULL THEN
771 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
772 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
773 (hr_cle_shd.g_old_rec.reduced_amount <> p_reduced_amount))) THEN
774 --
775 hr_utility.set_location(l_proc, 20);
776
777 IF (P_REDUCED_AMOUNT < 0) then
778 --
779 hr_utility.set_location(l_proc, 30);
780 hr_utility.set_message(800, 'HR_DE_INVALID_REDUCED_AMOUNT');
781 hr_utility.raise_error;
782 --
783 END IF;
784 --
785 END IF;
786 END IF;
787 --
788 hr_utility.set_location('Leaving '||l_proc, 40);
789 --
790 --
791 END chk_reduced_amount;
792 --
793
794 --
795 -- ---------------------------------------------------------------------------
796 -- |---------------------------< chk_normal_percentage>--------------------------|
797 -- ---------------------------------------------------------------------------
798 --
799 -- Desciption :
800 --
801 -- Validate normal_percentage value on insert and update
802 --
803 --
804 -- Pre-conditions :
805 --
806 --
807 -- In Arguments :
808 -- p_normal_percentage
809 -- p_soc_ins_contr_lvls_id
810 -- Post Success :
811 -- Processing continues
812 --
813 -- Post Failure :
814 -- An application error will be raised and processing is
815 -- terminated
816 --
817 -- Access Status :
818 -- Internal Table Handler Use only.
819 --
820 -- {End of Comments}
821 --
822 -- ---------------------------------------------------------------------------
823 --
824 PROCEDURE chk_normal_percentage
825 ( p_normal_percentage IN hr_de_soc_ins_contr_lvls_f.normal_percentage%type
826 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
827
828 --
829 l_proc VARCHAR2(72) := g_package || 'chk_normal_percentage';
830 l_dummy VARCHAR2(1);
831 l_validated boolean := TRUE;
832 --
833
834 BEGIN
835 --
836 hr_utility.set_location('Entering:'||l_proc, 10);
837
838 --
839 -- Only proceed with validation if :
840 -- a) Inserting or
841 -- b) The value for normal percentage has changed
842 --
843
844 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
845 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
846 (hr_cle_shd.g_old_rec.normal_percentage <> p_normal_percentage))) THEN
847 --
848 hr_utility.set_location(l_proc, 20);
849
850 IF ( P_NORMAL_PERCENTAGE < 0 OR P_NORMAL_PERCENTAGE > 100) then
851 --
852 hr_utility.set_location(l_proc, 30);
853 hr_utility.set_message(800, 'HR_DE_INVALID_NORM_AMT_PERC');
854 hr_utility.raise_error;
855 --
856 END IF;
857 --
858 END IF;
859 --
860 hr_utility.set_location('Leaving '||l_proc, 40);
861 --
862 --
863 END chk_normal_percentage;
864 --
865
866 --
867 -- ---------------------------------------------------------------------------
868 -- |---------------------------< chk_increased_percentage>--------------------------|
869 -- ---------------------------------------------------------------------------
870 --
871 -- Desciption :
872 --
873 -- Validate normal_percentage value on insert and update
874 --
875 --
876 -- Pre-conditions :
877 --
878 --
879 -- In Arguments :
880 -- p_increased_percentage
881 -- p_soc_ins_contr_lvls_id
882 -- Post Success :
883 -- Processing continues
884 --
885 -- Post Failure :
886 -- An application error will be raised and processing is
887 -- terminated
888 --
889 -- Access Status :
890 -- Internal Table Handler Use only.
891 --
892 -- {End of Comments}
893 --
894 -- ---------------------------------------------------------------------------
895 --
896 PROCEDURE chk_increased_percentage
897 ( p_increased_percentage IN hr_de_soc_ins_contr_lvls_f.increased_percentage%type
898 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
899
900 --
904 --
901 l_proc VARCHAR2(72) := g_package || 'chk_increased_percentage';
902 l_dummy VARCHAR2(1);
903 l_validated boolean := TRUE;
905
906 BEGIN
907 --
908 hr_utility.set_location('Entering:'||l_proc, 10);
909
910 --
911 -- Only proceed with validation if :
912 -- a) Inserting or
913 -- b) The value for increased percentage has changed
914 --
915 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
916 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
917 (hr_cle_shd.g_old_rec.normal_percentage <> p_increased_percentage))) THEN
918 --
919 hr_utility.set_location(l_proc, 20);
920
921 IF ( P_INCREASED_PERCENTAGE < 0 OR P_INCREASED_PERCENTAGE > 100) then
922 --
923 hr_utility.set_location(l_proc, 30);
924 hr_utility.set_message(800, 'HR_DE_INVALID_INC_AMT_PERC');
925 hr_utility.raise_error;
926 --
927 END IF;
928 --
929 END IF;
930 --
931 hr_utility.set_location('Leaving '||l_proc, 40);
932 --
933 --
934 END chk_increased_percentage;
935 --
936
937 --
938 -- ---------------------------------------------------------------------------
939 -- |---------------------------< chk_reduced_percentage>--------------------------|
940 -- ---------------------------------------------------------------------------
941 --
942 -- Desciption :
943 --
944 -- Validate normal_percentage value on insert and update
945 --
946 --
947 -- Pre-conditions :
948 --
949 --
950 -- In Arguments :
951 -- p_reduced_percentage
952 -- p_soc_ins_contr_lvls_id
953 -- Post Success :
954 -- Processing continues
955 --
956 -- Post Failure :
957 -- An application error will be raised and processing is
958 -- terminated
959 --
960 -- Access Status :
961 -- Internal Table Handler Use only.
962 --
963 -- {End of Comments}
964 --
965 -- ---------------------------------------------------------------------------
966 --
967 PROCEDURE chk_reduced_percentage
968 ( p_reduced_percentage IN hr_de_soc_ins_contr_lvls_f.reduced_percentage%type
969 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
970
971 --
972 l_proc VARCHAR2(72) := g_package || 'chk_reduced_percentage';
973 l_dummy VARCHAR2(1);
974 l_validated boolean := TRUE;
975 --
976
977 BEGIN
978 --
979 hr_utility.set_location('Entering:'||l_proc, 10);
980
981 --
982 -- Only proceed with validation if :
983 -- a) Inserting or
984 -- b) The value for reduced percentage has changed
985 --
986 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
987 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
988 (hr_cle_shd.g_old_rec.normal_percentage <> p_reduced_percentage))) THEN
989 --
990 hr_utility.set_location(l_proc, 20);
991
992 IF ( P_REDUCED_PERCENTAGE < 0 OR P_REDUCED_PERCENTAGE > 100) then
993 --
994 hr_utility.set_location(l_proc, 30);
995 hr_utility.set_message(800, 'HR_DE_INVALID_REDC_AMT_PERC');
996 hr_utility.raise_error;
997 --
998 END IF;
999 --
1000 END IF;
1001 --
1002 hr_utility.set_location('Leaving '||l_proc, 40);
1003 --
1004 --
1005 END chk_reduced_percentage;
1006 --
1007 --
1008 -- ---------------------------------------------------------------------------
1009 -- |---------------------------< chk_normal_percent_null>--------------------------|
1010 -- ---------------------------------------------------------------------------
1011 --
1012 -- Desciption :
1013 --
1014 -- Validate normal_percentage value to be not null on insert and update
1015 --
1016 --
1017 -- Pre-conditions :
1018 --
1019 --
1020 -- In Arguments :
1021 -- p_normal_percentage
1022 -- p_soc_ins_contr_lvls_id
1023 -- Post Success :
1024 -- Processing continues
1025 --
1026 -- Post Failure :
1027 -- An application error will be raised and processing is
1028 -- terminated
1029 --
1030 -- Access Status :
1031 -- Internal Table Handler Use only.
1032 --
1033 -- {End of Comments}
1034 --
1035 -- ---------------------------------------------------------------------------
1036 --
1037 PROCEDURE chk_normal_percent_null
1038 ( p_normal_percentage IN hr_de_soc_ins_contr_lvls_f.normal_percentage%type
1039 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1040
1041 --
1042 l_proc VARCHAR2(72) := g_package || 'chk_normal_percent_null';
1043 l_dummy VARCHAR2(1);
1044 l_validated boolean := TRUE;
1045 --
1046
1047 BEGIN
1048 --
1049 hr_utility.set_location('Entering:'||l_proc, 10);
1050
1051 --
1052 -- Only proceed with validation if :
1053 -- a) Inserting or
1054 -- b) The value for normal percentage has changed
1055 --
1056
1057 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1058 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1059 (hr_cle_shd.g_old_rec.normal_percentage <> p_normal_percentage))) THEN
1060 --
1061 hr_utility.set_location(l_proc, 20);
1062
1063 IF ( P_NORMAL_PERCENTAGE IS NULL) then
1064 --
1065 hr_utility.set_location(l_proc, 30);
1066 fnd_message.set_name('PER', 'HR_DE_COLUMN_NULL');
1067 fnd_message.set_token('COL_NAME','normal_percentage');
1068 fnd_message.raise_error;
1069
1070 --
1071 END IF;
1072 --
1073 END IF;
1074 --
1075 hr_utility.set_location('Leaving '||l_proc, 40);
1076 --
1077 --
1078 END chk_normal_percent_null;
1079 --
1080
1081 --
1082 -- ---------------------------------------------------------------------------
1083 -- |---------------------------< chk_increased_percent_null>--------------------------|
1084 -- ---------------------------------------------------------------------------
1085 --
1086 -- Desciption :
1087 --
1088 -- Validate increased_percentage value on insert and update
1089 --
1090 --
1091 -- Pre-conditions :
1092 --
1093 --
1094 -- In Arguments :
1095 -- p_increased_percentage
1096 -- p_soc_ins_contr_lvls_id
1097 -- Post Success :
1098 -- Processing continues
1099 --
1100 -- Post Failure :
1101 -- An application error will be raised and processing is
1102 -- terminated
1103 --
1104 -- Access Status :
1105 -- Internal Table Handler Use only.
1106 --
1107 -- {End of Comments}
1108 --
1109 -- ---------------------------------------------------------------------------
1110 --
1111 PROCEDURE chk_increased_percent_null
1112 ( p_increased_percentage IN hr_de_soc_ins_contr_lvls_f.increased_percentage%type
1113 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1114
1115 --
1116 l_proc VARCHAR2(72) := g_package || 'chk_increased_percent_null';
1117 l_dummy VARCHAR2(1);
1118 l_validated boolean := TRUE;
1119 --
1120
1121 BEGIN
1122 --
1123 hr_utility.set_location('Entering:'||l_proc, 10);
1124
1125 --
1126 -- Only proceed with validation if :
1127 -- a) Inserting or
1128 -- b) The value for increased percentage has changed
1129 --
1130 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1131 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1132 (hr_cle_shd.g_old_rec.increased_percentage <> p_increased_percentage))) THEN
1133 --
1134 hr_utility.set_location(l_proc, 20);
1135
1136 IF ( P_INCREASED_PERCENTAGE IS NULL) then
1137 --
1138 hr_utility.set_location(l_proc, 30);
1139 FND_MESSAGE.set_name('PER', 'HR_DE_COLUMN_NULL');
1140 fnd_message.set_token('COL_NAME','increased_percentage');
1141 fnd_message.raise_error;
1142 --
1143 END IF;
1144
1145 END IF;
1146 --
1147 hr_utility.set_location('Leaving '||l_proc, 40);
1148 --
1149 --
1150 END chk_increased_percent_null;
1151 --
1152
1153 --
1154 -- ---------------------------------------------------------------------------
1155 -- |---------------------------< chk_reduced_percent_null>--------------------------|
1156 -- ---------------------------------------------------------------------------
1157 --
1158 -- Desciption :
1159 --
1160 -- Validate reduced_percentage value on insert and update
1161 --
1162 --
1163 -- Pre-conditions :
1164 --
1165 --
1166 -- In Arguments :
1167 -- p_reduced_percentage
1168 -- p_soc_ins_contr_lvls_id
1169 -- Post Success :
1170 -- Processing continues
1171 --
1172 -- Post Failure :
1173 -- An application error will be raised and processing is
1174 -- terminated
1175 --
1176 -- Access Status :
1177 -- Internal Table Handler Use only.
1178 --
1179 -- {End of Comments}
1180 --
1181 -- ---------------------------------------------------------------------------
1182 --
1183 PROCEDURE chk_reduced_percent_null
1184 ( p_reduced_percentage IN hr_de_soc_ins_contr_lvls_f.reduced_percentage%type
1185 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1186
1187 --
1188 l_proc VARCHAR2(72) := g_package || 'chk_reduced_percent_null';
1189 l_dummy VARCHAR2(1);
1190 l_validated boolean := TRUE;
1191 --
1192
1193 BEGIN
1194 --
1195 hr_utility.set_location('Entering:'||l_proc, 10);
1196
1197 --
1198 -- Only proceed with validation if :
1199 -- a) Inserting or
1200 -- b) The value for reduced percentage has changed
1201 --
1202 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1203 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1204 (hr_cle_shd.g_old_rec.reduced_percentage <> p_reduced_percentage))) THEN
1205 --
1206 hr_utility.set_location(l_proc, 20);
1207
1208 IF ( P_REDUCED_PERCENTAGE IS NULL ) then
1209 --
1210 hr_utility.set_location(l_proc, 30);
1211 FND_MESSAGE.set_name('PER', 'HR_DE_COLUMN_NULL');
1212 fnd_message.set_token('COL_NAME','reduced_percentage');
1213 fnd_message.raise_error;
1214 --
1215 END IF;
1216 --
1217 END IF;
1218 --
1219 hr_utility.set_location('Leaving '||l_proc, 40);
1220 --
1221 --
1222 END chk_reduced_percent_null;
1223 --
1224 -- ---------------------------------------------------------------------------
1225 -- |---------------------------< chk_max_inc_contr_null>--------------------------|
1226 -- ---------------------------------------------------------------------------
1227 --
1228 -- Desciption :
1229 --
1230 -- Validate max_increased_contribution value on insert and update
1231 --
1232 --
1233 -- Pre-conditions :
1234 --
1235 --
1236 -- In Arguments :
1237 -- p_max_increased_contribution
1238 -- p_soc_ins_contr_lvls_id
1239 -- Post Success :
1240 -- Processing continues
1241 --
1242 -- Post Failure :
1243 -- An application error will be raised and processing is
1244 -- terminated
1245 --
1246 -- Access Status :
1247 -- Internal Table Handler Use only.
1248 --
1249 -- {End of Comments}
1250 --
1251 -- ---------------------------------------------------------------------------
1252 --
1253 PROCEDURE chk_max_inc_contr_null
1257 --
1254 ( p_max_increased_contribution IN hr_de_soc_ins_contr_lvls_f.max_increased_contribution%type
1255 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1256
1258 l_proc VARCHAR2(72) := g_package || 'chk_max_inc_contr_null';
1259 l_dummy VARCHAR2(1);
1260 l_validated boolean := TRUE;
1261 --
1262
1263 BEGIN
1264 --
1265 hr_utility.set_location('Entering:'||l_proc, 10);
1266
1267 --
1268 -- Only proceed with validation if :
1269 -- a) Inserting or
1270 -- b) The value for max_increased_contribution has changed
1271 --
1272 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1273 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1274 (hr_cle_shd.g_old_rec.max_increased_contribution <> p_max_increased_contribution))) THEN
1275 --
1276 hr_utility.set_location(l_proc, 20);
1277
1278 IF ( p_max_increased_contribution IS NULL ) then
1279 --
1280 hr_utility.set_location(l_proc, 30);
1281 fnd_message.set_name('PER', 'HR_DE_COLUMN_NULL');
1282 fnd_message.set_token('COL_NAME','max_increased_contribution');
1283 fnd_message.raise_error;
1284 --
1285 END IF;
1286 --
1287 IF ( p_max_increased_contribution < 0 ) then
1288 --
1289 hr_utility.set_location(l_proc, 30);
1290 fnd_message.set_name('PER', 'HR_DE_COL_NEGATIVE');
1291 fnd_message.set_token('COL_NAME','max_increased_contribution');
1292 fnd_message.raise_error;
1293 --
1294 END IF;
1295 --
1296
1297 END IF;
1298 --
1299 hr_utility.set_location('Leaving '||l_proc, 40);
1300 --
1301 --
1302 END chk_max_inc_contr_null;
1303 --
1304 -- ---------------------------------------------------------------------------
1305 -- |---------------------------< chk_min_inc_contr_null>--------------------------|
1306 -- ---------------------------------------------------------------------------
1307 --
1308 -- Desciption :
1309 --
1310 -- Validate min_increased_contribution value on insert and update
1311 --
1312 --
1313 -- Pre-conditions :
1314 --
1315 --
1316 -- In Arguments :
1317 -- p_max_increased_contribution
1318 -- p_soc_ins_contr_lvls_id
1319 -- Post Success :
1320 -- Processing continues
1321 --
1322 -- Post Failure :
1323 -- An application error will be raised and processing is
1324 -- terminated
1325 --
1326 -- Access Status :
1327 -- Internal Table Handler Use only.
1328 --
1329 -- {End of Comments}
1330 --
1331 -- ---------------------------------------------------------------------------
1332 --
1333 PROCEDURE chk_min_inc_contr_null
1334 ( p_min_increased_contribution IN hr_de_soc_ins_contr_lvls_f.min_increased_contribution%type
1335 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1336
1337 --
1338 l_proc VARCHAR2(72) := g_package || 'chk_min_inc_contr_null';
1339 l_dummy VARCHAR2(1);
1340 l_validated boolean := TRUE;
1341 --
1342
1343 BEGIN
1344 --
1345 hr_utility.set_location('Entering:'||l_proc, 10);
1346
1347 --
1348 -- Only proceed with validation if :
1349 -- a) Inserting or
1350 -- b) The value for min_increased_contribution has changed
1351 --
1352 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1353 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1354 (hr_cle_shd.g_old_rec.min_increased_contribution <> p_min_increased_contribution))) THEN
1355 --
1356 hr_utility.set_location(l_proc, 20);
1357
1358 IF ( p_min_increased_contribution IS NULL ) then
1359 --
1360 hr_utility.set_location(l_proc, 30);
1361 FND_MESSAGE.set_name('PER', 'HR_DE_COLUMN_NULL');
1362 fnd_message.set_token('COL_NAME','min_increased_contribution');
1363 fnd_message.raise_error;
1364 --
1365 END IF;
1366 --
1367 IF ( p_min_increased_contribution < 0 ) then
1368 --
1369 hr_utility.set_location(l_proc, 30);
1370 FND_MESSAGE.set_name('PER', 'HR_DE_COL_NEGATIVE');
1371 fnd_message.set_token('COL_NAME','min_increased_contribution');
1372 fnd_message.raise_error;
1373
1374 END IF;
1375 --
1376 END IF;
1377 --
1378
1379 hr_utility.set_location('Leaving '||l_proc, 40);
1380 --
1381 --
1382 END chk_min_inc_contr_null;
1383 --
1384 --
1385 -- ---------------------------------------------------------------------------
1386 -- |---------------------------< chk_month1_min_contr_null>--------------------------|
1387 -- ---------------------------------------------------------------------------
1388 --
1389 -- Desciption :
1390 --
1391 -- Validate month1_min_contribution value on insert and update
1392 --
1393 --
1394 -- Pre-conditions :
1395 --
1396 --
1397 -- In Arguments :
1398 -- p_month1_min_contribution
1399 -- p_soc_ins_contr_lvls_id
1400 -- Post Success :
1401 -- Processing continues
1402 --
1403 -- Post Failure :
1404 -- An application error will be raised and processing is
1405 -- terminated
1406 --
1407 -- Access Status :
1408 -- Internal Table Handler Use only.
1409 --
1410 -- {End of Comments}
1411 --
1412 -- ---------------------------------------------------------------------------
1413 --
1414 PROCEDURE chk_month1_min_contr_null
1415 ( p_month1_min_contribution IN hr_de_soc_ins_contr_lvls_f.month1_min_contribution%type
1416 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1417
1418 --
1422 --
1419 l_proc VARCHAR2(72) := g_package || 'chk_month1_min_contr_null';
1420 l_dummy VARCHAR2(1);
1421 l_validated boolean := TRUE;
1423
1424 BEGIN
1425 --
1426 hr_utility.set_location('Entering:'||l_proc, 10);
1427
1428 --
1429 -- Only proceed with validation if :
1430 -- a) Inserting or
1431 -- b) The value for month1_min_contribution has changed
1432 --
1433 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1434 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1435 (hr_cle_shd.g_old_rec.month1_min_contribution <> p_month1_min_contribution))) THEN
1436 --
1437 hr_utility.set_location(l_proc, 20);
1438
1439 IF ( p_month1_min_contribution IS NULL ) then
1440 --
1441 hr_utility.set_location(l_proc, 30);
1442 FND_MESSAGE.set_name('PER', 'HR_DE_COLUMN_NULL');
1443 fnd_message.set_token('COL_NAME','month1_min_contribution');
1444 fnd_message.raise_error;
1445 --
1446 END IF;
1447 --
1448 IF ( p_month1_min_contribution < 0 ) then
1449 --
1450 hr_utility.set_location(l_proc, 30);
1451 FND_MESSAGE.set_name('PER', 'HR_DE_COL_NEGATIVE');
1452 fnd_message.set_token('COL_NAME','month1_min_contribution');
1453 fnd_message.raise_error;
1454
1455 END IF;
1456 --
1457 END IF;
1458 --
1459 hr_utility.set_location('Leaving '||l_proc, 40);
1460 --
1461 --
1462 END chk_month1_min_contr_null;
1463 --
1464 --
1465 -- ---------------------------------------------------------------------------
1466 -- |---------------------------< chk_month1_max_contr_null>--------------------------|
1467 -- ---------------------------------------------------------------------------
1468 --
1469 -- Desciption :
1470 --
1471 -- Validate month1_max_contribution value on insert and update
1472 --
1473 --
1474 -- Pre-conditions :
1475 --
1476 --
1477 -- In Arguments :
1478 -- p_month1_max_contribution
1479 -- p_soc_ins_contr_lvls_id
1480 -- Post Success :
1481 -- Processing continues
1482 --
1483 -- Post Failure :
1484 -- An application error will be raised and processing is
1485 -- termaxated
1486 --
1487 -- Access Status :
1488 -- Internal Table Handler Use only.
1489 --
1493 --
1490 -- {End of Comments}
1491 --
1492 -- ---------------------------------------------------------------------------
1494 PROCEDURE chk_month1_max_contr_null
1495 ( p_month1_max_contribution IN hr_de_soc_ins_contr_lvls_f.month1_max_contribution%type
1496 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1497
1498 --
1499 l_proc VARCHAR2(72) := g_package || 'chk_month1_max_contr_null';
1500 l_dummy VARCHAR2(1);
1501 l_validated boolean := TRUE;
1502 --
1503
1504 BEGIN
1505 --
1506 hr_utility.set_location('Entering:'||l_proc, 10);
1507
1508 --
1509 -- Only proceed with validation if :
1510 -- a) Inserting or
1511 -- b) The value for month1_max_contribution has changed
1512 --
1513 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1514 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1515 (hr_cle_shd.g_old_rec.month1_max_contribution <> p_month1_max_contribution))) THEN
1516 --
1517 hr_utility.set_location(l_proc, 20);
1518
1519 IF ( p_month1_max_contribution IS NULL ) then
1520 --
1521 hr_utility.set_location(l_proc, 30);
1522 FND_MESSAGE.set_name('PER', 'HR_DE_COLUMN_NULL');
1523 fnd_message.set_token('COL_NAME','month1_max_contribution');
1524 fnd_message.raise_error;
1525 --
1526 END IF;
1527 --
1528 IF ( p_month1_max_contribution < 0 ) then
1529 --
1530 hr_utility.set_location(l_proc, 30);
1531 FND_MESSAGE.set_name('PER', 'HR_DE_COL_NEGATIVE');
1532 fnd_message.set_token('COL_NAME','month1_max_contribution');
1533 fnd_message.raise_error;
1534
1535 END IF;
1536 --
1537 END IF;
1538 --
1539 hr_utility.set_location('Leaving '||l_proc, 40);
1540 --
1541 --
1542 END chk_month1_max_contr_null;
1543 --
1544 --
1545 --
1546 -- ---------------------------------------------------------------------------
1547 -- |---------------------------< chk_month2_min_contr_null>--------------------------|
1548 -- ---------------------------------------------------------------------------
1549 --
1550 -- Desciption :
1551 --
1552 -- Validate month2_min_contribution value on insert and update
1553 --
1554 --
1555 -- Pre-conditions :
1556 --
1560 -- p_soc_ins_contr_lvls_id
1557 --
1558 -- In Arguments :
1559 -- p_month2_min_contribution
1561 -- Post Success :
1562 -- Processing continues
1563 --
1564 -- Post Failure :
1565 -- An application error will be raised and processing is
1566 -- terminated
1567 --
1568 -- Access Status :
1569 -- Internal Table Handler Use only.
1570 --
1571 -- {End of Comments}
1572 --
1573 -- ---------------------------------------------------------------------------
1574 --
1575 PROCEDURE chk_month2_min_contr_null
1576 ( p_month2_min_contribution IN hr_de_soc_ins_contr_lvls_f.month2_min_contribution%type
1577 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1578
1579 --
1580 l_proc VARCHAR2(72) := g_package || 'chk_month2_min_contr_null';
1581 l_dummy VARCHAR2(1);
1582 l_validated boolean := TRUE;
1583 --
1584
1585 BEGIN
1586 --
1587 hr_utility.set_location('Entering:'||l_proc, 10);
1588
1589 --
1590 -- Only proceed with validation if :
1591 -- a) Inserting or
1592 -- b) The value for month2_min_contribution has changed
1593 --
1594 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1595 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1596 (hr_cle_shd.g_old_rec.month2_min_contribution <> p_month2_min_contribution))) THEN
1597 --
1598 hr_utility.set_location(l_proc, 20);
1599
1600 IF ( p_month2_min_contribution IS NULL ) then
1601 --
1602 hr_utility.set_location(l_proc, 30);
1603 FND_MESSAGE.set_name('PER', 'HR_DE_COLUMN_NULL');
1604 fnd_message.set_token('COL_NAME','month2_min_contribution');
1605 fnd_message.raise_error;
1606 --
1607 END IF;
1608 --
1609 IF ( p_month2_min_contribution < 0 ) then
1610 --
1611 hr_utility.set_location(l_proc, 30);
1612 FND_MESSAGE.set_name('PER', 'HR_DE_COL_NEGATIVE');
1613 fnd_message.set_token('COL_NAME','month2_min_contribution');
1614 fnd_message.raise_error;
1615
1616 END IF;
1617 --
1618 END IF;
1619 --
1620 hr_utility.set_location('Leaving '||l_proc, 40);
1621 --
1622 --
1623 END chk_month2_min_contr_null;
1624 --
1625 --
1626 -- ---------------------------------------------------------------------------
1627 -- |---------------------------< chk_month2_max_contr_null>--------------------------|
1628 -- ---------------------------------------------------------------------------
1629 --
1630 -- Desciption :
1631 --
1632 -- Validate month2_max_contribution value on insert and update
1633 --
1634 --
1635 -- Pre-conditions :
1636 --
1637 --
1638 -- In Arguments :
1639 -- p_month2_max_contribution
1640 -- p_soc_ins_contr_lvls_id
1641 -- Post Success :
1642 -- Processing continues
1643 --
1644 -- Post Failure :
1645 -- An application error will be raised and processing is
1646 -- termaxated
1647 --
1648 -- Access Status :
1649 -- Internal Table Handler Use only.
1650 --
1651 -- {End of Comments}
1652 --
1653 -- ---------------------------------------------------------------------------
1654 --
1655 PROCEDURE chk_month2_max_contr_null
1656 ( p_month2_max_contribution IN hr_de_soc_ins_contr_lvls_f.month2_max_contribution%type
1657 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1658
1659 --
1660 l_proc VARCHAR2(72) := g_package || 'chk_month2_max_contr_null';
1661 l_dummy VARCHAR2(1);
1662 l_validated boolean := TRUE;
1663 --
1664
1665 BEGIN
1666 --
1667 hr_utility.set_location('Entering:'||l_proc, 10);
1668
1669 --
1670 -- Only proceed with validation if :
1671 -- a) Inserting or
1672 -- b) The value for month2_max_contribution has changed
1673 --
1674 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1675 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1676 (hr_cle_shd.g_old_rec.month2_max_contribution <> p_month2_max_contribution))) THEN
1677 --
1678 hr_utility.set_location(l_proc, 20);
1679
1680 IF ( p_month2_max_contribution IS NULL ) then
1681 --
1682 hr_utility.set_location(l_proc, 30);
1683 FND_MESSAGE.set_name('PER', 'HR_DE_COLUMN_NULL');
1687 END IF;
1684 fnd_message.set_token('COL_NAME','month2_max_contribution');
1685 fnd_message.raise_error;
1686 --
1691 hr_utility.set_location(l_proc, 30);
1688 --
1689 IF ( p_month2_max_contribution < 0 ) then
1690 --
1692 FND_MESSAGE.set_name('PER', 'HR_DE_COL_NEGATIVE');
1693 fnd_message.set_token('COL_NAME','month2_max_contribution');
1694 fnd_message.raise_error;
1695
1696 END IF;
1697 --
1698 END IF;
1699 --
1700 hr_utility.set_location('Leaving '||l_proc, 40);
1701 --
1702 --
1703 END chk_month2_max_contr_null;
1704 --
1705 --
1706 -- ---------------------------------------------------------------------------
1707 -- |---------------------------< chk_employee_contribution>--------------------------|
1708 -- ---------------------------------------------------------------------------
1709 --
1710 -- Desciption :
1711 --
1712 -- Validate employee_contribution value on insert and update
1713 --
1714 --
1715 -- Pre-conditions :
1716 --
1717 --
1718 -- In Arguments :
1719 -- p_employee_contribution
1720 -- p_soc_ins_contr_lvls_id
1721 -- Post Success :
1722 -- Processing continues
1723 --
1724 -- Post Failure :
1725 -- An application error will be raised and processing is
1726 -- terminated
1727 --
1728 -- Access Status :
1729 -- Internal Table Handler Use only.
1730 --
1731 -- {End of Comments}
1732 --
1733 -- ---------------------------------------------------------------------------
1734 --
1735 PROCEDURE chk_employee_contribution
1736 ( p_employee_contribution IN hr_de_soc_ins_contr_lvls_f.employee_contribution%type
1737 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1738
1739 --
1740 l_proc VARCHAR2(72) := g_package || 'chk_employee_contribution';
1741 l_dummy VARCHAR2(1);
1742 l_validated boolean := TRUE;
1743 --
1744 BEGIN
1745 --
1746 hr_utility.set_location('Entering:'||l_proc, 10);
1747
1748 --
1749 -- Only proceed with validation if :
1750 -- a) Inserting or
1751 -- b) The value for employee contribution has changed
1752 --
1753
1754 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1755 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1756 (hr_cle_shd.g_old_rec.employee_contribution <> p_employee_contribution))) THEN
1757 --
1758 hr_utility.set_location(l_proc, 20);
1759
1760 IF ( P_EMPLOYEE_CONTRIBUTION < 0 OR P_EMPLOYEE_CONTRIBUTION > 100) then
1761 --
1762 hr_utility.set_location(l_proc, 30);
1763 hr_utility.set_message(800, 'HR_DE_INVALID_EMPLOYEE_CONTR');
1764 hr_utility.raise_error;
1765 --
1766 END IF;
1767 --
1768 END IF;
1769 --
1770 hr_utility.set_location('Leaving '||l_proc, 40);
1771 --
1772 --
1773 END chk_employee_contribution;
1774 --
1775 --
1776 -- ---------------------------------------------------------------------------
1777 -- |---------------------------< chk_month1>--------------------------|
1778 -- ---------------------------------------------------------------------------
1779 --
1780 -- Desciption :
1781 --
1782 -- Validate month1 value on insert and update
1783 --
1784 --
1785 -- Pre-conditions :
1786 --
1787 --
1788 -- In Arguments :
1789 -- p_month1
1790 -- p_soc_ins_contr_lvls_id
1791 -- Post Success :
1792 -- Processing continues
1793 --
1794 -- Post Failure :
1795 -- An application error will be raised and processing is
1796 -- terminated
1797 --
1798 -- Access Status :
1799 -- Internal Table Handler Use only.
1800 --
1801 -- {End of Comments}
1802 --
1803 -- ---------------------------------------------------------------------------
1804 --
1805 PROCEDURE chk_month1
1806 ( p_month1 IN hr_de_soc_ins_contr_lvls_f.month1%type
1807 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1808
1809 --
1810 CURSOR c1_month(p_month IN hr_de_soc_ins_contr_lvls_f.month1%type) IS
1811 Select 1 From(
1812 select lookup_code code
1813 from hr_lookups
1814 where lookup_type LIKE 'MONTH_CODE')
1815 WHERE p_month IN (code);
1816 --
1817 l_proc VARCHAR2(72) := g_package || 'chk_month1';
1818 l_dummy VARCHAR2(1);
1819
1820 l_validated boolean := TRUE;
1821 --
1822
1823 BEGIN
1824 --
1825 hr_utility.set_location('Entering:'||l_proc, 10);
1826
1827 --
1828 -- Only proceed with validation if :
1829 -- a) Inserting or
1830 -- b) The value for month1 or month2 has changed
1831 --
1832
1833 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1834 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1835 (hr_cle_shd.g_old_rec.month1 <> p_month1))) THEN
1836 --
1837 hr_utility.set_location(l_proc, 20);
1838 --
1839 IF (p_month1 IS NOT NULL) THEN
1840 --
1841 hr_utility.set_location(l_proc, 20);
1842 --
1843 OPEN c1_month(p_month1);
1844 FETCH c1_month INTO l_dummy;
1845 IF c1_month%NOTFOUND THEN
1846 --
1847 hr_utility.set_location(l_proc, 30);
1848 hr_utility.set_message(800, 'HR_DE_INVALID_MONTH_CODE');
1849 hr_utility.raise_error;
1850 --
1851 END IF;
1852 --
1853 END IF;
1854
1855 --
1856 END IF;
1857 --
1858 hr_utility.set_location('Leaving '||l_proc, 40);
1859 --
1860 --
1861 END chk_month1;
1862 --
1863 -- ---------------------------------------------------------------------------
1864 -- |---------------------------< chk_month2>--------------------------|
1865 -- ---------------------------------------------------------------------------
1866 --
1867 -- Desciption :
1868 --
1869 -- Validate month2 value on insert and update
1870 --
1871 --
1872 -- Pre-conditions :
1873 --
1874 --
1875 -- In Arguments :
1876 -- p_month2
1877 -- p_soc_ins_contr_lvls_id
1878 -- Post Success :
1879 -- Processing continues
1880 --
1881 -- Post Failure :
1882 -- An application error will be raised and processing is
1883 -- terminated
1884 --
1885 -- Access Status :
1886 -- Internal Table Handler Use only.
1887 --
1888 -- {End of Comments}
1889 --
1890 -- ---------------------------------------------------------------------------
1891 --
1892 PROCEDURE chk_month2
1893 ( p_month2 IN hr_de_soc_ins_contr_lvls_f.month2%type
1894 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1895
1896 --
1897 CURSOR c1_month(p_month IN hr_de_soc_ins_contr_lvls_f.month2%type) IS
1898 Select 1 From(
1899 select lookup_code code
1900 from hr_lookups
1901 where lookup_type LIKE 'MONTH_CODE')
1902 WHERE p_month IN (code);
1903 --
1904 l_proc VARCHAR2(72) := g_package || 'chk_month2';
1905 l_dummy VARCHAR2(1);
1906
1907 l_validated boolean := TRUE;
1908 --
1909
1910 BEGIN
1911 --
1912 hr_utility.set_location('Entering:'||l_proc, 10);
1913
1914 --
1915 -- Only proceed with validation if :
1916 -- a) Inserting or
1917 -- b) The value for month2 or month2 has changed
1918 --
1919
1920 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1921 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1922 (hr_cle_shd.g_old_rec.month2 <> p_month2))) THEN
1923 --
1924 hr_utility.set_location(l_proc, 20);
1925 IF (p_month2 IS NOT NULL) THEN
1926 --
1927 hr_utility.set_location(l_proc, 20);
1928 OPEN c1_month(p_month2);
1929 FETCH c1_month INTO l_dummy;
1930 IF c1_month%NOTFOUND THEN
1931 --
1932 hr_utility.set_location(l_proc, 30);
1933 hr_utility.set_message(800, 'HR_DE_INVALID_MONTH_CODE');
1934 hr_utility.raise_error;
1935 --
1936 END IF;
1937 --
1938 END IF;
1939 --
1940 END IF;
1941 --
1942 hr_utility.set_location('Leaving '||l_proc, 40);
1943 --
1944 --
1945 END chk_month2;
1946 --
1947 --
1948 -- ---------------------------------------------------------------------------
1949 -- |---------------------------< chk_flat_tax_month_val>--------------------------|
1950 -- ---------------------------------------------------------------------------
1951 --
1952 -- Desciption :
1953 --
1954 -- Validate flat_tax_limit_per_month value on insert and update
1955 --
1956 --
1957 -- Pre-conditions :
1958 --
1959 --
1960 -- In Arguments :
1961 -- p_flat_tax_limit_per_month
1962 -- p_soc_ins_contr_lvls_id
1963 -- Post Success :
1964 -- Processing continues
1965 --
1966 -- Post Failure :
1967 -- An application error will be raised and processing is
1968 -- termaxated
1969 --
1970 -- Access Status :
1971 -- Internal Table Handler Use only.
1972 --
1973 -- {End of Comments}
1974 --
1975 -- ---------------------------------------------------------------------------
1976 --
1977 PROCEDURE chk_flat_tax_month_val
1978 ( p_flat_tax_limit_per_month IN hr_de_soc_ins_contr_lvls_f.flat_tax_limit_per_month%type
1979 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
1980
1981 --
1982 l_proc VARCHAR2(72) := g_package || 'chk_flat_tax_month_val';
1983 l_dummy VARCHAR2(1);
1984 l_validated boolean := TRUE;
1985 --
1986
1987 BEGIN
1988 --
1989 hr_utility.set_location('Entering:'||l_proc, 10);
1990
1991 --
1992 -- Only proceed with validation if :
1993 -- a) Inserting or
1994 -- b) The value for flat_tax_limit_per_month has changed
1995 --
1996 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
1997 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
1998 (hr_cle_shd.g_old_rec.flat_tax_limit_per_month <> p_flat_tax_limit_per_month))) THEN
1999 --
2000 hr_utility.set_location(l_proc, 20);
2001
2002 --
2003 IF ( p_flat_tax_limit_per_month < 0 ) then
2004 --
2005 hr_utility.set_location(l_proc, 30);
2006 FND_MESSAGE.set_name('PER', 'HR_DE_COL_NEGATIVE');
2007 fnd_message.set_token('COL_NAME','flat_tax_limit_per_month');
2008 fnd_message.raise_error;
2009
2010 END IF;
2011 --
2012 END IF;
2013 --
2014 hr_utility.set_location('Leaving '||l_proc, 40);
2015 --
2016 --
2017 END chk_flat_tax_month_val;
2018 --
2019 --
2020 -- ---------------------------------------------------------------------------
2021 -- |---------------------------< chk_flat_tax_year_val>--------------------------|
2022 -- ---------------------------------------------------------------------------
2023 --
2024 -- Desciption :
2025 --
2026 -- Validate flat_tax_limit_per_year value on insert and update
2027 --
2028 --
2029 -- Pre-conditions :
2030 --
2031 --
2032 -- In Arguments :
2033 -- p_flat_tax_limit_per_year
2034 -- p_soc_ins_contr_lvls_id
2035 -- Post Success :
2036 -- Processing continues
2037 --
2038 -- Post Failure :
2039 -- An application error will be raised and processing is
2040 -- termaxated
2041 --
2042 -- Access Status :
2043 -- Internal Table Handler Use only.
2044 --
2045 -- {End of Comments}
2046 --
2047 -- ---------------------------------------------------------------------------
2048 --
2049 PROCEDURE chk_flat_tax_year_val
2050 ( p_flat_tax_limit_per_year IN hr_de_soc_ins_contr_lvls_f.flat_tax_limit_per_year%type
2051 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
2052
2053 --
2054 l_proc VARCHAR2(72) := g_package || 'chk_flat_tax_year_val';
2055 l_dummy VARCHAR2(1);
2056 l_validated boolean := TRUE;
2057 --
2058
2059 BEGIN
2060 --
2061 hr_utility.set_location('Entering:'||l_proc, 10);
2062
2063 --
2064 -- Only proceed with validation if :
2065 -- a) Inserting or
2066 -- b) The value for flat_tax_limit_per_year has changed
2067 --
2068 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
2069 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
2070 (hr_cle_shd.g_old_rec.flat_tax_limit_per_year <> p_flat_tax_limit_per_year))) THEN
2071 --
2072 hr_utility.set_location(l_proc, 20);
2073
2074 --
2075 IF ( p_flat_tax_limit_per_year < 0 ) then
2076 --
2077 hr_utility.set_location(l_proc, 30);
2078 FND_MESSAGE.set_name('PER', 'HR_DE_COL_NEGATIVE');
2079 fnd_message.set_token('COL_NAME','flat_tax_limit_per_year');
2080 fnd_message.raise_error;
2081
2082 END IF;
2083 --
2084 END IF;
2085 --
2086 hr_utility.set_location('Leaving '||l_proc, 40);
2087 --
2088 --
2089 END chk_flat_tax_year_val;
2090 --
2091 --
2092 --
2093 -- ---------------------------------------------------------------------------
2094 -- |---------------------------< chk_min_max_inc_contr>--------------------------|
2095 -- ---------------------------------------------------------------------------
2096 --
2097 -- Desciption :
2098 --
2102 -- Pre-conditions :
2099 -- Validate min and max increased validation value on insert and update
2100 --
2101 --
2103 --
2104 --
2105 -- In Arguments :
2106 -- p_min_increased_contribution
2107 -- p_max_increased_contribution
2108 -- p_soc_ins_contr_lvls_id
2109 -- Post Success :
2110 -- Processing continues
2111 --
2112 -- Post Failure :
2113 -- An application error will be raised and processing is
2114 -- termaxated
2115 --
2116 -- Access Status :
2117 -- Internal Table Handler Use only.
2118 --
2119 -- {End of Comments}
2120 --
2121 -- ---------------------------------------------------------------------------
2122 --
2123 PROCEDURE chk_min_max_inc_contr
2124 ( p_min_increased_contribution IN hr_de_soc_ins_contr_lvls_f.min_increased_contribution%type
2125 ,p_max_increased_contribution IN hr_de_soc_ins_contr_lvls_f.max_increased_contribution%type
2126 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
2127
2128 --
2129 l_proc VARCHAR2(72) := g_package || 'chk_min_max_inc_contr';
2130 l_dummy VARCHAR2(1);
2131 l_validated boolean := TRUE;
2132 --
2133
2134 BEGIN
2135 --
2136 hr_utility.set_location('Entering:'||l_proc, 10);
2137
2138 --
2139 -- Only proceed with validation if :
2140 -- a) Inserting or
2141 -- b) The value for min_increased_contribution or min_increased_contribution has changed
2142 --
2143 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
2144 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
2145 (hr_cle_shd.g_old_rec.min_increased_contribution <> p_min_increased_contribution)) OR
2146 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
2147 (hr_cle_shd.g_old_rec.max_increased_contribution <> p_max_increased_contribution))) THEN
2148
2149 --
2150 hr_utility.set_location(l_proc, 20);
2151
2152 --
2153 IF ( p_min_increased_contribution > p_max_increased_contribution ) then
2154 --
2155 hr_utility.set_location(l_proc, 30);
2156 hr_utility.set_message(800, 'HR_DE_MAX_MIN_INC_CONTR');
2157 hr_utility.raise_error;
2158
2159 END IF;
2160 --
2161 END IF;
2162 --
2163 hr_utility.set_location('Leaving '||l_proc, 40);
2164 --
2165 --
2166 END chk_min_max_inc_contr;
2167 --
2168 --
2169 -- ---------------------------------------------------------------------------
2170 -- |---------------------------< chk_mon1_min_max_contr>--------------------------|
2171 -- ---------------------------------------------------------------------------
2172 --
2173 -- Desciption :
2174 --
2175 -- Validate min and max increased contribution value on insert and update
2176 --
2177 --
2178 -- Pre-conditions :
2179 --
2180 --
2181 -- In Arguments :
2182 -- p_month1_min_contribution
2183 -- p_month1_max_contribution
2184 -- p_min_increased_contribution
2185 -- p_max_increased_contribution
2186 -- p_soc_ins_contr_lvls_id
2187 -- Post Success :
2188 -- Processing continues
2189 --
2190 -- Post Failure :
2191 -- An application error will be raised and processing is
2192 -- termaxated
2193 --
2194 -- Access Status :
2195 -- Internal Table Handler Use only.
2196 --
2200 --
2197 -- {End of Comments}
2198 --
2199 -- ---------------------------------------------------------------------------
2201 PROCEDURE chk_mon1_min_max_contr
2202 ( p_month1_min_contribution IN hr_de_soc_ins_contr_lvls_f.month1_min_contribution%type
2203 ,p_month1_max_contribution IN hr_de_soc_ins_contr_lvls_f.month1_max_contribution%type
2204 ,p_min_increased_contribution IN hr_de_soc_ins_contr_lvls_f.min_increased_contribution%type
2205 ,p_max_increased_contribution IN hr_de_soc_ins_contr_lvls_f.max_increased_contribution%type
2206 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
2207
2208 --
2209 l_proc VARCHAR2(72) := g_package || 'chk_mon1_min_max_contr';
2210 l_dummy VARCHAR2(1);
2211 l_validated boolean := TRUE;
2212 --
2213
2214 BEGIN
2215 --
2216 hr_utility.set_location('Entering:'||l_proc, 10);
2217
2218 --
2219 -- Only proceed with validation if :
2220 -- a) Inserting or
2221 -- b) The value for month1_min_contribution or month1_min_contribution has changed
2222 --
2223 IF ((p_soc_ins_contr_lvls_id IS NULL) OR
2224 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
2225 (hr_cle_shd.g_old_rec.month1_min_contribution <> p_month1_min_contribution)) OR
2226 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
2227 (hr_cle_shd.g_old_rec.month1_max_contribution <> p_month1_max_contribution)) OR
2228 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
2229 (hr_cle_shd.g_old_rec.min_increased_contribution <> p_min_increased_contribution)) OR
2230 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
2231 (hr_cle_shd.g_old_rec.max_increased_contribution <> p_max_increased_contribution))) THEN
2232
2233 --
2234 hr_utility.set_location(l_proc, 20);
2235
2236 --
2237 IF ( p_month1_min_contribution > p_month1_max_contribution ) then
2238 --
2239 hr_utility.set_location(l_proc, 30);
2240 hr_utility.set_message(800, 'HR_DE_MAX_MIN_INC_CONTR');
2241 hr_utility.raise_error;
2242
2243 END IF;
2244 --
2245 --Commented out this code to fix bug 2359120
2246 /*IF ((p_month1_min_contribution < p_min_increased_contribution) OR
2247 (p_month1_max_contribution > p_max_increased_contribution)) THEN
2248 --
2249 hr_utility.set_location(l_proc, 30);
2250 hr_utility.set_message(800, 'HR_DE_MON_MAX_MIN_CONTR');
2251 hr_utility.raise_error;
2252
2253 END IF;*/
2254
2255 --
2256 END IF;
2257 --
2258 hr_utility.set_location('Leaving '||l_proc, 40);
2259 --
2260 --
2261 END chk_mon1_min_max_contr;
2262 --
2263 -- ---------------------------------------------------------------------------
2264 -- |---------------------------< chk_mon2_min_max_contr>--------------------------|
2265 -- ---------------------------------------------------------------------------
2266 --
2267 -- Desciption :
2268 --
2269 -- Validate min and max increased contribution value on insert and update
2270 --
2271 --
2272 -- Pre-conditions :
2273 --
2274 --
2275 -- In Arguments :
2276 -- p_month2_min_contribution
2277 -- p_month2_max_contribution
2278 -- p_min_increased_contribution
2279 -- p_max_increased_contribution
2280 -- p_soc_ins_contr_lvls_id
2281 -- Post Success :
2282 -- Processing continues
2283 --
2284 -- Post Failure :
2288 -- Access Status :
2285 -- An application error will be raised and processing is
2286 -- termaxated
2287 --
2289 -- Internal Table Handler Use only.
2290 --
2291 -- {End of Comments}
2292 --
2293 -- ---------------------------------------------------------------------------
2294 --
2295 PROCEDURE chk_mon2_min_max_contr
2296 ( p_month2_min_contribution IN hr_de_soc_ins_contr_lvls_f.month2_min_contribution%type
2297 ,p_month2_max_contribution IN hr_de_soc_ins_contr_lvls_f.month2_max_contribution%type
2298 ,p_min_increased_contribution IN hr_de_soc_ins_contr_lvls_f.min_increased_contribution%type
2299 ,p_max_increased_contribution IN hr_de_soc_ins_contr_lvls_f.max_increased_contribution%type
2300 ,p_soc_ins_contr_lvls_id IN hr_de_soc_ins_contr_lvls_f.soc_ins_contr_lvls_id%type) IS
2301
2302 --
2303 l_proc VARCHAR2(72) := g_package || 'chk_mon2_min_max_contr';
2304 l_dummy VARCHAR2(1);
2305 l_validated boolean := TRUE;
2306 --
2307
2308 BEGIN
2309 --
2310 hr_utility.set_location('Entering:'||l_proc, 10);
2311
2312 --
2313 -- Only proceed with validation if :
2314 -- a) Inserting or
2315 -- b) The value for month2_min_contribution or month2_min_contribution has changed
2316 --
2320 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
2317 IF ( (p_soc_ins_contr_lvls_id IS NULL) OR
2318 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
2319 (hr_cle_shd.g_old_rec.month2_min_contribution <> p_month2_min_contribution)) OR
2321 (hr_cle_shd.g_old_rec.month2_max_contribution <> p_month2_max_contribution)) OR
2322 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
2323 (hr_cle_shd.g_old_rec.min_increased_contribution <> p_min_increased_contribution)) OR
2324 ((p_soc_ins_contr_lvls_id IS NOT NULL) AND
2325 (hr_cle_shd.g_old_rec.max_increased_contribution <> p_max_increased_contribution))) THEN
2326
2327
2328 --
2329 hr_utility.set_location(l_proc, 20);
2330
2331 --
2332 IF ( p_month2_min_contribution > p_month2_max_contribution ) then
2333 --
2334 hr_utility.set_location(l_proc, 30);
2335 hr_utility.set_message(800, 'HR_DE_MAX_MIN_INC_CONTR');
2336 hr_utility.raise_error;
2337
2338 END IF;
2339 --
2340 --Commented out this code to fix bug 2359120
2341 /* IF ((p_month2_min_contribution < p_min_increased_contribution) OR
2342 (p_month2_max_contribution > p_max_increased_contribution)) THEN
2343 --
2344 hr_utility.set_location(l_proc, 30);
2345 hr_utility.set_message(800, 'HR_DE_MON_MAX_MIN_CONTR');
2346 hr_utility.raise_error;
2347
2348 END IF;*/
2349
2350 --
2351 END IF;
2352 --
2353 hr_utility.set_location('Leaving '||l_proc, 40);
2354 --
2355 --
2356 END chk_mon2_min_max_contr;
2357 --
2358 -- ---------------------------------------------------------------------------
2359 -- |----------------------------< chk_object_version_number >-----------------|
2360 -- ---------------------------------------------------------------------------
2361 --
2362 -- Desciption :
2363 --
2364 -- Checks that the OVN passed is not null on update and delete.
2365 --
2366 -- Pre-conditions :
2367 -- s None.
2368 --
2369 -- In Arguments :
2370 -- p_object_version_number
2371 --
2372 -- Post Success :
2373 -- Processing continues
2374 --
2375 -- Post Failure :
2376 -- An application error will be raised and processing is
2377 -- terminated
2378 --
2379 -- Access Status :
2380 -- Internal Table Handler Use only.
2381 --
2382 -- {End of Comments}
2383 --
2384 -- ---------------------------------------------------------------------------
2385 procedure chk_object_version_number
2386 (
2387 p_object_version_number in hr_de_soc_ins_contr_lvls_f.object_version_number%TYPE
2388 ) is
2389 --
2390 l_proc varchar2(72) := g_package||'chk_object_version_number';
2391 --
2392 begin
2393 hr_utility.set_location('Entering:'||l_proc, 1);
2394 --
2395 -- Check mandatory parameters have been set
2396 --
2397 hr_api.mandatory_arg_error
2398 (p_api_name => l_proc
2399 ,p_argument => 'object_version_number'
2400 ,p_argument_value => p_object_version_number
2401 );
2402 --
2403 hr_utility.set_location(' Leaving:'||l_proc, 3);
2404 --
2405 end chk_object_version_number;
2406
2407
2408 --
2409 -- ----------------------------------------------------------------------------
2410 -- |--------------------------< dt_update_validate >--------------------------|
2411 -- ----------------------------------------------------------------------------
2412 -- {Start Of Comments}
2413 --
2414 -- Description:
2415 -- This procedure is used for referential integrity of datetracked
2416 -- parent entities when a datetrack update operation is taking place
2417 -- and where there is no cascading of update defined for this entity.
2418 --
2419 -- Prerequisites:
2420 -- This procedure is called from the update_validate.
2421 --
2422 -- In Parameters:
2423 --
2424 -- Post Success:
2425 -- Processing continues.
2426 --
2427 -- Post Failure:
2428 --
2429 -- Developer Implementation Notes:
2430 -- This procedure should not need maintenance unless the HR Schema model
2431 -- changes.
2432 --
2433 -- Access Status:
2434 -- Internal Row Handler Use Only.
2435 --
2436 -- {End Of Comments}
2437 -- ----------------------------------------------------------------------------
2438 Procedure dt_update_validate
2439 (p_datetrack_mode in varchar2
2440 ,p_validation_start_date in date
2441 ,p_validation_end_date in date
2442 ) Is
2443 --
2444 l_proc varchar2(72) := g_package||'dt_update_validate';
2445 l_integrity_error Exception;
2446 l_table_name all_tables.table_name%TYPE;
2447 --
2448 Begin
2449 --
2450 -- Ensure that the p_datetrack_mode argument is not null
2451 --
2452 hr_api.mandatory_arg_error
2453 (p_api_name => l_proc
2454 ,p_argument => 'datetrack_mode'
2455 ,p_argument_value => p_datetrack_mode
2456 );
2457 --
2458 -- Mode will be valid, as this is checked at the start of the upd.
2459 --
2460 -- Ensure the arguments are not null
2461 --
2462 hr_api.mandatory_arg_error
2463 (p_api_name => l_proc
2464 ,p_argument => 'validation_start_date'
2465 ,p_argument_value => p_validation_start_date
2466 );
2467 --
2468 hr_api.mandatory_arg_error
2469 (p_api_name => l_proc
2470 ,p_argument => 'validation_end_date'
2474 --
2471 ,p_argument_value => p_validation_end_date
2472 );
2473 --
2475 --
2476 Exception
2477 When l_integrity_error Then
2478 --
2479 -- A referential integrity check was violated therefore
2480 -- we must error
2481 --
2482 fnd_message.set_name('PAY', 'HR_7216_DT_UPD_INTEGRITY_ERR');
2483 fnd_message.set_token('TABLE_NAME', l_table_name);
2484 fnd_message.raise_error;
2485 When Others Then
2486 --
2487 -- An unhandled or unexpected error has occurred which
2488 -- we must report
2489 --
2490 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2491 fnd_message.set_token('PROCEDURE', l_proc);
2492 fnd_message.set_token('STEP','15');
2493 fnd_message.raise_error;
2494 End dt_update_validate;
2495 --
2496 -- ----------------------------------------------------------------------------
2497 -- |--------------------------< dt_delete_validate >--------------------------|
2498 -- ----------------------------------------------------------------------------
2499 -- {Start Of Comments}
2500 --
2501 -- Description:
2502 -- This procedure is used for referential integrity of datetracked
2503 -- child entities when either a datetrack DELETE or ZAP is in operation
2504 -- and where there is no cascading of delete defined for this entity.
2505 -- For the datetrack mode of DELETE or ZAP we must ensure that no
2506 -- datetracked child rows exist between the validation start and end
2507 -- dates.
2508 --
2509 -- Prerequisites:
2510 -- This procedure is called from the delete_validate.
2511 --
2512 -- In Parameters:
2513 --
2514 -- Post Success:
2515 -- Processing continues.
2516 --
2517 -- Post Failure:
2518 -- If a row exists by determining the returning Boolean value from the
2519 -- generic dt_api.rows_exist function then we must supply an error via
2520 -- the use of the local exception handler l_rows_exist.
2521 --
2522 -- Developer Implementation Notes:
2523 -- This procedure should not need maintenance unless the HR Schema model
2524 -- changes.
2525 --
2526 -- Access Status:
2527 -- Internal Row Handler Use Only.
2528 --
2529 -- {End Of Comments}
2530 -- ----------------------------------------------------------------------------
2531 Procedure dt_delete_validate
2532 (p_soc_ins_contr_lvls_id in number
2533 ,p_datetrack_mode in varchar2
2534 ,p_validation_start_date in date
2535 ,p_validation_end_date in date
2536 ) Is
2537 --
2538 l_proc varchar2(72) := g_package||'dt_delete_validate';
2539 l_rows_exist Exception;
2540 l_table_name all_tables.table_name%TYPE;
2541 --
2542 Begin
2543 --
2544 -- Ensure that the p_datetrack_mode argument is not null
2545 --
2546 hr_api.mandatory_arg_error
2547 (p_api_name => l_proc
2548 ,p_argument => 'datetrack_mode'
2549 ,p_argument_value => p_datetrack_mode
2550 );
2551 --
2552 -- Only perform the validation if the datetrack mode is either
2553 -- DELETE or ZAP
2554 --
2555 If (p_datetrack_mode = hr_api.g_delete or
2556 p_datetrack_mode = hr_api.g_zap) then
2557 --
2558 --
2559 -- Ensure the arguments are not null
2560 --
2561 hr_api.mandatory_arg_error
2562 (p_api_name => l_proc
2563 ,p_argument => 'validation_start_date'
2564 ,p_argument_value => p_validation_start_date
2565 );
2566 --
2567 hr_api.mandatory_arg_error
2568 (p_api_name => l_proc
2569 ,p_argument => 'validation_end_date'
2570 ,p_argument_value => p_validation_end_date
2571 );
2572 --
2573 hr_api.mandatory_arg_error
2574 (p_api_name => l_proc
2575 ,p_argument => 'soc_ins_contr_lvls_id'
2576 ,p_argument_value => p_soc_ins_contr_lvls_id
2577 );
2578 --
2579 --
2580 --
2581 End If;
2582 --
2583 Exception
2584 When l_rows_exist Then
2585 --
2586 -- A referential integrity check was violated therefore
2587 -- we must error
2588 --
2589 fnd_message.set_name('PAY', 'HR_7215_DT_CHILD_EXISTS');
2590 fnd_message.set_token('TABLE_NAME', l_table_name);
2591 fnd_message.raise_error;
2592 When Others Then
2593 --
2594 -- An unhandled or unexpected error has occurred which
2595 -- we must report
2596 --
2597 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2598 fnd_message.set_token('PROCEDURE', l_proc);
2599 fnd_message.set_token('STEP','15');
2600 fnd_message.raise_error;
2601 --
2602 End dt_delete_validate;
2603 --
2604 -- ----------------------------------------------------------------------------
2605 -- |---------------------------< insert_validate >----------------------------|
2606 -- ----------------------------------------------------------------------------
2607 Procedure insert_validate
2608 (p_rec in hr_cle_shd.g_rec_type
2609 ,p_effective_date in date
2610 ,p_datetrack_mode in varchar2
2611 ,p_validation_start_date in date
2612 ,p_validation_end_date in date
2613 ) is
2614 --
2615 l_proc varchar2(72) := g_package||'insert_validate';
2616 --
2617 Begin
2618 hr_utility.set_location('Entering:'||l_proc, 5);
2619 --
2620 -- Call all supporting business operations
2621 --
2622 hr_cle_bus.chk_organization_id( p_effective_date
2623 , p_validation_start_date
2624 , p_validation_end_date
2625 , p_rec.organization_id
2626 , p_rec.soc_ins_contr_lvls_id );
2627
2628 hr_cle_bus.chk_normal_amount( p_rec.normal_amount
2629 , p_rec.soc_ins_contr_lvls_id );
2630
2631 hr_cle_bus.chk_increased_amount ( p_rec.increased_amount
2632 , p_rec.soc_ins_contr_lvls_id );
2633
2634 hr_cle_bus.chk_reduced_amount ( p_rec.reduced_amount
2635 , p_rec.soc_ins_contr_lvls_id );
2636
2637 hr_cle_bus.chk_normal_percentage ( p_rec.normal_percentage
2638 , p_rec.soc_ins_contr_lvls_id );
2639
2640 hr_cle_bus.chk_increased_percentage ( p_rec.increased_percentage
2641 , p_rec.soc_ins_contr_lvls_id );
2642
2643 hr_cle_bus.chk_reduced_percentage ( p_rec.reduced_percentage
2644 , p_rec.soc_ins_contr_lvls_id );
2645
2646 -- hr_cle_bus.chk_object_version_number ( p_rec.object_version_number);
2647 --
2648 IF(p_rec.contribution_level_type = 'DE_MAND_HEALTH_PROV') THEN
2649 --
2650 hr_cle_bus.chk_normal_percent_null
2651 ( p_rec.normal_percentage
2652 ,p_rec.soc_ins_contr_lvls_id );
2653 --
2657 --
2654 hr_cle_bus.chk_increased_percent_null
2655 ( p_rec.increased_percentage
2656 ,p_rec.soc_ins_contr_lvls_id );
2658 hr_cle_bus.chk_reduced_percent_null
2659 ( p_rec.reduced_percentage
2660 ,p_rec.soc_ins_contr_lvls_id );
2661 --
2662 END IF;
2663
2664
2665 IF(p_rec.contribution_level_type = 'DE_ADD_SEC_PEN_PROV') THEN
2666 --
2667 --
2668 hr_cle_bus.chk_normal_percent_null
2669 ( p_rec.normal_percentage
2670 ,p_rec.soc_ins_contr_lvls_id );
2671 --
2672 hr_cle_bus.chk_increased_percent_null
2673 ( p_rec.increased_percentage
2674 ,p_rec.soc_ins_contr_lvls_id );
2675 --
2676
2677 hr_cle_bus.chk_max_inc_contr_null
2678 ( p_rec.max_increased_contribution
2679 ,p_rec.soc_ins_contr_lvls_id );
2680
2681 --
2682 hr_cle_bus.chk_min_inc_contr_null
2683 ( p_rec.min_increased_contribution
2684 ,p_rec.soc_ins_contr_lvls_id );
2685 --
2686
2687 IF p_rec.month1 IS NOT NULL THEN
2688 hr_cle_bus.chk_month1_min_contr_null
2689 ( p_rec.month1_min_contribution
2690 ,p_rec.soc_ins_contr_lvls_id );
2691
2692 --
2693 hr_cle_bus.chk_month1_max_contr_null
2694 ( p_rec.month1_max_contribution
2695 ,p_rec.soc_ins_contr_lvls_id );
2696 --
2697 END IF;
2698
2699 IF p_rec.month2 IS NOT NULL THEN
2700 hr_cle_bus.chk_month2_min_contr_null
2701 ( p_rec.month2_min_contribution
2702 ,p_rec.soc_ins_contr_lvls_id );
2703
2704 --
2705 hr_cle_bus.chk_month2_max_contr_null
2706 ( p_rec.month2_max_contribution
2707 ,p_rec.soc_ins_contr_lvls_id );
2708 --
2709 END IF;
2710 --
2711 hr_cle_bus.chk_employee_contribution
2712 ( p_rec.employee_contribution
2713 ,p_rec.soc_ins_contr_lvls_id );
2714
2715 --
2716 hr_cle_bus.chk_month1
2717 ( p_rec.month1
2718 ,p_rec.soc_ins_contr_lvls_id);
2719
2720 --
2721 hr_cle_bus.chk_month2
2722 ( p_rec.month2
2723 ,p_rec.soc_ins_contr_lvls_id );
2724
2725 --
2726 hr_cle_bus.chk_flat_tax_month_val
2727 ( p_rec.flat_tax_limit_per_month
2728 ,p_rec.soc_ins_contr_lvls_id );
2729
2730 --
2731 hr_cle_bus.chk_flat_tax_year_val
2732 ( p_rec.flat_tax_limit_per_year
2733 ,p_rec.soc_ins_contr_lvls_id );
2734 --
2735 hr_cle_bus.chk_min_max_inc_contr
2736 ( p_rec.min_increased_contribution
2737 ,p_rec.max_increased_contribution
2738 ,p_rec.soc_ins_contr_lvls_id );
2739
2740 --
2741 hr_cle_bus.chk_mon1_min_max_contr
2742 ( p_rec.month1_min_contribution
2743 ,p_rec.month1_max_contribution
2744 ,p_rec.min_increased_contribution
2745 ,p_rec.max_increased_contribution
2746 ,p_rec.soc_ins_contr_lvls_id );
2747
2748 --
2749 hr_cle_bus.chk_mon2_min_max_contr
2750 ( p_rec.month2_min_contribution
2751 ,p_rec.month2_max_contribution
2752 ,p_rec.min_increased_contribution
2753 ,p_rec.max_increased_contribution
2754 ,p_rec.soc_ins_contr_lvls_id );
2755
2756 --
2757
2758
2759 END IF;
2760
2761 --
2762 hr_cle_bus.chk_df(p_rec);
2763 --
2764 --
2765
2766
2767 hr_utility.set_location(' Leaving:'||l_proc, 10);
2768
2769
2770 End insert_validate;
2771 --
2772 -- ----------------------------------------------------------------------------
2773 -- |---------------------------< update_validate >----------------------------|
2774 -- ----------------------------------------------------------------------------
2775 Procedure update_validate
2776 (p_rec in hr_cle_shd.g_rec_type
2777 ,p_effective_date in date
2778 ,p_datetrack_mode in varchar2
2779 ,p_validation_start_date in date
2780 ,p_validation_end_date in date
2781 ) is
2782 --
2783 l_proc varchar2(72) := g_package||'update_validate';
2784 --
2785 Begin
2786 hr_utility.set_location('Entering:'||l_proc, 5);
2787
2788 --
2789 -- Call all supporting business operations
2790 --
2791 --
2792
2793 hr_cle_bus.chk_normal_amount ( p_rec.normal_amount
2794 , p_rec.soc_ins_contr_lvls_id );
2795
2796 hr_cle_bus.chk_increased_amount ( p_rec.increased_amount
2797 , p_rec.soc_ins_contr_lvls_id );
2798
2799 hr_cle_bus.chk_reduced_amount ( p_rec.reduced_amount
2800 , p_rec.soc_ins_contr_lvls_id );
2801
2802 hr_cle_bus.chk_normal_percentage ( p_rec.normal_percentage
2803 , p_rec.soc_ins_contr_lvls_id );
2804
2805 hr_cle_bus.chk_increased_percentage ( p_rec.increased_percentage
2806 , p_rec.soc_ins_contr_lvls_id );
2807
2808 hr_cle_bus.chk_reduced_percentage ( p_rec.reduced_percentage
2809 , p_rec.soc_ins_contr_lvls_id );
2810
2811 hr_cle_bus.chk_object_version_number ( p_rec.object_version_number);
2812
2813 --
2814 --
2815 IF(p_rec.contribution_level_type = 'DE_MAND_HEALTH_PROV') THEN
2816 --
2817 hr_cle_bus.chk_normal_percent_null
2818 ( p_rec.normal_percentage
2819 ,p_rec.soc_ins_contr_lvls_id );
2820 --
2821 hr_cle_bus.chk_increased_percent_null
2822 ( p_rec.increased_percentage
2823 ,p_rec.soc_ins_contr_lvls_id );
2824 --
2825 hr_cle_bus.chk_reduced_percent_null
2826 ( p_rec.reduced_percentage
2827 ,p_rec.soc_ins_contr_lvls_id );
2828 --
2829 END IF;
2830
2831
2832 IF(p_rec.contribution_level_type = 'DE_ADD_SEC_PEN_PROV') THEN
2833 --
2834 --
2835 hr_cle_bus.chk_normal_percent_null
2836 ( p_rec.normal_percentage
2837 ,p_rec.soc_ins_contr_lvls_id );
2838 --
2839 hr_cle_bus.chk_increased_percent_null
2840 ( p_rec.increased_percentage
2841 ,p_rec.soc_ins_contr_lvls_id );
2842 --
2843
2844 hr_cle_bus.chk_max_inc_contr_null
2845 ( p_rec.max_increased_contribution
2846 ,p_rec.soc_ins_contr_lvls_id );
2847
2848 --
2849 hr_cle_bus.chk_min_inc_contr_null
2850 ( p_rec.min_increased_contribution
2851 ,p_rec.soc_ins_contr_lvls_id );
2852 --
2853 IF p_rec.month1 IS NOT NULL THEN
2854 hr_cle_bus.chk_month1_min_contr_null
2855 ( p_rec.month1_min_contribution
2856 ,p_rec.soc_ins_contr_lvls_id );
2857
2858 --
2859 hr_cle_bus.chk_month1_max_contr_null
2860 ( p_rec.month1_max_contribution
2861 ,p_rec.soc_ins_contr_lvls_id );
2862 --
2863 END IF;
2864 IF p_rec.month2 IS NOT NULL THEN
2865 hr_cle_bus.chk_month2_min_contr_null
2866 ( p_rec.month2_min_contribution
2867 ,p_rec.soc_ins_contr_lvls_id );
2868
2869 --
2870 hr_cle_bus.chk_month2_max_contr_null
2871 ( p_rec.month2_max_contribution
2872 ,p_rec.soc_ins_contr_lvls_id );
2873 --
2874 END IF;
2875 --
2876 hr_cle_bus.chk_employee_contribution
2877 ( p_rec.employee_contribution
2878 ,p_rec.soc_ins_contr_lvls_id );
2879
2880 --
2881 hr_cle_bus.chk_month1
2882 ( p_rec.month1
2883 ,p_rec.soc_ins_contr_lvls_id);
2884
2885 --
2886 hr_cle_bus.chk_month2
2887 ( p_rec.month2
2888 ,p_rec.soc_ins_contr_lvls_id );
2889
2890 --
2891 hr_cle_bus.chk_flat_tax_month_val
2892 ( p_rec.flat_tax_limit_per_month
2893 ,p_rec.soc_ins_contr_lvls_id );
2894
2895 --
2896 hr_cle_bus.chk_flat_tax_year_val
2897 ( p_rec.flat_tax_limit_per_year
2898 ,p_rec.soc_ins_contr_lvls_id );
2899 --
2900 hr_cle_bus.chk_min_max_inc_contr
2901 ( p_rec.min_increased_contribution
2902 ,p_rec.max_increased_contribution
2903 ,p_rec.soc_ins_contr_lvls_id );
2904
2905 --
2906 hr_cle_bus.chk_mon1_min_max_contr
2907 ( p_rec.month1_min_contribution
2908 ,p_rec.month1_max_contribution
2909 ,p_rec.min_increased_contribution
2910 ,p_rec.max_increased_contribution
2911 ,p_rec.soc_ins_contr_lvls_id );
2912
2913 --
2914 hr_cle_bus.chk_mon2_min_max_contr
2915 ( p_rec.month2_min_contribution
2916 ,p_rec.month2_max_contribution
2917 ,p_rec.min_increased_contribution
2918 ,p_rec.max_increased_contribution
2919 ,p_rec.soc_ins_contr_lvls_id );
2920
2921 --
2922
2923
2924 END IF;
2925
2926 --
2927 -- Call the datetrack update integrity operation
2928 --
2929 dt_update_validate
2930 (p_datetrack_mode => p_datetrack_mode
2931 ,p_validation_start_date => p_validation_start_date
2932 ,p_validation_end_date => p_validation_end_date
2933 );
2934 --
2935 chk_non_updateable_args
2936 (p_effective_date => p_effective_date
2937 ,p_rec => p_rec
2938 );
2939 --
2940 --
2941 hr_cle_bus.chk_df(p_rec);
2942 --
2943 hr_utility.set_location(' Leaving:'||l_proc, 10);
2944 End update_validate;
2945 --
2946 -- ----------------------------------------------------------------------------
2947 -- |---------------------------< delete_validate >----------------------------|
2948 -- ----------------------------------------------------------------------------
2949 Procedure delete_validate
2950 (p_rec in hr_cle_shd.g_rec_type
2951 ,p_effective_date in date
2952 ,p_datetrack_mode in varchar2
2953 ,p_validation_start_date in date
2954 ,p_validation_end_date in date
2955 ) is
2956 --
2957 l_proc varchar2(72) := g_package||'delete_validate';
2958 --
2959 Begin
2960 hr_utility.set_location('Entering:'||l_proc, 5);
2961 --
2962 -- Call all supporting business operations
2963 --
2964 dt_delete_validate
2965 (p_datetrack_mode => p_datetrack_mode
2966 ,p_validation_start_date => p_validation_start_date
2967 ,p_validation_end_date => p_validation_end_date
2968 ,p_soc_ins_contr_lvls_id => p_rec.soc_ins_contr_lvls_id
2969 );
2970 --
2971 hr_utility.set_location(' Leaving:'||l_proc, 10);
2972 End delete_validate;
2973 --
2974
2975 end hr_cle_bus;