1 PACKAGE hr_au_tax_api AS
2 /* $Header: hrauwrtx.pkh 120.5.12010000.1 2008/07/28 03:06:06 appldev ship $ */
3 /*#
4 * This package contains tax APIs for Australia.
5 * @rep:scope public
6 * @rep:product per
7 * @rep:displayname Tax for Australia
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |--------------------------< maintain_paye_tax_info >----------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- {Start Of Comments}
15 /*#
16 * This API maintains PAYE Tax information for Australia.
17 *
18 * This API updates the element entries of Paye Tax element for the Australian
19 * legislation.
20 *
21 * <p><b>Licensing</b><br>
22 * This API is licensed for use with Human Resources.
23 *
24 * <p><b>Prerequisites</b><br>
25 * A valid business_group_id for Australian Legislation and if valid
26 * person_type_id is specified.A primary assignment must exist, a corresponding
27 * system type of 'APL', must be active and in the same business group as that
28 * of the applicant being created. If a person_type_id is not specified the API
29 * will use the DEFAULT 'APL' type for the business group
30 *
31 * <p><b>Post Success</b><br>
32 * The element entries of Paye Tax element will be successfully updated.
33 *
34 * <p><b>Post Failure</b><br>
35 * The API does not update the element entries of Paye Tax element and raises
36 * an error.
37 * @param p_validate If true, then validation alone will be performed and the
38 * database will remain unchanged. If false and all validation checks pass,
39 * then the database will be modified.
40 * @param p_assignment_id Identifies the assignment for which you create the
41 * tax information record.
42 * @param p_effective_start_date Passes the element entry effective start date
43 * for an existing Paye Tax element for an Assignment. If p_validate is false,
44 * then set to the Element entry effective start date of the tax information
45 * Element. If p_validate is true, then set to null.
46 * @param p_effective_end_date Passes the element entry effective end date for
47 * existing Paye Tax elements for an Assignment. If p_validate is false, then
48 * set to the Element entry effective end date of the tax information Element.
49 * If p_validate is true, then set to null.
50 * @param p_session_date Determines when the DateTrack operation takes effect.
51 * @param p_mode Indicates which DateTrack mode to use when updating the
52 * record. You must set the Date Track mode to either UPDATE, CORRECTION,
53 * UPDATE_OVERRIDE or UPDATE_CHANGE_INSERT. Modes available for use with a
54 * particular record depend on the dates of previous record changes and the
55 * effective date of this change.
56 * @param p_business_group_id Australia Business group in which the employee is
57 * present
58 * @param p_attribute_category This context value determines which flexfield
59 * structure to use with the descriptive flexfield segments.
60 * @param p_attribute1 Descriptive flexfield segment.
61 * @param p_attribute2 Descriptive flexfield segment.
62 * @param p_attribute3 Descriptive flexfield segment.
63 * @param p_attribute4 Descriptive flexfield segment.
64 * @param p_attribute5 Descriptive flexfield segment.
65 * @param p_attribute6 Descriptive flexfield segment.
66 * @param p_attribute7 Descriptive flexfield segment.
67 * @param p_attribute8 Descriptive flexfield segment.
68 * @param p_attribute9 Descriptive flexfield segment.
69 * @param p_attribute10 Descriptive flexfield segment.
70 * @param p_attribute11 Descriptive flexfield segment.
71 * @param p_attribute12 Descriptive flexfield segment.
72 * @param p_attribute13 Descriptive flexfield segment.
73 * @param p_attribute14 Descriptive flexfield segment.
74 * @param p_attribute15 Descriptive flexfield segment.
75 * @param p_attribute16 Descriptive flexfield segment.
76 * @param p_attribute17 Descriptive flexfield segment.
77 * @param p_attribute18 Descriptive flexfield segment.
78 * @param p_attribute19 Descriptive flexfield segment.
79 * @param p_attribute20 Descriptive flexfield segment.
80 * @param p_entry_information_category {@rep:casecolumn
81 * PAY_ELEMENT_ENTRIES_F.ENTRY_INFORMATION_CATEGORY}
82 * @param p_entry_information1 This field holds the current sysdate if no
83 * previous entry exists. Alternatively it holds the previous entries entry
84 * information1 value.
85 * @param p_australian_resident_flag Indicates if the employee is an Australian
86 * resident. Valid values are defined by the 'YES_NO' lookup type.
87 * @param p_tax_free_threshold_flag Indicates if the tax free threshold is
88 * applicable to the employee. Valid values are defined by the 'YES_NO' lookup
89 * type.
90 * @param p_rebate_amount Rebate amount.
91 * @param p_fta_claim_flag Indicates if a Family Tax Allowance claim applies to
92 * the employee. Valid values are defined by the 'YES_NO' lookup type.
93 * @param p_savings_rebate_flag Indicates if the employee is eligible for a
94 * savings rebate. Valid values are defined by the 'YES_NO' lookup type.
95 * @param p_help_sfss_flag Indicates if the employee has any HELP or SFSS as
96 * tax deductions. Valid values are defined by the 'YES_NO' lookup type.
97 * @param p_declaration_signed_date Indicates the date the declaration was
98 * signed by the employee.
99 * @param p_medicare_levy_variation_code Medicare levy variation code.Valid
100 * Values are defined by the 'AU_MED_LEV_VAR' lookup type.
101 * @param p_spouse_mls_flag Indicates if the employee's spouse has the Medicare
102 * Levy Surcharge as a tax deduction. Valid values are defined by the 'YES_NO'
103 * lookup type.
104 * @param p_dependent_children Indicates if the employee has any dependent
105 * children. Valid values are defined by the 'YES_NO' lookup type.
106 * @param p_tax_variation_type Tax variation type.Valid values are
107 * Percentage,Fixed amount,Exempt.
108 * @param p_tax_variation_amount Tax variation amount.
109 * @param p_tax_file_number Tax File Number.
110 * @param p_update_warning If p_validate is false,set to true if warnings
111 * occurred while processing the element entry.If p_validate is true,then the
112 * value will be null.
113 * @rep:displayname Maintain PAYE Tax Information for Australia
114 * @rep:category BUSINESS_ENTITY PAY_EMP_TAX_INFO
115 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
116 * @rep:scope public
117 * @rep:lifecycle active
118 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
119 */
120 --
121 -- {End Of Comments}
122 --
123 PROCEDURE maintain_PAYE_tax_info
124 (p_validate IN BOOLEAN DEFAULT FALSE
125 ,p_assignment_id IN NUMBER
126 ,p_effective_start_date IN OUT nocopy DATE
127 ,p_effective_end_date IN OUT nocopy DATE
128 ,p_session_date IN DATE
129 ,p_mode IN VARCHAR2
130 ,p_business_group_id IN NUMBER
131 ,p_attribute_category IN VARCHAR2 DEFAULT NULL
132 ,p_attribute1 IN VARCHAR2 DEFAULT NULL
133 ,p_attribute2 IN VARCHAR2 DEFAULT NULL
134 ,p_attribute3 IN VARCHAR2 DEFAULT NULL
135 ,p_attribute4 IN VARCHAR2 DEFAULT NULL
136 ,p_attribute5 IN VARCHAR2 DEFAULT NULL
137 ,p_attribute6 IN VARCHAR2 DEFAULT NULL
138 ,p_attribute7 IN VARCHAR2 DEFAULT NULL
139 ,p_attribute8 IN VARCHAR2 DEFAULT NULL
140 ,p_attribute9 IN VARCHAR2 DEFAULT NULL
141 ,p_attribute10 IN VARCHAR2 DEFAULT NULL
142 ,p_attribute11 IN VARCHAR2 DEFAULT NULL
143 ,p_attribute12 IN VARCHAR2 DEFAULT NULL
144 ,p_attribute13 IN VARCHAR2 DEFAULT NULL
145 ,p_attribute14 IN VARCHAR2 DEFAULT NULL
146 ,p_attribute15 IN VARCHAR2 DEFAULT NULL
147 ,p_attribute16 IN VARCHAR2 DEFAULT NULL
148 ,p_attribute17 IN VARCHAR2 DEFAULT NULL
149 ,p_attribute18 IN VARCHAR2 DEFAULT NULL
150 ,p_attribute19 IN VARCHAR2 DEFAULT NULL
151 ,p_attribute20 IN VARCHAR2 DEFAULT NULL
152 ,p_entry_information_category IN VARCHAR2 DEFAULT NULL
153 ,p_entry_information1 IN VARCHAR2 DEFAULT NULL
154 ,p_australian_resident_flag IN VARCHAR2
155 ,p_tax_free_threshold_flag IN VARCHAR2
156 ,p_rebate_amount IN NUMBER DEFAULT NULL
157 ,p_fta_claim_flag IN VARCHAR2
158 ,p_savings_rebate_flag IN VARCHAR2
159 ,p_help_sfss_flag IN VARCHAR2 /* Bug# 5258625*/
160 ,p_declaration_signed_date IN VARCHAR2
161 ,p_medicare_levy_variation_code IN VARCHAR2
162 ,p_spouse_mls_flag IN VARCHAR2
163 ,p_dependent_children IN VARCHAR2 DEFAULT NULL
164 ,p_tax_variation_type IN VARCHAR2
165 ,p_tax_variation_amount IN NUMBER DEFAULT NULL
166 ,p_tax_file_number IN VARCHAR2
167 ,p_update_warning OUT nocopy BOOLEAN
168 ) ;
169 --
170 -- ----------------------------------------------------------------------------
171 -- |---------------------------< maintain_super_info >------------------------|
172 -- ----------------------------------------------------------------------------
173 --
174 -- {Start Of Comments}
175 /*#
176 * This API maintains Superannuation information for Australia.
177 *
178 * This API updates the element entries of Superannuation element.
179 *
180 * <p><b>Licensing</b><br>
181 * This API is licensed for use with Human Resources.
182 *
183 * <p><b>Prerequisites</b><br>
184 * A valid business_group_id for Australian Legislation and if valid
185 * person_type_id is specified, a corresponding system type of 'APL', must be
186 * active and in the same business group as that of the applicant being
187 * created. If a person_type_id is not specified the API will use the DEFAULT
188 * 'APL' type for the business group
189 *
190 * <p><b>Post Success</b><br>
191 * The element entries of Superannuation Tax element will be successfully
192 * updated.
193 *
194 * <p><b>Post Failure</b><br>
195 * The API does not update the element entries of Superannuation element and
196 * raises an error.
197 * @param p_validate If true, then validation alone will be performed and the
198 * database will remain unchanged. If false and all validation checks pass,
199 * then the database will be modified.
200 * @param p_assignment_id Identifies the assignment for which you create the
201 * tax information record.
202 * @param p_effective_start_date Pass the element entry effective start date
203 * for existing Superannuation Tax elements for the assignment. If p_validate
204 * is false, then set to the effective start date on the tax information row
205 * which now exists as of the effective date. If p_validate is true, then set
206 * to null.
207 * @param p_effective_end_date Passes the element entry effective end date for
208 * existing Superannuation Tax elements for the assignment. If p_validate is
209 * false, then set to the effective end date for the tax information. If
210 * p_validate is true, then set to null.
211 * @param p_session_date Determines when the DateTrack operation takes effect.
212 * @param p_mode Indicates which DateTrack mode to use when updating the
213 * record. You must set the Date Track mode to either UPDATE, CORRECTION,
214 * UPDATE_OVERRIDE or UPDATE_CHANGE_INSERT. Modes available for use with a
215 * particular record depend on the dates of previous record changes and the
216 * effective date of this change.
217 * @param p_business_group_id Australia Business group in which the employee is
218 * present
219 * @param p_attribute_category This context value determines which flexfield
220 * structure to use with the descriptive flexfield segments.
221 * @param p_attribute1 Descriptive flexfield segment.
222 * @param p_attribute2 Descriptive flexfield segment.
223 * @param p_attribute3 Descriptive flexfield segment.
224 * @param p_attribute4 Descriptive flexfield segment.
225 * @param p_attribute5 Descriptive flexfield segment.
226 * @param p_attribute6 Descriptive flexfield segment.
227 * @param p_attribute7 Descriptive flexfield segment.
228 * @param p_attribute8 Descriptive flexfield segment.
229 * @param p_attribute9 Descriptive flexfield segment.
230 * @param p_attribute10 Descriptive flexfield segment.
231 * @param p_attribute11 Descriptive flexfield segment.
232 * @param p_attribute12 Descriptive flexfield segment.
233 * @param p_attribute13 Descriptive flexfield segment.
234 * @param p_attribute14 Descriptive flexfield segment.
235 * @param p_attribute15 Descriptive flexfield segment.
236 * @param p_attribute16 Descriptive flexfield segment.
237 * @param p_attribute17 Descriptive flexfield segment.
238 * @param p_attribute18 Descriptive flexfield segment.
239 * @param p_attribute19 Descriptive flexfield segment.
240 * @param p_attribute20 Descriptive flexfield segment.
241 * @param p_tfn_for_super_flag Indicates the Tax File Number for Superannuation
242 * Contributions. Valid values are defined by the 'YES_NO' lookup type.
243 * @param p_update_warning If p_validate is false,set to true if warnings
244 * occurred while processing the element entry.If p_validate is true,then the
245 * value will be null.
246 * @rep:displayname Maintain Superannuation Information for Australia
247 * @rep:category BUSINESS_ENTITY PAY_EMP_TAX_INFO
248 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
249 * @rep:scope public
250 * @rep:lifecycle active
251 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
252 */
253 --
254 -- {End Of Comments}
255 --
256 PROCEDURE maintain_SUPER_info
257 (p_validate IN BOOLEAN DEFAULT FALSE
258 ,p_assignment_id IN NUMBER
259 ,p_effective_start_date IN OUT nocopy DATE
260 ,p_effective_end_date IN OUT nocopy DATE
261 ,p_session_date IN DATE
262 ,p_mode IN VARCHAR2
263 ,p_business_group_id IN NUMBER
264 ,p_attribute_category IN VARCHAR2 DEFAULT NULL
265 ,p_attribute1 IN VARCHAR2 DEFAULT NULL
266 ,p_attribute2 IN VARCHAR2 DEFAULT NULL
267 ,p_attribute3 IN VARCHAR2 DEFAULT NULL
268 ,p_attribute4 IN VARCHAR2 DEFAULT NULL
269 ,p_attribute5 IN VARCHAR2 DEFAULT NULL
270 ,p_attribute6 IN VARCHAR2 DEFAULT NULL
271 ,p_attribute7 IN VARCHAR2 DEFAULT NULL
272 ,p_attribute8 IN VARCHAR2 DEFAULT NULL
273 ,p_attribute9 IN VARCHAR2 DEFAULT NULL
274 ,p_attribute10 IN VARCHAR2 DEFAULT NULL
275 ,p_attribute11 IN VARCHAR2 DEFAULT NULL
276 ,p_attribute12 IN VARCHAR2 DEFAULT NULL
277 ,p_attribute13 IN VARCHAR2 DEFAULT NULL
278 ,p_attribute14 IN VARCHAR2 DEFAULT NULL
279 ,p_attribute15 IN VARCHAR2 DEFAULT NULL
280 ,p_attribute16 IN VARCHAR2 DEFAULT NULL
281 ,p_attribute17 IN VARCHAR2 DEFAULT NULL
282 ,p_attribute18 IN VARCHAR2 DEFAULT NULL
283 ,p_attribute19 IN VARCHAR2 DEFAULT NULL
284 ,p_attribute20 IN VARCHAR2 DEFAULT NULL
285 ,p_tfn_for_super_flag IN VARCHAR2 DEFAULT NULL
286 ,p_update_warning OUT nocopy BOOLEAN
287 ) ;
288
289
290 FUNCTION tax_scale
291 (p_tax_file_number IN VARCHAR2
292 ,p_australian_resident_flag IN VARCHAR2
293 ,p_tax_free_threshold_flag IN VARCHAR2
294 ,p_lev_lod_flg IN VARCHAR2
295 ,p_medicare_levy_variation_code IN VARCHAR2
296 ,p_tax_variation_type IN VARCHAR2
297 )
298 RETURN INTEGER;
299
300 PROCEDURE Validate_TFN
301 (p_tax_file_number IN VARCHAR2
302 );
303
304 procedure create_paye_tax_info
305 (p_validate in boolean default false
306 ,p_effective_date in date
307 ,p_business_group_id in number
308 ,p_original_entry_id in number default null
309 ,p_assignment_id in number
310 ,p_entry_type in varchar2
311 ,p_cost_allocation_keyflex_id in number default null
312 ,p_updating_action_id in number default null
313 ,p_comment_id in number default null
314 ,p_reason in varchar2 default null
315 ,p_target_entry_id in number default null
316 ,p_subpriority in number default null
317 ,p_date_earned in date default null
318 ,p_attribute_category in varchar2 default null
319 ,p_attribute1 in varchar2 default null
320 ,p_attribute2 in varchar2 default null
321 ,p_attribute3 in varchar2 default null
322 ,p_attribute4 in varchar2 default null
323 ,p_attribute5 in varchar2 default null
324 ,p_attribute6 in varchar2 default null
325 ,p_attribute7 in varchar2 default null
326 ,p_attribute8 in varchar2 default null
327 ,p_attribute9 in varchar2 default null
328 ,p_attribute10 in varchar2 default null
329 ,p_attribute11 in varchar2 default null
330 ,p_attribute12 in varchar2 default null
331 ,p_attribute13 in varchar2 default null
332 ,p_attribute14 in varchar2 default null
333 ,p_attribute15 in varchar2 default null
334 ,p_attribute16 in varchar2 default null
335 ,p_attribute17 in varchar2 default null
336 ,p_attribute18 in varchar2 default null
337 ,p_attribute19 in varchar2 default null
338 ,p_attribute20 in varchar2 default null
339 ,p_australian_resident_flag in varchar2
340 ,p_tax_free_threshold_flag in varchar2
341 ,p_rebate_amount in number default null
342 ,p_fta_claim_flag in varchar2
343 ,p_savings_rebate_flag in varchar2
344 ,p_hecs_sfss_flag in varchar2
348 ,p_dependent_children in varchar2 default null
345 ,p_declaration_signed_date in varchar2
346 ,p_medicare_levy_variation_code in varchar2
347 ,p_spouse_mls_flag in varchar2
349 ,p_tax_variation_type in varchar2
350 ,p_tax_variation_amount in number default null
351 ,p_tax_file_number in varchar2
352 ,p_effective_start_date out nocopy date
353 ,p_effective_end_date out nocopy date
354 ,p_element_entry_id out nocopy number
355 ,p_object_version_number out nocopy number
356 ,p_create_warning out nocopy boolean
357 );
358
359 -- ----------------------------------------------------------------------------
360 -- |--------------------------< update_adi_tax_crp >----------------------|
361 -- ----------------------------------------------------------------------------
362 --
363 -- {Start Of Comments}
364 /*#
365 * This API creates Tax information for Australia for use by Web ADI in the HRMS
366 * Configuration Workbench CRP section. It updates the element entry for the Tax Information
367 * element for the Australian legislation, along with updating Assignment
368 * information for the given assignment.
369 *
370 * <p><b>Licensing</b><br>
371 * This API is licensed for use with Human Resources.
372 *
373 * <p><b>Prerequisites</b><br>
374 * A valid business_group_id for Australian Legislation and if valid
375 * person_type_id is specified. An Employee with a primary assignment must exist and be active
376 * in the same business group as that of the Tax Information being created.
377 *
378 * <p><b>Post Success</b><br>
379 * The element entries of Tax Information element will be successfully updated and
380 * Assignment information successfully updated.
381 *
382 * <p><b>Post Failure</b><br>
383 * The API does not update the element entries of Tax Information element and raises
384 * an error.
385 * @param p_validate If true, then validation alone will be performed and the
386 * database will remain unchanged. If false and all validation checks pass,
387 * then the database will be modified.
388 * @param p_assignment_id Identifies the assignment for which you create the
389 * tax information record.
390 * @param p_effective_date Effective date of information.
391 * @param p_hire_date Date when the Employee was hired. Used as effective date.
392 * @param p_business_group_id Australia Business group in which the employee is
393 * present
394 * @param p_payroll_id Indicates the payroll the Employee's primary assignment belongs to
395 * @param p_legal_employer Indicated the Legal Employer Employee's primary assignment belongs to
396 * @param p_leave_loading Indicates if Leave Loading is paid to the
397 * Employee. This is a factor when the Tax scale is calculated. Valid values
398 * are defined by the 'YES_NO' lookup type.
399 * @param p_basis_of_payment Valid values are Full Time Payees,Part Time Payee, Casual Payee
400 * @param p_australian_resident Indicates if the employee is an Australian
401 * resident. Valid values are defined by the 'YES_NO' lookup type.
402 * @param p_tax_free_threshold Indicates if the tax free threshold is
403 * applicable to the employee. Valid values are defined by the 'YES_NO' lookup
404 * type.
405 * @param p_rebate_amount Rebate amount.
406 * @param p_ftb_claim Indicates if a Family Tax Allowance claim applies to
407 * the employee. Valid values are defined by the 'YES_NO' lookup type.
408 * @param p_savings_rebate Indicates if the employee is eligible for a
409 * savings rebate. Valid values are defined by the 'YES_NO' lookup type.
410 * @param p_hecs Indicates if the employee has any HECS as a
411 * tax deduction. Valid values are defined by the 'YES_NO' lookup type.
412 * @param p_sfss Indicates if the employee has any SFSS as a tax deduction.
413 * Valid values are defined by the 'YES_NO' lookup type.
414 * @param p_declaration_signed_date Indicates the date the declaration was
415 * signed by the employee.
416 * @param p_medicare_levy_exemption Medicare levy exemption code.Valid
417 * values are defined by the 'AU_MED_LEV_VAR' lookup type.
418 * @param p_medicare_levy_spouse Indicates if the employee has a spouse
419 * @param p_medicare_levy_surcharge Indicates if the employee's spouse has the Medicare
420 * Levy Surcharge as a tax deduction. Valid values are defined by the 'YES_NO'
421 * lookup type.
422 * @param p_medicare_levy_dep_children Indicates if the employee has any dependent
423 * children.
424 * @param p_tax_variation_type Tax variation type.Valid values are
425 * Percentage,Fixed amount,Exempt,None.
426 * @param p_tax_variation_amount Tax variation amount.
427 * @param p_tax_variation_bonus Tax variation on Bonus. Valid values 'Yes','No'.
428 * @param p_tax_file_number Tax File Number.
429 * @param p_senior_australian Indicates if the Employee is a senior citizen.
430 * @rep:displayname Create Tax Information for Australia
431 * @rep:category BUSINESS_ENTITY PAY_EMP_TAX_INFO
432 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
433 * @rep:scope public
434 * @rep:lifecycle active
435 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
436 */
437 --
438 -- {End Of Comments}
439 procedure update_adi_tax_crp
440 (p_validate in boolean default false
441 ,p_assignment_id in number
442 ,p_hire_date in date
443 ,p_business_group_id in number
444 ,p_payroll_id in number
445 ,p_legal_employer in varchar2
446 ,p_tax_file_number in varchar2
447 ,p_tax_free_threshold in varchar2
448 ,p_australian_resident in varchar2
449 ,p_hecs in varchar2
450 ,p_sfss in varchar2
451 ,p_leave_loading in varchar2
452 ,p_basis_of_payment in varchar2
453 ,p_declaration_signed_date in varchar2
454 ,p_medicare_levy_surcharge in varchar2
455 ,p_medicare_levy_exemption in varchar2
456 ,p_medicare_levy_dep_children in varchar2 default null
457 ,p_medicare_levy_spouse in varchar2
458 ,p_tax_variation_type in varchar2
459 ,p_tax_variation_amount in number default null
460 ,p_tax_variation_bonus in varchar2
461 ,p_rebate_amount in number default null
462 ,p_savings_rebate in varchar2
463 ,p_ftb_claim in varchar2
464 ,p_senior_australian in varchar2
465 ,p_effective_date in date default null
466 );
467
468 END hr_au_tax_api ;