47: -- Bug 2902744 --
48: -- 1.7 07/08/03 saikrish Removed p_given_han_yu_pin_yin_name, --
49: -- p_family_han_yu_pin_yin_name. Removed call--
50: -- hr_cn_api.check_name_dependence(3075230) --
51: -- 1.8 19/09/03 statkar Added the hr_utility.chk_product_install --
52: -- check for installed CN leg (3145322) --
53: -- 1.9 24/09/03 saikrish Changed the checks for person_type(2902659)-
54: -- 1.10 07/01/04 bramajey Bug 3342105 Changes. --
55: -- 1.11 06/02/06 rpalli Bug 4756920 Changes. Hukou Type and Hukou --
94: --
95: -- Bug 3145322 Check the leg-specific validations only if the legislation
96: -- is installed
97: --
98: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'CN') THEN
99: hr_utility.trace ('CN Legislation not installed. Not performing the validations');
100: hr_cn_api.set_location(g_trace,'Leaving: '||l_proc, 15);
101: RETURN;
102: END IF;
95: -- Bug 3145322 Check the leg-specific validations only if the legislation
96: -- is installed
97: --
98: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'CN') THEN
99: hr_utility.trace ('CN Legislation not installed. Not performing the validations');
100: hr_cn_api.set_location(g_trace,'Leaving: '||l_proc, 15);
101: RETURN;
102: END IF;
103:
276: hr_cn_api.set_location(g_trace,l_proc,120);
277: IF NOT hr_cn_api.is_positive_integer(to_number(p_number_of_children)) THEN
278: --
279: hr_cn_api.set_location(g_trace,l_proc,130);
280: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
281: hr_utility.set_message_token('VALUE', p_number_of_children);
282: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
283: hr_utility.raise_error;
284: END IF;
277: IF NOT hr_cn_api.is_positive_integer(to_number(p_number_of_children)) THEN
278: --
279: hr_cn_api.set_location(g_trace,l_proc,130);
280: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
281: hr_utility.set_message_token('VALUE', p_number_of_children);
282: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
283: hr_utility.raise_error;
284: END IF;
285: --
278: --
279: hr_cn_api.set_location(g_trace,l_proc,130);
280: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
281: hr_utility.set_message_token('VALUE', p_number_of_children);
282: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
283: hr_utility.raise_error;
284: END IF;
285: --
286: ELSE
279: hr_cn_api.set_location(g_trace,l_proc,130);
280: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
281: hr_utility.set_message_token('VALUE', p_number_of_children);
282: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
283: hr_utility.raise_error;
284: END IF;
285: --
286: ELSE
287: --
285: --
286: ELSE
287: --
288: hr_cn_api.set_location(g_trace,l_proc,140);
289: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
290: hr_utility.set_message_token('VALUE', p_number_of_children);
291: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
292: hr_utility.raise_error;
293: --
286: ELSE
287: --
288: hr_cn_api.set_location(g_trace,l_proc,140);
289: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
290: hr_utility.set_message_token('VALUE', p_number_of_children);
291: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
292: hr_utility.raise_error;
293: --
294: END IF;
287: --
288: hr_cn_api.set_location(g_trace,l_proc,140);
289: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
290: hr_utility.set_message_token('VALUE', p_number_of_children);
291: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
292: hr_utility.raise_error;
293: --
294: END IF;
295: --
288: hr_cn_api.set_location(g_trace,l_proc,140);
289: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
290: hr_utility.set_message_token('VALUE', p_number_of_children);
291: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
292: hr_utility.raise_error;
293: --
294: END IF;
295: --
296: END IF;
309: --
310: hr_cn_api.set_location (g_trace, l_proc, 160);
311: IF NOT hr_cn_api.is_number(p_percentage)
312: THEN
313: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
314: hr_utility.set_message_token('VALUE', p_percentage);
315: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
316: hr_utility.raise_error;
317: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
310: hr_cn_api.set_location (g_trace, l_proc, 160);
311: IF NOT hr_cn_api.is_number(p_percentage)
312: THEN
313: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
314: hr_utility.set_message_token('VALUE', p_percentage);
315: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
316: hr_utility.raise_error;
317: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
318: THEN
311: IF NOT hr_cn_api.is_number(p_percentage)
312: THEN
313: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
314: hr_utility.set_message_token('VALUE', p_percentage);
315: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
316: hr_utility.raise_error;
317: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
318: THEN
319: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
312: THEN
313: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
314: hr_utility.set_message_token('VALUE', p_percentage);
315: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
316: hr_utility.raise_error;
317: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
318: THEN
319: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
320: hr_utility.set_message_token('NUMBER','P_PERCENTAGE');
315: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
316: hr_utility.raise_error;
317: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
318: THEN
319: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
320: hr_utility.set_message_token('NUMBER','P_PERCENTAGE');
321: hr_utility.set_message_token('LOW','0');
322: hr_utility.set_message_token('HIGH','100');
323: hr_utility.raise_error;
316: hr_utility.raise_error;
317: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
318: THEN
319: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
320: hr_utility.set_message_token('NUMBER','P_PERCENTAGE');
321: hr_utility.set_message_token('LOW','0');
322: hr_utility.set_message_token('HIGH','100');
323: hr_utility.raise_error;
324: ELSIF length(substr(p_percentage,instr(p_percentage,'.',1)+1)) > 3
317: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
318: THEN
319: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
320: hr_utility.set_message_token('NUMBER','P_PERCENTAGE');
321: hr_utility.set_message_token('LOW','0');
322: hr_utility.set_message_token('HIGH','100');
323: hr_utility.raise_error;
324: ELSIF length(substr(p_percentage,instr(p_percentage,'.',1)+1)) > 3
325: -- Bug 2748530 changes start
318: THEN
319: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
320: hr_utility.set_message_token('NUMBER','P_PERCENTAGE');
321: hr_utility.set_message_token('LOW','0');
322: hr_utility.set_message_token('HIGH','100');
323: hr_utility.raise_error;
324: ELSIF length(substr(p_percentage,instr(p_percentage,'.',1)+1)) > 3
325: -- Bug 2748530 changes start
326: -- Check for decimal length
319: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
320: hr_utility.set_message_token('NUMBER','P_PERCENTAGE');
321: hr_utility.set_message_token('LOW','0');
322: hr_utility.set_message_token('HIGH','100');
323: hr_utility.raise_error;
324: ELSIF length(substr(p_percentage,instr(p_percentage,'.',1)+1)) > 3
325: -- Bug 2748530 changes start
326: -- Check for decimal length
327: --
325: -- Bug 2748530 changes start
326: -- Check for decimal length
327: --
328: THEN
329: hr_utility.set_message('PER','HR_374607_INVALID_FORMAT');
330: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
331: hr_utility.set_message_token('FORMAT','99.999');
332: hr_utility.raise_error;
333: END IF;
326: -- Check for decimal length
327: --
328: THEN
329: hr_utility.set_message('PER','HR_374607_INVALID_FORMAT');
330: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
331: hr_utility.set_message_token('FORMAT','99.999');
332: hr_utility.raise_error;
333: END IF;
334: --
327: --
328: THEN
329: hr_utility.set_message('PER','HR_374607_INVALID_FORMAT');
330: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
331: hr_utility.set_message_token('FORMAT','99.999');
332: hr_utility.raise_error;
333: END IF;
334: --
335: -- Bug 2748530 changes end
328: THEN
329: hr_utility.set_message('PER','HR_374607_INVALID_FORMAT');
330: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
331: hr_utility.set_message_token('FORMAT','99.999');
332: hr_utility.raise_error;
333: END IF;
334: --
335: -- Bug 2748530 changes end
336: --
555: -- 1.3 04/11/03 statkar Bug 2900110 changes for Expat Indicator --
556: -- 1.4 04/11/03 statkar Bug 2900110 added NOT NULL for Expat --
557: -- 1.5 07/08/03 saikrish Removed p_per_information14, --
558: -- p_per_information15 (3075230) --
559: -- 1.6 19/09/03 statkar Added the hr_utility.chk_product_install --
560: -- check for installed CN leg (3145322) --
561: -- 1.7 30/09/03 saikrish Retrieved national_identifier (2902659) --
562: --------------------------------------------------------------------------
563: PROCEDURE check_person (p_national_identifier IN VARCHAR2
615: --
616: -- Bug 3145322 Check the leg-specific validations only if the legislation
617: -- is installed
618: --
619: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'CN') THEN
620: hr_utility.trace ('CN Legislation not installed. Not performing the validations');
621: hr_cn_api.set_location(g_trace,'Leaving: '||l_proc, 15);
622: RETURN;
623: END IF;
616: -- Bug 3145322 Check the leg-specific validations only if the legislation
617: -- is installed
618: --
619: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'CN') THEN
620: hr_utility.trace ('CN Legislation not installed. Not performing the validations');
621: hr_cn_api.set_location(g_trace,'Leaving: '||l_proc, 15);
622: RETURN;
623: END IF;
624:
625: OPEN csr_bg_per (p_person_id, p_effective_date) ;
626: FETCH csr_bg_per INTO l_business_group_id;
627: IF csr_bg_per%NOTFOUND THEN
628: CLOSE csr_bg_per;
629: hr_utility.set_message(800,'HR_7961_PER_BUS_GRP_INVALID');
630: hr_utility.set_message_token('LEG_CODE','CN');
631: hr_utility.raise_error;
632: END IF;
633: CLOSE csr_bg_per;
626: FETCH csr_bg_per INTO l_business_group_id;
627: IF csr_bg_per%NOTFOUND THEN
628: CLOSE csr_bg_per;
629: hr_utility.set_message(800,'HR_7961_PER_BUS_GRP_INVALID');
630: hr_utility.set_message_token('LEG_CODE','CN');
631: hr_utility.raise_error;
632: END IF;
633: CLOSE csr_bg_per;
634:
627: IF csr_bg_per%NOTFOUND THEN
628: CLOSE csr_bg_per;
629: hr_utility.set_message(800,'HR_7961_PER_BUS_GRP_INVALID');
630: hr_utility.set_message_token('LEG_CODE','CN');
631: hr_utility.raise_error;
632: END IF;
633: CLOSE csr_bg_per;
634:
635: OPEN csr_per;