DBA Data[Home] [Help]

PACKAGE: APPS.PAY_US_TAX_API

Source


1 PACKAGE pay_us_tax_api AS
2 /* $Header: pytaxapi.pkh 120.1 2005/10/02 02:34:32 aroussel $ */
3 /*#
4  * This package contains United States tax details maintenance APIs.
5  * @rep:scope public
6  * @rep:product per
7  * @rep:displayname Tax for United States
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------< correct_tax_percentage >-------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This business process is a public interface to allow correcting
17 --   of individual jurisdiction percentages.  This calls the internal process
18 --   maintain_tax_percentage with a datetrack mode of 'CORRECTION'.
19 --
20 -- Prerequisites:
21 --   Jurisdiction being corrected must already exist.
22 --
23 -- In Parameters:
24 --   Name              Reqd Type     Description
25 --   p_validate        Yes  boolean  Commit or Rollback
26 --                                   FALSE(default) or TRUE
27 --   p_assignment_id   Yes  number   current assignment id
28 --   p_effective_date  Yes  date     Session Date.
29 --   p_state_code      Yes  varchar2 Two digit state code
30 --   p_county_code     Yes  varchar2 Three digit county code
31 --   p_city_code       Yes  varchar2 Four digit city code
32 --   p_percentage      Yes  number   New percentage for jurisdiction
33 --
34 -- Post Success:
35 --   There are no output parameters.
36 --
37 -- Post Failure:
38 --   If an error occurs the percentage rate will not be updated and an error
39 --   message will be raised.
40 --
41 -- Access Status:
42 --   Public.
43 --
44 -- {End Of Comments}
45 --
46 --
47    procedure correct_tax_percentage
48                 (
49                  p_validate                  boolean default false
50                 ,p_assignment_id             number
51                 ,p_effective_date            date
52                 ,p_state_code                varchar2
53                 ,p_county_code               varchar2
54                 ,p_city_code                 varchar2
55                 ,p_percentage                number
56                );
57 --
58 -- ----------------------------------------------------------------------------
59 -- |-----------------------------< delete_tax_rule >--------------------------|
60 -- ----------------------------------------------------------------------------
61 --
62 -- {Start Of Comments}
63 /*#
64  * This API deletes a tax rule record for a state, city, or county for an
65  * employee assignment.
66  *
67  * The associated element entries for an employee assignment are also deleted.
68  * This API is licensed for use with Human Resources.
69  *
70  * <p><b>Licensing</b><br>
71  * This API is licensed for use with Human Resources.
72  *
73  * <p><b>Prerequisites</b><br>
74  * A valid tax rule record must exist on the effective date.
75  *
76  * <p><b>Post Success</b><br>
77  * The state, city, or county tax rule records will be successfully deleted.
78  *
79  * <p><b>Post Failure</b><br>
80  * The state, city, or county tax rule record will not be deleted and an error
81  * will be raised.
82  * @param p_validate If true, then validation alone will be performed and the
83  * database will remain unchanged. If false and all validation checks pass,
84  * then the database will be modified.
85  * @param p_assignment_id Identifies the assignment for which the tax rule
86  * record is deleted.
87  * @param p_state_code Two digit state code.
88  * @param p_county_code Three digit county code.
89  * @param p_city_code Four digit city code.
90  * @param p_effective_start_date If P_VALIDATE is false, then set to the
91  * effective start date for the deleted tax rule row which now exists as of the
92  * effective date. If p_validate is true or all row instances have been deleted
93  * then set to null.
94  * @param p_effective_end_date If P_VALIDATE is false, then set to the
95  * effective end date for the deleted tax rule row which now exists as of the
96  * effective date. If p_validate is true or all row instances have been deleted
97  * then set to null.
98  * @param p_object_version_number Current version number of the tax rule to be
99  * deleted.
100  * @param p_effective_date Determines when the DateTrack operation comes into
101  * force.
102  * @param p_datetrack_mode Indicates which DateTrack mode to use when deleting
103  * the record. You must set to either ZAP or DELETE. Modes available for use
104  * with a particular record depend on the dates of previous record changes and
105  * the effective date of this change.
106  * @param p_delete_routine Default Null, Not to be used via the API's
107  * @rep:displayname Delete Tax Rule
108  * @rep:category BUSINESS_ENTITY PAY_EMP_TAX_INFO
109  * @rep:scope public
110  * @rep:lifecycle active
111  * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
112 */
113 --
114 -- {End Of Comments}
115 --
116 procedure delete_tax_rule
117   (
118    p_validate                       in  boolean  default false
119   ,p_assignment_id                  in  number
120   ,p_state_code                     in  varchar2
121   ,p_county_code                    in  varchar2 default '000'
122   ,p_city_code                      in  varchar2 default '0000'
123   ,p_effective_start_date           out nocopy date
124   ,p_effective_end_date             out nocopy date
125   ,p_object_version_number          in out nocopy number
126   ,p_effective_date                 in  date
127   ,p_datetrack_mode                 in  varchar2 default 'ZAP'
128   ,p_delete_routine                 in  varchar2 default null
129   );
130 
131 -- ----------------------------------------------------------------------------
132 -- |-------------------------< submit_fed_w4 >--------------------------------|
133 -- ----------------------------------------------------------------------------
134 -- {Start Of Comments}
135 --
136 -- Description:
137 --  This procedure will process a federal W-4 form submission and update the tax tables,
138 --  store the transaciton in the statutory transaction tables, and create a workflow
139 --  process to notify all the parties involved.
140 --
141 -- Prerequisites:
142 --   Tax defaulting must have taken place.
143 --
144 -- In Parameters:
145 --   Name                       Reqd Type      Description/Valid Values
146 --   p_validate                 No   boolean   Rollback or Commit.
147 --                                             TRUE or FALSE.
148 --   p_person_id		Yes  number    if of person for whom form is being filed
149 --   p_effective_date           Yes  date      Session Date.
150 --   p_source_name	        Yes  varchar2  Source name i.e. "SELF_SERVICE","WINSTAR"
151 --
152 --   p_filing_status_code       Yes  varchar2  '01' - Single
153 --                                             '02' - Married
154 --                                             '03' - Married, w/hold at higher rate
155 --   p_withholding_allowances   Yes  number    0 to 999
156 --   p_fit_additional_tax       Yes  number    >=0
157 --   p_fit_exempt               Yes  varchar2  'Y' or 'N'
158 --
159 -- Post Success:
160 --   The tax record will be created.  Any states that should be defaulted
161 --   will be defaulted.  A workflow process will be created to notify the employee
162 --   that the form has been processed and a notification will be sent to the payroll
163 --   representative if the form requires reporting to the IRS.
164 --
165 --   If p_fit_exempt is set to yes, then the additional_tax and withholding_allowances
166 --   field are set to zero.
167 --
168 --   The following OUT parameters will be set, identifying the new federal tax row:
169 --
170 --   Name                       Type     Description
171 --   p_stat_trans_audit_id      number   PK of stat_trans_audit record
172 --
173 -- Post Failure:
174 --   The tax rules are not updated and an error will be raised.  If there is a workflow
175 --   error it gets handled through the workflow error mechanisms and is not raised by the api.
176 --
177 -- Access Status:
178 --   Public.
179 --
180 -- {End Of Comments}
181 --
182 procedure submit_fed_w4
183 (
184    p_validate                    IN     boolean    default false
185   ,p_person_id			 IN 	   number
186   ,p_effective_date              IN     date
187   ,p_source_name		 IN 	   varchar2
188   ,p_filing_status_code          IN     varchar2
189   ,p_withholding_allowances      IN     number
190   ,p_fit_additional_tax          IN     number
191   ,p_fit_exempt                  IN     varchar2
192   ,p_stat_trans_audit_id         OUT nocopy pay_stat_trans_audit.stat_trans_audit_id%TYPE
193  );
194 
195 -- ----------------------------------------------------------------------------
196 -- |-------------------------< chk_w4_allowed >-------------------------------|
197 -- ----------------------------------------------------------------------------
198 -- {Start Of Comments}
199 --
200 -- Description:
201 --  This function will verify that the employee can file a w4 electronically.
202 --  It ensures that the following are true:
203 --    The primary assignment is not a retiree assignment.
204 --    No assignments whose tax records will be updated have future dated changes.
205 --    Tax defaulting has occured for the primary assignment.
206 --    No tax records that will be updated have future dated changes.
207 --    No tax records that will be updated have a wa_reject_date set.
208 --    No tax records that will be updated have a override value set.
209 --    If a state w4, that the state is currently supported for w4 submissions.
210 --    If the transaction subtype = ONLINE_TAX_FORMS, that the update method profile
211 --    is not set to 'NONE'.
212 --
213 --  This procedure is called by submit_* procedures before they do any updating,
214 --  but is exposed so that the ability to submit can be tested independantly of
215 --  submission(useful for web pages to disable buttons, etc).
216 --
217 -- Prerequisites:
218 --
219 -- In Parameters:
220 --   Name                       Reqd Type      Description/Valid Values
221 --   p_person_id		Yes  number    person for whom form is being filed
222 --   p_effective_date           Yes  date      Session Date.
223 --   p_source_name      	Yes  varchar2  Source name (e.g. "WINSTAR")
224 --   p_state_code		No   varchar2  State code of submission
225 --						(default is federal)
226 --
227 -- Post Success:
228 --   null will be returned.
229 --
230 -- Post Failure:
231 --   the name of the message explaining the reason why updating can't occur will
232 --   be returned.
233 --
234 -- Access Status:
235 --   Public.
236 --
237 -- {End Of Comments}
238 --
239 function chk_w4_allowed
240 (
241    p_person_id			    IN 	   number
242   ,p_effective_date                 IN     date
243   ,p_source_name		    IN 	   varchar2
244   ,p_state_code			    IN     varchar2 DEFAULT null
245  ) return fnd_new_messages.message_name%TYPE;
246 --
247 
248 --
249 end pay_us_tax_api;