DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_JP_PEM_RULES

Source


1 package body per_jp_pem_rules as
2 /* $Header: pejppemr.pkb 120.0 2005/05/31 10:55 appldev noship $ */
3 --
4 -- Constants
5 --
6 c_package	constant varchar2(31) := 'per_jp_pem_rules.';
7 --
8 procedure chk_ddf(
9 	p_pem_information1	in varchar2,
10 	p_pem_information2	in varchar2)
11 is
12 	c_proc			constant varchar2(61) := c_package || 'chk_ddf';
13 	--
14 /*
15 	l_employment_income	number;
16 	l_si_prems		number;
17 	l_mutual_aid_prem	number;
18 	l_withholding_tax	number;
19 	l_total_deductions	number;
20 */
21 begin
22 	hr_utility.set_location('Entering: ' || c_proc, 10);
23 	--
24 	if p_pem_information1 is not null then
25 		if not hr_jp_standard_pkg.is_hankaku(p_pem_information1) then
26 			fnd_message.set_name('PER', 'HR_JP_IS_NOT_HANKAKU');
27 			fnd_message.set_token('NAME', 'HR_JP_EMPLOYER_NAME_KANA', true);
28 			fnd_message.set_token('VALUE', p_pem_information1);
29 			hr_multi_message.add(p_associated_column1 => 'PER_PREVIOUS_EMPLOYERS.PEM_INFORMATION1');
30 		end if;
31 	end if;
32 	--
33 	if p_pem_information2 is not null then
34 		if not hr_jp_standard_pkg.is_hankaku(p_pem_information2) then
35 			fnd_message.set_name('PER', 'HR_JP_IS_NOT_HANKAKU');
36 			fnd_message.set_token('NAME', 'HR_JP_EMPLOYER_ADDRESS_KANA', true);
37 			fnd_message.set_token('VALUE', p_pem_information2);
38 			hr_multi_message.add(p_associated_column1 => 'PER_PREVIOUS_EMPLOYERS.PEM_INFORMATION2');
39 		end if;
40 	end if;
41 	--
42 /*
43 	l_employment_income	:= nvl(fnd_number.canonical_to_number(p_pem_information3), 0);
44 	l_si_prems		:= nvl(fnd_number.canonical_to_number(p_pem_information4), 0);
45 	l_mutual_aid_prem	:= nvl(fnd_number.canonical_to_number(p_pem_information5), 0);
46 	l_withholding_tax	:= nvl(fnd_number.canonical_to_number(p_pem_information6), 0);
47 	l_total_deductions	:= l_si_prems + l_withholding_tax;
48 	--
49 	if l_employment_income < l_total_deductions then
50 		fnd_message.set_name('PER', 'HR_JP_A_LESS_THAN_B');
51 		fnd_message.set_token('HIGH_NAME', 'HR_JP_EMPLOYMENT_INCOME', true);
52 		fnd_message.set_token('HIGH_VALUE', to_char(l_employment_income, fnd_currency.get_format_mask('JPY', 38)));
53 		fnd_message.set_token('LOW_NAME', 'HR_JP_TOTAL_DEDUCTIONS', true);
54 		fnd_message.set_token('LOW_VALUE', to_char(l_total_deductions, fnd_currency.get_format_mask('JPY', 38)));
55 		hr_multi_message.add(p_associated_column1 => 'PER_PREVIOUS_EMPLOYERS.PEM_INFORMATION3');
56 	end if;
57 	--
58 	if l_si_prems < l_mutual_aid_prem then
59 		fnd_message.set_name('PER', 'HR_JP_A_LESS_THAN_B');
60 		fnd_message.set_token('HIGH_NAME', 'HR_JP_SI_PREMS', true);
61 		fnd_message.set_token('HIGH_VALUE', to_char(l_si_prems, fnd_currency.get_format_mask('JPY', 38)));
62 		fnd_message.set_token('LOW_NAME', 'HR_JP_MUTUAL_AID_PREM', true);
63 		fnd_message.set_token('LOW_VALUE', to_char(l_mutual_aid_prem, fnd_currency.get_format_mask('JPY', 38)));
64 		hr_multi_message.add(
65 			p_associated_column1	=> 'PER_PREVIOUS_EMPLOYERS.PEM_INFORMATION4',
66 			p_associated_column2	=> 'PER_PREVIOUS_EMPLOYERS.PEM_INFORMATION5');
67 	end if;
68 */
69 	--
70 	hr_multi_message.end_validation_set;
71 	--
72 	hr_utility.set_location('Leaving: ' || c_proc, 20);
73 end chk_ddf;
74 --
75 end per_jp_pem_rules;