DBA Data[Home] [Help]

PACKAGE: APPS.PAY_US_EMP_TAX_RULES_PKG

Source


1 PACKAGE pay_us_emp_tax_rules_pkg AUTHID CURRENT_USER as
2 /* $Header: pyustaxr.pkh 115.5 2004/01/21 07:14:13 saurgupt ship $ */
3 --
4 --
5  /*
6    ******************************************************************
7    *                                                                *
8    *  Copyright (C) 1993 Oracle Corporation.                        *
9    *  All rights reserved.                                          *
10    *                                                                *
11    *  This material has been provided pursuant to an agreement      *
12    *  containing restrictions on its use.  The material is also     *
13    *  protected by copyright law.  No part of this material may     *
14    *  be copied or distributed, transmitted or transcribed, in      *
15    *  any form or by any means, electronic, mechanical, magnetic,   *
16    *  manual, or otherwise, or disclosed to third parties without   *
17    *  the express written permission of Oracle Corporation,         *
18    *  500 Oracle Parkway, Redwood City, CA, 94065.                  *
19    *                                                                *
20    ******************************************************************
21 
22     Name        : pay_us_emp_tax_rules_pkg
23 
24     Description : This package holds building blocks used in maintenace
25                   of US employee tax rule using PER_ASSIGNMENT_EXTRA_INFO
26                   table.
27 
28     Uses        : hr_utility
29 
30     Change List
31     -----------
32     Date        Name          Vers    Bug No     Description
33     ----        ----          ----    ------     -----------
34     OCT-22-1993 RMAMGAIN      1.0                Created with following proc.
35                                                   .
36 
37     03-AUG-95	gpaytonm	40.6	Changed get_set_Def to default_tax. Added on_insert to be called
38 					from form such that defaulting VERTEX entries is easier to control -
39 					on_insert always creates one, but when defaulting want may not want
40 					a vertex record but do want a tax record. Added code to cater for
41 					unknown cities - inserts county record in this case. Altered code
42 					to only insert one vertex entry when work and res cities are the same
43 					Renamed create_tax_ele_Entry to create_vertex_entry
44     30-SEP-95	lwthomps	40.7    Added new procedure Create_County_Record to create
45                                         a county tax record for a city created through the
46                                         form.
47     14-JAN-96	lwthomps	40.7    Added new procedure update attribute for 418370.
48                                         This function updates a attribute on a single record.
49                                         Currently only for school district and Percent time.
50 
51     05-JUN-96	lwthomps	40.8    501979: created an overloaded version
52                                         of default_tax such that it only
53                                         commits when called from the Tax Form.
54     18-JAN-02	fusman  	115.0   Added dbdrv commands and changed the parameters
55                                         in the function Insert_Row to default null as
56                                         to match the package body.
57     10-MAY-02   sodhingr	115.4	Changed the default value of the parameters to
58 					subprogram Lock_Row,Update_Row,check_unique
59     21-JAN-04   saurgupt        115.5   Bug 3354046: Change the package to make it gscc
60                                         compliant.
61   */
62 --
63 
64 PROCEDURE Insert_Row(X_Rowid                    IN OUT nocopy VARCHAR2,
65                      X_Assignment_Extra_Info_Id IN OUT nocopy NUMBER,
66                      X_Assignment_Id                   NUMBER,
67                      X_Information_Type                VARCHAR2,
68                      X_session_date                    DATE,
69                      X_jurisdiction                    VARCHAR2,
70                      X_Aei_Information_Category        VARCHAR2 default null,
71                      X_Aei_Information1                VARCHAR2 default null,
72                      X_Aei_Information2                VARCHAR2 default null,
73                      X_Aei_Information3                VARCHAR2 default null,
74                      X_Aei_Information4                VARCHAR2 default null,
75                      X_Aei_Information5                VARCHAR2 default null,
76                      X_Aei_Information6                VARCHAR2 default null,
77                      X_Aei_Information7                VARCHAR2 default null,
78                      X_Aei_Information8                VARCHAR2 default null,
79                      X_Aei_Information9                VARCHAR2 default null,
80                      X_Aei_Information10               VARCHAR2 default null,
81                      X_Aei_Information11               VARCHAR2 default null,
82                      X_Aei_Information12               VARCHAR2 default null,
83                      X_Aei_Information13               VARCHAR2 default null,
84                      X_Aei_Information14               VARCHAR2 default null,
85                      X_Aei_Information15               VARCHAR2 default null,
86                      X_Aei_Information16               VARCHAR2 default null,
87                      X_Aei_Information17               VARCHAR2 default null,
88                      X_Aei_Information18               VARCHAR2 default null,
89                      X_Aei_Information19               VARCHAR2 default null,
90                      X_Aei_Information20               VARCHAR2 default null
91                      );
92 
93 PROCEDURE Lock_Row(X_Rowid                             VARCHAR2,
94                    X_Assignment_Extra_Info_Id          NUMBER,
95                    X_Assignment_Id                     NUMBER,
96                    X_Information_Type                  VARCHAR2,
97                    X_Aei_Information1                  VARCHAR2 default null,
98                    X_Aei_Information2                  VARCHAR2 default null,
99                    X_Aei_Information3                  VARCHAR2 default null,
100                    X_Aei_Information4                  VARCHAR2 default null,
101                    X_Aei_Information5                  VARCHAR2 default null,
102                    X_Aei_Information6                  VARCHAR2 default null,
103                    X_Aei_Information7                  VARCHAR2 default null,
104                    X_Aei_Information8                  VARCHAR2 default null,
105                    X_Aei_Information9                  VARCHAR2 default null,
106                    X_Aei_Information10                 VARCHAR2 default null,
107                    X_Aei_Information11                 VARCHAR2 default null,
108                    X_Aei_Information12                 VARCHAR2 default null,
109                    X_Aei_Information13                 VARCHAR2 default null,
110                    X_Aei_Information14                 VARCHAR2 default null,
111                    X_Aei_Information15                 VARCHAR2 default null,
112                    X_Aei_Information16                 VARCHAR2 default null,
113                    X_Aei_Information17                 VARCHAR2 default null,
114                    X_Aei_Information18                 VARCHAR2 default null,
115                    X_Aei_Information19                 VARCHAR2 default null,
116                    X_Aei_Information20                 VARCHAR2 default null
117                    );
118 
119 PROCEDURE Update_Row(X_Rowid                           VARCHAR2,
120                      X_assignment_id                   NUMBER,
121                      X_information_type                VARCHAR2,
122                      X_session_date                    DATE,
123                      X_jurisdiction                    VARCHAR2,
124                      X_Aei_Information1                VARCHAR2 default null,
125                      X_Aei_Information2                VARCHAR2 default null,
126                      X_Aei_Information3                VARCHAR2 default null,
127                      X_Aei_Information4                VARCHAR2 default null,
128                      X_Aei_Information5                VARCHAR2 default null,
129                      X_Aei_Information6                VARCHAR2 default null,
130                      X_Aei_Information7                VARCHAR2 default null,
131                      X_Aei_Information8                VARCHAR2 default null,
132                      X_Aei_Information9                VARCHAR2 default null,
133                      X_Aei_Information10               VARCHAR2 default null,
134                      X_Aei_Information11               VARCHAR2 default null,
135                      X_Aei_Information12               VARCHAR2 default null,
136                      X_Aei_Information13               VARCHAR2 default null,
137                      X_Aei_Information14               VARCHAR2 default null,
138                      X_Aei_Information15               VARCHAR2 default null,
139                      X_Aei_Information16               VARCHAR2 default null,
140                      X_Aei_Information17               VARCHAR2 default null,
141                      X_Aei_Information18               VARCHAR2 default null,
142                      X_Aei_Information19               VARCHAR2 default null,
143                      X_Aei_Information20               VARCHAR2 default null);
144 
145 PROCEDURE Delete_Row(X_Rowid VARCHAR2);
146 
147 FUNCTION  check_unique(X_assignment_id         NUMBER   default null,
148                        X_information_type      VARCHAR2 default null,
149                        X_state_code            VARCHAR2 default null,
150                        X_locality_code         VARCHAR2 default null)
151 RETURN NUMBER;
152 
153 
154 PROCEDURE default_tax( X_assignment_id     IN      NUMBER,
155                        X_session_date      IN      DATE,
156                        X_business_group_id IN      NUMBER,
157                        X_resident_state    IN OUT nocopy  VARCHAR2 ,
158                        X_res_state_code    IN OUT nocopy  VARCHAR2 ,
159                        X_work_state        IN OUT nocopy  VARCHAR2 ,
160                        X_work_state_code   IN OUT nocopy  VARCHAR2 ,
161                        X_resident_locality IN OUT nocopy  VARCHAR2 ,
162                        X_work_locality     IN OUT nocopy  VARCHAR2 ,
163                        X_work_jurisdiction IN OUT nocopy  VARCHAR2 ,
164                        X_work_loc_name     IN OUT nocopy  VARCHAR2 ,
165                        X_resident_loc_name IN OUT nocopy  VARCHAR2 ,
166                        X_default_or_get    IN OUT nocopy  VARCHAR2 ,
167                        X_error             IN OUT nocopy  VARCHAR2 );
168 --
169 PROCEDURE default_tax( X_assignment_id     IN      NUMBER,
170                        X_session_date      IN      DATE,
171                        X_business_group_id IN      NUMBER,
172                        X_resident_state    IN OUT nocopy  VARCHAR2 ,
173                        X_res_state_code    IN OUT nocopy  VARCHAR2 ,
174                        X_work_state        IN OUT nocopy  VARCHAR2 ,
175                        X_work_state_code   IN OUT nocopy  VARCHAR2 ,
176                        X_resident_locality IN OUT nocopy  VARCHAR2 ,
177                        X_work_locality     IN OUT nocopy  VARCHAR2 ,
178                        X_work_jurisdiction IN OUT nocopy  VARCHAR2 ,
179                        X_work_loc_name     IN OUT nocopy  VARCHAR2 ,
180                        X_resident_loc_name IN OUT nocopy  VARCHAR2 ,
181                        X_default_or_get    IN OUT nocopy  VARCHAR2 ,
182                        X_error             IN OUT nocopy  VARCHAR2 ,
183                        X_from_form         IN      VARCHAR2);
184 --
185 PROCEDURE create_vertex_entry(
186           P_mode                Varchar2,
187           P_assignment_id       Number,
188           P_information_type    varchar2,
189           P_session_date        date,
190           P_jurisdiction        varchar2,
191 	  p_time_in_locality	varchar2,
192 	  p_remainder_percent   varchar2 );
193 --
194 PROCEDURE create_wc_ele_entry(
195           P_assignment_id       Number,
196           P_session_date        date,
197           P_jurisdiction        varchar2);
198 --
199 PROCEDURE on_insert( p_Rowid                    IN OUT nocopy VARCHAR2,
200                      p_Assignment_Extra_Info_Id IN OUT nocopy NUMBER,
201                      p_Assignment_Id                   NUMBER,
202                      p_Information_Type                VARCHAR2,
203                      p_session_date                    DATE,
204                      p_jurisdiction                    VARCHAR2,
205                      p_Aei_Information_Category        VARCHAR2,
206                      p_Aei_Information1                VARCHAR2,
207                      p_Aei_Information2                VARCHAR2,
208                      p_Aei_Information3                VARCHAR2,
209                      p_Aei_Information4                VARCHAR2,
210                      p_Aei_Information5                VARCHAR2,
211                      p_Aei_Information6                VARCHAR2,
212                      p_Aei_Information7                VARCHAR2,
213                      p_Aei_Information8                VARCHAR2,
214                      p_Aei_Information9                VARCHAR2,
215                      p_Aei_Information10               VARCHAR2,
216                      p_Aei_Information11               VARCHAR2,
217                      p_Aei_Information12               VARCHAR2,
218                      p_Aei_Information13               VARCHAR2,
219                      p_Aei_Information14               VARCHAR2,
220                      p_Aei_Information15               VARCHAR2,
221                      p_Aei_Information16               VARCHAR2,
222                      p_Aei_Information17               VARCHAR2,
223                      p_Aei_Information18               VARCHAR2,
224                      p_Aei_Information19               VARCHAR2,
225                      p_Aei_Information20               VARCHAR2
226                      );
227 --
228 PROCEDURE Create_County_Record( P_Jurisdiction VARCHAR2,
229                                 P_assignment_id   NUMBER,
230                                 P_filing_status   VARCHAR2,
231                                 P_session_date    DATE );
232 
233 --
234 ------------------------------Update Attribute-----------------------------
235 /* This procedure is used to update single attributes within tax records.*/
236 /* This was created because often times attributes need to be updated on */
237 /* records other then the present record on the form.                    */
238 /* Attributes to be supported: Percent time, School district code        */
242                             p_attribute_type VARCHAR2,
239 ---------------------------------------------------------------------------
240 --
241 Procedure Update_Attribute( p_rowid          VARCHAR2,
243                             p_new_value      VARCHAR2,
244                             p_jurisdiction   VARCHAR2,
245                             p_state_abbrev   VARCHAR2,
246                             p_assignment_id  NUMBER);
247 
248 --
249 ----------------------Default_tax_with_validation-------------------------
250 /* Procedure to allow defaulting of taxes from the assignment and       */
251 /* address forms.                                                       */
252 --------------------------------------------------------------------------
253 --
254 PROCEDURE default_tax_with_validation(p_assignment_id     NUMBER,
255                                       p_person_id         NUMBER,
256                                       p_date              DATE,
257                                       p_business_group_id NUMBER,
258                                       p_return_code OUT nocopy   VARCHAR2,
259                                       p_from_form         VARCHAR2,
260                                       p_percent_time      NUMBER);
261 --
262 --------------------------Zero_out_time----------------------------------
263 /* Procedure to set % time in state to zero for all records, and then  */
264 /* the new work location can be set to 100 with update attribute       */
265 -------------------------------------------------------------------------
266 --
267 PROCEDURE zero_out_time(p_assignment_id     NUMBER);
268 --
269 END pay_us_emp_tax_rules_pkg;