DBA Data[Home] [Help]

PACKAGE: APPS.PAY_US_ARCHIVE

Source


1 package pay_us_archive AUTHID CURRENT_USER as
2 /* $Header: pyusarch.pkh 120.6.12020000.3 2012/09/06 20:28:23 skchalla ship $ */
3 
4 /*
5 /*
6    ******************************************************************
7    *                                                                *
8    *  Copyright (C) 1992 Oracle Corporation UK Ltd.,                *
9    *                   Chertsey, England.                           *
10    *                                                                *
11    *  All rights reserved.                                          *
12    *                                                                *
13    *  This material has been provided pursuant to an agreement      *
14    *  containing restrictions on its use.  The material is also     *
15    *  protected by copyright law.  No part of this material may     *
16    *  be copied or distributed, transmitted or transcribed, in      *
17    *  any form or by any means, electronic, mechanical, magnetic,   *
18    *  manual, or otherwise, or disclosed to third parties without   *
19    *  the express written permission of Oracle Corporation UK Ltd,  *
20    *  Oracle Park, Bittams Lane, Guildford Road, Chertsey, Surrey,  *
21    *  England.                                                      *
22    *                                                                *
23    ******************************************************************
24 
25    Change List
26    -----------
27    Date         Name        Vers   Bug No   Description
28    -----------  ----------  -----  -------  -----------------------------------
29    06-MAY-1998  nbristow    40.0            Created.
30    08-AUG-98    achauhan    40.1            Added routines for the Year End Pre-Process.
31    04-DEC-98    vmehta      40.3            Changed definition for check_residence_state
32    27-OCT-99    rpotnuru    110.9           Added two global variables g_sqwl_state and
33                                             g_sqwl_jursd to fix NY burroughs problem
34    03-AUG-00    ssarma      40.10           Removed the SQWL procedures and functions
35                                             as they are now stored in pyussqwl.pkh.
36    31-AUG-01    ssarma     115.5            Added 2 parameters to eoy_archive_gre_data
37                                             for re-archiving purposes.
38    30-NOV-01   jgoswami    115.6            added dbdrv command.
39    22-JAN-2002 jgoswami    115.7            added checkfile command.
40    19-AUG-2002 ppanda      115.8            Added OSERROR Check
41    20-AUG-2002 asasthan    115.9            Added global variables for storing
42                                             'PR' and 1099R GREs.
43    20-AUG-2002 asasthan    115.10           Added global variables for storing
44                                             report_type
45    27-AUG-2002 asasthan    115.12           Added get_parameter function
46    28-AUG-2002 asasthan    115.13           Added feed_info to plsql table
47    23-SEP-2002 asasthan    115.14           Added business_group_id for box 12 function
48    02-DEC-2002 asasthan    115.15           Changes for nocopy gscc comp
49    04-AUG-2004 meshah      115.16           defined some global variables.
50    05-AUG-2004 meshah      115.18           moved plsql tables l_jd_done_tab and
51                                             l_jd_name_done_tab from body to the
52                                             header.
53                                             Added new procedure deinit.
54    11-AUG-2004 meshah      115.19           added g_archive_date.
55    18-AUG-2004 meshah      115.20           changed l_jd_name_done_tab to be
56                                             of type record.
57    08-AUG-2005 rsethupa    115.21           Removed get_parameter()
58    28-AUG-2006 sodhingr    115.22           added g_view_online_w2 and g_w2_corrected
59    17-AUG-2010 nkjaladi    115.23           added g_orig_1099r_bef and g_1099r_corrected
60    16-AUG-2011 skchalla    115.26           Added g_1099r_gre
61    09-SEP-2012 skchalla    115.27           Added g_psd_tax_info and ltr_psd_tax_bal
62    09-SEP-2012 skchalla    115.28           Added g_w2_box_bal_info and ltr_w2_box_bal
63 */
64 --
65 TYPE char240_data_type_table IS TABLE OF VARCHAR2(240)
66                                   INDEX BY BINARY_INTEGER;
67 TYPE number_data_type_table IS TABLE OF NUMBER
68                                   INDEX BY BINARY_INTEGER;
69 g_min_chunk              number:= -1;
70 g_archive_flag           varchar2(1) := 'N';
71 g_bal_act_id             number:= -1;
72 g_1099R_transmitter_code varchar2(5):= null ;
73 g_pre_tax_info           varchar2(1):= null ;
74 g_puerto_rico_gre        varchar2(1):= 'N' ;
75 g_report_type            varchar2(50) := null ;
76 g_govt_employer          varchar2(1) := 'N';
77 g_view_online_w2         varchar2(10);
78 g_w2_corrected           number;
79 g_orig_1099r_bef         varchar2(10);  -- Added for #8239671
80 g_1099r_corrected        number;        -- Added for #8239671
81 g_1099r_gre              boolean := FALSE;       -- Added by skchalla for the Bug 11693528
82 
83 g_jursd_context_id              number;
84 g_tax_unit_context_id           number;
85 g_state_uei                     number;
86 g_county_uei                    number;
87 g_city_uei                      number;
88 g_county_sd_uei                 number;
89 g_city_sd_uei                   number;
90 g_per_marital_status            number;
91 g_con_national_identifier       number;
92 g_taxable_amount_unknown        number;
93 g_total_distributions           number;
94 g_emp_distribution_percent      number;
95 g_total_distribution_percent    number;
96 g_distribution_code_for_1099r   number;
97 g_first_yr_roth_contrib         number; -- Added For Bug# 5517938
98 g_disability_plan_id            varchar2(200);
99 g_nj_flipp_id                   varchar2(200);  -- Added for Bug# 8251746
100 g_archive_date                  number;
101 g_psd_tax_info                  varchar2(1) := null; --Added for the Bug 13724610
102 g_w2_box_bal_info               varchar2(1) := null; --Added for the Bug 7456296
103 
104 l_jd_done_tab              pay_us_archive.char240_data_type_table;
105 --l_jd_name_done_tab         pay_us_archive.char240_data_type_table;
106 
107 TYPE jd_name_rec IS RECORD
108      (jd_name   pay_us_city_names.city_name%TYPE);
109 
110  TYPE jd_name_tab IS TABLE OF jd_name_rec INDEX BY BINARY_INTEGER;
111 
112  l_jd_name_done_tab         jd_name_tab;
113 
114   TYPE pre_tax_rec_info IS RECORD
115      ( balance_name   varchar2(80),
116        defined_balance  number,
117        user_entity_id   number,
118        feed_info        varchar2(1)
119      );
120 
121   TYPE pre_tax_tab_info IS TABLE OF
122        pre_tax_rec_info
123  INDEX BY BINARY_INTEGER;
124 
125   ltr_pre_tax_bal     pre_tax_tab_info;
126   ltr_psd_tax_bal     pre_tax_tab_info;  --Added for the Bug 13724610
127   ltr_pr_balances     pre_tax_tab_info;
128   ltr_1099_bal        pre_tax_tab_info;
129   ltr_w2_box_bal      pre_tax_tab_info; --Bug 7456296
130 
131 procedure eoy_range_cursor(pactid in  number,
132                            sqlstr out nocopy varchar2);
133 
134 procedure eoy_action_creation(pactid in number,
135                               stperson in number,
136                               endperson in number,
137                               chunk in number);
138 
139 procedure eoy_archive_data(p_assactid in number,
140                            p_effective_date in date);
141 
142 procedure eoy_archive_gre_data(p_payroll_action_id in number,
143                                p_tax_unit_id       in number,
144                                p_jd_type           in varchar2 default 'ALL',
145                                p_state_code        in varchar2 default 'ALL');
146 
147 procedure eoy_archinit(p_payroll_action_id in number);
148 
149 function  get_puerto_rico_info(p_tax_unit_id  number) return varchar2;
150 function  get_1099r_info(p_tax_unit_id  number) return varchar2;
151 function  get_pre_tax_info(p_tax_unit_id  number,
152                            p_business_group_id number) return varchar2;
153 function  get_psd_tax_info(p_tax_unit_id  number,
154                            p_business_group_id number) return varchar2;
155 function  get_w2_box_bal_info(p_tax_unit_id  number,
156                               p_business_group_id number) return varchar2;--Bug 7456296
157 function  get_report_type(p_payroll_action_id  number) return varchar2;
158 
159 PROCEDURE eoy_deinit( p_payroll_action_id in number);
160 
161 end pay_us_archive;