[Home] [Help]
Skip to content
PACKAGE BODY: APPS.PAY_KR_YEA_MED_EFILE_PKG
Source
1 package body pay_kr_yea_med_efile_pkg as
2 /* $Header: pykrymef.pkb 120.1.12010000.2 2010/01/27 14:26:26 vaisriva ship $ */
3 --
4 -- Constants
5 --
6 c_package constant varchar2(31) := ' pay_kr_yea_med_efile_pkg.';
7 --
8
9 ------------------------------------------------------------------------
10 -- Package initialization section
11 ------------------------------------------------------------------------
12 begin
13 declare
14 l_report_type varchar2(3);
15 --------------------------------------------------------
16 function user_entity_id(p_user_entity_name in varchar2) return number
17 --------------------------------------------------------
18 is
19 l_user_entity_id number;
20 begin
21 select user_entity_id
22 into l_user_entity_id
23 from ff_user_entities
24 where user_entity_name = p_user_entity_name
25 and legislation_code = 'KR'
26 and creator_type = 'X';
27 --
28 return l_user_entity_id;
29 end user_entity_id;
30 begin
31 --
32 g_payroll_action_id := pay_magtape_generic.get_parameter_value('PAYROLL_ACTION_ID');
33 g_assignment_set_id := to_number(pay_magtape_generic.get_parameter_value('ASSIGNMENT_SET_ID'));
34 -- g_business_place_id := to_number(pay_magtape_generic.get_parameter_value('BUSINESS_PLACE_ID'));
35 g_target_year := to_number(pay_magtape_generic.get_parameter_value('TARGET_YEAR'));
36 --
37 g_medical_exp_archive := user_entity_id('X_YEA_MED_EXP_TAX_EXEM');
38 --
39 if g_payroll_action_id is null then
40
41 l_report_type := pay_magtape_generic.get_parameter_value('REPORT_TYPE');
42
43 if l_report_type is null then
44 g_normal_yea := 'N';
45 g_interim_yea := 'I';
46 g_rep_period_code := '1'; -- Bug 9251566
47
48 elsif l_report_type = 'N' then
49 g_normal_yea := 'N';
50 g_rep_period_code := '1'; -- Bug 9251566
51
52 elsif l_report_type = 'I' then
53 g_interim_yea := 'I';
54 g_rep_period_code := '3'; -- Bug 9251566
55
56 elsif l_report_type = 'R' then
57 g_re_yea := 'R';
58 g_rep_period_code := '3'; -- Bug 9251566
59
60 elsif l_report_type = 'NI' then
61 g_normal_yea := 'N';
62 g_interim_yea := 'I';
63 g_rep_period_code := '1'; -- Bug 9251566
64
65 elsif l_report_type = 'NR' then
66 g_normal_yea := 'N';
67 g_re_yea := 'R';
68 g_rep_period_code := '1'; -- Bug 9251566
69
70 end if;
71 end if;
72 --
73 end;
74 end pay_kr_yea_med_efile_pkg;