DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_JP_EXTRA_BANK_RULES

Source


1 package body pay_jp_extra_bank_rules as
2 /* $Header: pyjpexbr.pkb 120.1 2005/07/22 01:02 keyazawa noship $ */
3 	--
4 	procedure chk_kana_format
5 	(
6 		p_input in varchar2
7 	) is
8 		--
9 		l_input  varchar2(255);
10 		l_output varchar2(255);
11 		l_rgeflg varchar2(1);
12 		--
13 	begin
14 		--
15 		if p_input is not null then
16 			--
17 			l_input := p_input;
18 			--
19 			hr_chkfmt.checkformat
20 			(
21 				value   => l_input,
22 				format  => 'KANA',
23 				output  => l_output,
24 				minimum => NULL,
25 				maximum => NULL,
26 				nullok  => 'N',
27 				rgeflg  => l_rgeflg,
28 				curcode => NULL
29 			);
30 			--
31 		end if;
32 		--
33 	end chk_kana_format;
34 	--
35 	-----------------------------------------------------------
36 	-- check account name for personal/org payment method table
37 	-----------------------------------------------------------
38 	procedure chk_account_name
39 	(
40 		p_external_account_id in number
41 	) is
42 		--
43 		l_in_account_name  varchar2(150);
44 		l_out_account_name varchar2(150);
45 		l_rgeflg           varchar2(1);
46 		--
47 	begin
48 		--
49 		if p_external_account_id is not null then
50 			--
51 			select
52 				segment9 /* account name */
53 			into
54 				l_in_account_name
55 			from
56 				pay_external_accounts
57 			where
58 				external_account_id = p_external_account_id;
59 			--
60 			chk_kana_format(l_in_account_name);
61 			--
62 		end if;
63 		--
64 	end chk_account_name;
65 	--
66 	procedure chk_account_name_update
67 	(
68 		p_external_account_id   in number,
69 		p_external_account_id_o in number
70 	) is
71 	begin
72 		--
73 		if nvl(p_external_account_id, hr_api.g_number) <> nvl(p_external_account_id_o, hr_api.g_number) then
74 			--
75 			chk_account_name(p_external_account_id);
76 			--
77 		end if;
78 		--
79 	end chk_account_name_update;
80 	--
81 	-------------------------------------------------------
82 	-- check account name for swot organization information
83 	-------------------------------------------------------
84 	procedure chk_swot_account_name
85 	(
86     p_org_information_context in varchar2,
87 		p_org_information17       in varchar2
88 	) is
89 		--
90 		l_in_value  varchar2(150);
91 		l_out_value varchar2(150);
92 		l_rgeflg    varchar2(1);
93 		--
94 	begin
95 		--
96     if p_org_information_context = 'JP_TAX_SWOT_INFO' then
97     --
98   	  chk_kana_format(p_org_information17);
99     --
100     end if;
101 		--
102 	end chk_swot_account_name;
103 	--
104 	procedure chk_swot_account_name_update
105 	(
106     p_org_information_context in varchar2,
107 		p_org_information17       in varchar2,
108 		p_org_information17_o     in varchar2
109 	) is
110 	begin
111 		--
112 		if nvl(p_org_information17, hr_api.g_varchar2) <> nvl(p_org_information17_o, hr_api.g_varchar2) then
113 			--
114 			chk_swot_account_name(p_org_information_context, p_org_information17);
115 			--
116 		end if;
117 		--
118 	end chk_swot_account_name_update;
119 	--
120 end pay_jp_extra_bank_rules;