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:
258: hr_cn_api.set_location(g_trace,l_proc,120);
259: IF NOT hr_cn_api.is_positive_integer(to_number(p_number_of_children)) THEN
260: --
261: hr_cn_api.set_location(g_trace,l_proc,130);
262: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
263: hr_utility.set_message_token('VALUE', p_number_of_children);
264: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
265: hr_utility.raise_error;
266: END IF;
259: IF NOT hr_cn_api.is_positive_integer(to_number(p_number_of_children)) THEN
260: --
261: hr_cn_api.set_location(g_trace,l_proc,130);
262: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
263: hr_utility.set_message_token('VALUE', p_number_of_children);
264: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
265: hr_utility.raise_error;
266: END IF;
267: --
260: --
261: hr_cn_api.set_location(g_trace,l_proc,130);
262: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
263: hr_utility.set_message_token('VALUE', p_number_of_children);
264: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
265: hr_utility.raise_error;
266: END IF;
267: --
268: ELSE
261: hr_cn_api.set_location(g_trace,l_proc,130);
262: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
263: hr_utility.set_message_token('VALUE', p_number_of_children);
264: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
265: hr_utility.raise_error;
266: END IF;
267: --
268: ELSE
269: --
267: --
268: ELSE
269: --
270: hr_cn_api.set_location(g_trace,l_proc,140);
271: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
272: hr_utility.set_message_token('VALUE', p_number_of_children);
273: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
274: hr_utility.raise_error;
275: --
268: ELSE
269: --
270: hr_cn_api.set_location(g_trace,l_proc,140);
271: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
272: hr_utility.set_message_token('VALUE', p_number_of_children);
273: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
274: hr_utility.raise_error;
275: --
276: END IF;
269: --
270: hr_cn_api.set_location(g_trace,l_proc,140);
271: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
272: hr_utility.set_message_token('VALUE', p_number_of_children);
273: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
274: hr_utility.raise_error;
275: --
276: END IF;
277: --
270: hr_cn_api.set_location(g_trace,l_proc,140);
271: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
272: hr_utility.set_message_token('VALUE', p_number_of_children);
273: hr_utility.set_message_token('FIELD','P_NUMBER_OF_CHILDREN');
274: hr_utility.raise_error;
275: --
276: END IF;
277: --
278: END IF;
291: --
292: hr_cn_api.set_location (g_trace, l_proc, 160);
293: IF NOT hr_cn_api.is_number(p_percentage)
294: THEN
295: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
296: hr_utility.set_message_token('VALUE', p_percentage);
297: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
298: hr_utility.raise_error;
299: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
292: hr_cn_api.set_location (g_trace, l_proc, 160);
293: IF NOT hr_cn_api.is_number(p_percentage)
294: THEN
295: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
296: hr_utility.set_message_token('VALUE', p_percentage);
297: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
298: hr_utility.raise_error;
299: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
300: THEN
293: IF NOT hr_cn_api.is_number(p_percentage)
294: THEN
295: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
296: hr_utility.set_message_token('VALUE', p_percentage);
297: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
298: hr_utility.raise_error;
299: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
300: THEN
301: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
294: THEN
295: hr_utility.set_message(800,'HR_374602_INVALID_VALUE');
296: hr_utility.set_message_token('VALUE', p_percentage);
297: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
298: hr_utility.raise_error;
299: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
300: THEN
301: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
302: hr_utility.set_message_token('NUMBER','P_PERCENTAGE');
297: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
298: hr_utility.raise_error;
299: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
300: THEN
301: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
302: hr_utility.set_message_token('NUMBER','P_PERCENTAGE');
303: hr_utility.set_message_token('LOW','0');
304: hr_utility.set_message_token('HIGH','100');
305: hr_utility.raise_error;
298: hr_utility.raise_error;
299: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
300: THEN
301: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
302: hr_utility.set_message_token('NUMBER','P_PERCENTAGE');
303: hr_utility.set_message_token('LOW','0');
304: hr_utility.set_message_token('HIGH','100');
305: hr_utility.raise_error;
306: ELSIF length(substr(p_percentage,instr(p_percentage,'.',1)+1)) > 3
299: ELSIF NOT hr_cn_api.is_valid_percentage(to_number(p_percentage))
300: THEN
301: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
302: hr_utility.set_message_token('NUMBER','P_PERCENTAGE');
303: hr_utility.set_message_token('LOW','0');
304: hr_utility.set_message_token('HIGH','100');
305: hr_utility.raise_error;
306: ELSIF length(substr(p_percentage,instr(p_percentage,'.',1)+1)) > 3
307: -- Bug 2748530 changes start
300: THEN
301: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
302: hr_utility.set_message_token('NUMBER','P_PERCENTAGE');
303: hr_utility.set_message_token('LOW','0');
304: hr_utility.set_message_token('HIGH','100');
305: hr_utility.raise_error;
306: ELSIF length(substr(p_percentage,instr(p_percentage,'.',1)+1)) > 3
307: -- Bug 2748530 changes start
308: -- Check for decimal length
301: hr_utility.set_message('PER','HR_374603_INVALID_RANGE');
302: hr_utility.set_message_token('NUMBER','P_PERCENTAGE');
303: hr_utility.set_message_token('LOW','0');
304: hr_utility.set_message_token('HIGH','100');
305: hr_utility.raise_error;
306: ELSIF length(substr(p_percentage,instr(p_percentage,'.',1)+1)) > 3
307: -- Bug 2748530 changes start
308: -- Check for decimal length
309: --
307: -- Bug 2748530 changes start
308: -- Check for decimal length
309: --
310: THEN
311: hr_utility.set_message('PER','HR_374607_INVALID_FORMAT');
312: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
313: hr_utility.set_message_token('FORMAT','99.999');
314: hr_utility.raise_error;
315: END IF;
308: -- Check for decimal length
309: --
310: THEN
311: hr_utility.set_message('PER','HR_374607_INVALID_FORMAT');
312: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
313: hr_utility.set_message_token('FORMAT','99.999');
314: hr_utility.raise_error;
315: END IF;
316: --
309: --
310: THEN
311: hr_utility.set_message('PER','HR_374607_INVALID_FORMAT');
312: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
313: hr_utility.set_message_token('FORMAT','99.999');
314: hr_utility.raise_error;
315: END IF;
316: --
317: -- Bug 2748530 changes end
310: THEN
311: hr_utility.set_message('PER','HR_374607_INVALID_FORMAT');
312: hr_utility.set_message_token('FIELD','P_PERCENTAGE');
313: hr_utility.set_message_token('FORMAT','99.999');
314: hr_utility.raise_error;
315: END IF;
316: --
317: -- Bug 2748530 changes end
318: --
537: -- 1.3 04/11/03 statkar Bug 2900110 changes for Expat Indicator --
538: -- 1.4 04/11/03 statkar Bug 2900110 added NOT NULL for Expat --
539: -- 1.5 07/08/03 saikrish Removed p_per_information14, --
540: -- p_per_information15 (3075230) --
541: -- 1.6 19/09/03 statkar Added the hr_utility.chk_product_install --
542: -- check for installed CN leg (3145322) --
543: -- 1.7 30/09/03 saikrish Retrieved national_identifier (2902659) --
544: --------------------------------------------------------------------------
545: PROCEDURE check_person (p_national_identifier IN VARCHAR2
597: --
598: -- Bug 3145322 Check the leg-specific validations only if the legislation
599: -- is installed
600: --
601: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'CN') THEN
602: hr_utility.trace ('CN Legislation not installed. Not performing the validations');
603: hr_cn_api.set_location(g_trace,'Leaving: '||l_proc, 15);
604: RETURN;
605: END IF;
598: -- Bug 3145322 Check the leg-specific validations only if the legislation
599: -- is installed
600: --
601: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'CN') THEN
602: hr_utility.trace ('CN Legislation not installed. Not performing the validations');
603: hr_cn_api.set_location(g_trace,'Leaving: '||l_proc, 15);
604: RETURN;
605: END IF;
606:
607: OPEN csr_bg_per (p_person_id, p_effective_date) ;
608: FETCH csr_bg_per INTO l_business_group_id;
609: IF csr_bg_per%NOTFOUND THEN
610: CLOSE csr_bg_per;
611: hr_utility.set_message(800,'HR_7961_PER_BUS_GRP_INVALID');
612: hr_utility.set_message_token('LEG_CODE','CN');
613: hr_utility.raise_error;
614: END IF;
615: CLOSE csr_bg_per;
608: FETCH csr_bg_per INTO l_business_group_id;
609: IF csr_bg_per%NOTFOUND THEN
610: CLOSE csr_bg_per;
611: hr_utility.set_message(800,'HR_7961_PER_BUS_GRP_INVALID');
612: hr_utility.set_message_token('LEG_CODE','CN');
613: hr_utility.raise_error;
614: END IF;
615: CLOSE csr_bg_per;
616:
609: IF csr_bg_per%NOTFOUND THEN
610: CLOSE csr_bg_per;
611: hr_utility.set_message(800,'HR_7961_PER_BUS_GRP_INVALID');
612: hr_utility.set_message_token('LEG_CODE','CN');
613: hr_utility.raise_error;
614: END IF;
615: CLOSE csr_bg_per;
616:
617: OPEN csr_per;