1 Package pay_pl_paye_api as
2 /* $Header: pyppdapi.pkh 120.4 2006/04/24 23:22:43 nprasath noship $ */
3 /*#
4 * This package contains Tax APIs for Poland.
5 * @rep:scope public
6 * @rep:product PER
7 * @rep:displayname Tax for Poland
8 */
9
10 --
11 -- ----------------------------------------------------------------------------
12 -- |-------------------------< create_pl_paye_details >-------------------------|
13 -- ----------------------------------------------------------------------------
14 -- {Start Of Comments}
15 --
16 -- Description:
17 -- This API creates a PAYE record for a Polish employee.
18
19 -- Prerequisites:
20 -- The Assignment/Person (p_per_or_asg_id) record must exist as of the effective
21 -- date (p_effective_date)
22 --
23 -- In Parameters:
24 -- Name Reqd Type Description
25 -- p_validate boolean If true, the database remains
26 -- unchanged. If false a valid
27 -- PAYE record is create in
28 -- the database.
29 -- p_effective_date Yes date The effective start date of the
30 -- PAYE
31 -- p_contract_category Yes varchar2 Contract Category for whom the
32 -- PAYE record applies
33 -- p_per_or_asg_id Yes number The Person/Assignment to whom
34 -- the PAYE record applies. If the
35 -- Contract Category is "CIVIL" then
36 -- this refers to the Person id. If
37 -- the Contract Category is "NORMAL"
38 -- then this refers to the Assignment
39 -- Id.
40 -- p_business_group_id Yes number The Employee's Business group
41 -- p_tax_reduction Yes varchar2 Employee Tax Reduction
42 -- Information.This field should be null
43 -- for Contract Category 'CIVIL'.
44 -- p_tax_calc_with_spouse_child Yes varchar2 Tax Calculation with Spouse or Child
45 -- Information.This field should be null
46 -- for Contract Category 'CIVIL'.
47 -- p_income_reduction Yes varchar2 Income Reduction Information
48 -- This field is for Normal Contract only.
49 -- p_income_reduction_amount No Number Income reduction amount
50 -- Information.This field should be null
51 -- for Contract Category 'NORMAL'.
52 -- p_rate_of_tax Yes varchar2 Rate of Tax
53 -- Information
54 --
55 -- Post Success:
56 -- The API sets the following out parameters
57 --
58 -- Name Type Description
59 -- p_paye_details_id number Unique ID for the PAYE record created by
60 -- the API
61 -- p_object_version_number number Version number of the new PAYE record
62 -- p_effective_start_date date The effective start date for this
63 -- change
64 -- p_effective_end_date date The effective start date for this
65 -- change
66 -- p_effective_date_warning boolean Set to TRUE if the effective date has
67 -- has been reset to the Employee's/
68 -- Assignment's start date
69
70 -- Post Failure:
71 -- The API will not create the PAYE record and raises an error.
72 --
73 -- Access Status:
74 -- For Internal Development use only.
75 --
76 -- {End Of Comments}
77 --
78 procedure create_pl_paye_details
79 (p_validate in boolean default false
80 ,p_effective_date in date
81 ,p_contract_category in varchar2
82 ,p_per_or_asg_id in number
83 ,p_business_group_id in number
84 ,p_tax_reduction in varchar2
85 ,p_tax_calc_with_spouse_child in varchar2
86 ,p_income_reduction in varchar2
87 ,p_income_reduction_amount in number default null
88 ,p_rate_of_tax in varchar2
89 ,p_paye_details_id out nocopy number
90 ,p_object_version_number out nocopy number
91 ,p_effective_start_date out nocopy date
92 ,p_effective_end_date out nocopy date
93 ,p_effective_date_warning out nocopy boolean
94 );
95 --
96 --
97 -- ----------------------------------------------------------------------------
98 -- |-------------------------< update_pl_paye_details >-----------------------|
99 -- ----------------------------------------------------------------------------
100 -- {Start Of Comments}
101 --
102 /*#
103 * This API updates the tax record of a Polish employee.
104 *
105 * <p><b>Licensing</b><br>
106 * This API is licensed for use with Human Resources.
107 *
108 * <p><b>Prerequisites</b><br>
109 * The tax record (p_paye_details_id) must
110 * exist as of the effective date of the update (p_effective_date).
111 *
112 * <p><b> Post Success</b><br>
113 * The API updates the tax record.
114 *
115 * <p><b> Post Failure</b><br>
116 * The API does not update the tax record and raises an error.
117 *
118 * @param p_validate If true, the database remains unchanged. If false,
119 * tax record is updated in the database.
120 * @param p_effective_date Determines when the datetrack operation comes into
121 * force
122 * @param p_datetrack_update_mode Indicates which datetrack mode to use when
123 * updating the record. You must set to either UPDATE, CORRECTION,
124 * UPDATE_OVERRIDE or UPDATE_CHANGE_INSERT. Modes available for use with a
125 * particular record depend on the dates of previous record changes and the
126 * effective date of this change.
127 * @param p_paye_details_id Identifies the tax record to be updated
128 * @param p_object_version_number Pass in the version number of the tax record
129 * to be updated. When the API completes, if p_validate is false, will be set
130 * to the new version number of the updated tax record. If p_validate is true
131 * will be set to the same value which was passed in.
132 * @param p_tax_reduction Employee tax reduction information.
133 * This field should be null for contract category civil,
134 * lump sum and foreign lump sum .Valid values are defined
135 * by 'PL_TAX_REDUCTION' lookup type
136 * @param p_tax_calc_with_spouse_child Tax calculation with spouse or child,
137 * this field should be null for contract category civil,
138 * lump sum and foreign lump sum.Valid values are defined by 'YES_NO'
139 * lookup type.
140 * @param p_income_reduction Income reduction information. This field is for
141 * normal contract only.Valid values are defined by 'PL_INCOME_REDUCTION'
142 * lookup type.
143 * @param p_income_reduction_amount Income reduction amount information.This
144 * field should be null for normal contracts.
145 * @param p_rate_of_tax Rate of tax information .Valid values are defined
146 * by 'PL_NORMAL_RATE_OF_TAX' lookup type for normal contract ,
147 * by 'PL_NORMAL_RATE_OF_TAX' for civil contracts, by globals or
148 * values 0 to 100 for lump sum and foreign lump sum contracts.
149 * @param p_effective_start_date If p_validate is false, then set to the start
150 * date for this updated tax record which exists as of the effective date.If
151 * p_validate is true, then set to null
152 * @param p_effective_end_date If p_validate is false, then set to the end date
153 * for this updated tax record which exists as of the effective date.
154 * @rep:displayname Update Tax record of Polish employee.
155 * @rep:category BUSINESS_ENTITY PAY_EMP_TAX_INFO
156 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
157 * @rep:lifecycle active
158 * @rep:scope public
159 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
160 */
161 --
162 -- {End Of Comments}
163 --
164 procedure update_pl_paye_details
165 (p_validate in boolean default false
166 ,p_effective_date in date
167 ,p_datetrack_update_mode in varchar2
168 ,p_paye_details_id in number
169 ,p_object_version_number in out nocopy number
170 ,p_tax_reduction in varchar2 default hr_api.g_varchar2
171 ,p_tax_calc_with_spouse_child in varchar2 default hr_api.g_varchar2
172 ,p_income_reduction in varchar2 default hr_api.g_varchar2
173 ,p_income_reduction_amount in number default hr_api.g_number
174 ,p_rate_of_tax in varchar2 default hr_api.g_varchar2
175 ,p_effective_start_date out nocopy date
176 ,p_effective_end_date out nocopy date
177 );
178 --
179 --
180
181 -- ----------------------------------------------------------------------------
182 -- |-------------------------< delete_pl_paye_details >------------------------|
183 -- ----------------------------------------------------------------------------
184 -- {Start Of Comments}
185 --
186 /*#
187 * This API deletes the tax record of a Polish Employee.
188 *
189 * <p><b>Licensing</b><br>
190 * This API is licensed for use with Human Resources.
191 *
192 * <p><b>Prerequisites</b><br>
193 * The tax record (p_paye_details_id) must
194 * exist as of the effective date of the delete (p_effective_date).
195 *
196 * <p><b> Post Success</b><br>
197 * The API deletes tax record.
198 *
199 * <p><b> Post Failure</b><br>
200 * The API does not delete the tax record and raises an error.
201 *
202 * @param p_validate If true, the database remains unchanged. If false,
203 * tax record is updated in the database.
204 * @param p_effective_date Determines when the datetrack operation comes into
205 * force
206 * @param p_datetrack_delete_mode Indicates which datetrack mode to use when
207 * deleting the record.You must set to either ZAP, DELETE, FUTURE_CHANGE
208 * or DELETE_NEXT_CHANGE. Modes available for use with a particular record
209 * depend on the dates of previous record changes and the effective date of
210 * this change.
211 * @param p_paye_details_id ID of the tax record
212 * @param p_object_version_number Pass in the version number of the tax record
213 * to be deleted. When the API completes, if p_validate is false, will be set
214 * to the new version number of the deleted tax record. If p_validate is true
215 * will be set to the same value which was passed in.
216 * @param p_effective_start_date If p_validate is false, then set to the start
217 * date for this deleted tax record which exists as of the effective date.If
218 * p_validate is true, then set to null
219 * @param p_effective_end_date If p_validate is false, then set to the end date
220 * for this deleted tax record which exists as of the effective date.
221 * @rep:displayname Delete Tax record of Polish employee.
222 * @rep:category BUSINESS_ENTITY PAY_EMP_TAX_INFO
223 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
224 * @rep:lifecycle active
225 * @rep:scope public
226 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
227 */
228 --
229 -- {End Of Comments}
230 --
231 procedure delete_pl_paye_details
232 (p_validate in boolean default false
233 ,p_effective_date in date
234 ,p_datetrack_delete_mode in varchar2
235 ,p_paye_details_id in number
236 ,p_object_version_number in out nocopy number
237 ,p_effective_start_date out nocopy date
238 ,p_effective_end_date out nocopy date
239 );
240 --
241 -- ----------------------------------------------------------------------------
242 -- |-------------------------< create_pl_civil_paye_details >------------------|
243 -- ----------------------------------------------------------------------------
244 -- {Start Of Comments}
245 --
246
247 /*#
248 * This API creates tax record for a Polish employee with civil contract.
249 * User hook for this module should be placed against create_pl_paye_details
250 * module
251 * <p><b>Licensing</b><br>
252 * This API is licensed for use with Human Resources.
253 *
254 * <p><b>Prerequisites</b><br>
255 * The Assignment(p_assignment_id) record must exist
256 * as of the effective date (p_effective_date)
257 *
258 * <p><b> Post Success</b><br>
259 * The API creates a tax record.
260 *
261 * <p><b> Post Failure</b><br>
262 * The API does not create tax record and raises an error.
263 *
264 * @param p_validate If true, then validation alone will be performed and the
265 * database will remain unchanged. If false and all validation checks pass,
266 * then the database will be modified.
267 * @param p_effective_date Determines when the DateTrack operation comes into
268 * force.
269 * @param p_contract_category Contract category for whom the tax record
270 * applies. Valid values are defined by 'PL_CONTRACT_CATEGORY' lookup type.
271 * @param p_assignment_id The assignment to whom the tax record applies.
272 * @param p_income_reduction_amount Income reduction amount information
273 * @param p_rate_of_tax Rate of tax information . Valid values are defined
274 * by 'PL_CIVIL_RATE_OF_TAX' lookup type
275 * @param p_paye_details_id Unique id for the tax record created by the API
276 * @param p_object_version_number If p_validate is false, then set to the
277 * version number of the created assignment. If p_validate is true, then the
278 * value will be null.
279 * @param p_effective_start_date If p_validate is false, then set to the
280 * earliest effective start date for the created tax record. If p_validate is
281 * true, then set to null.
282 * @param p_effective_end_date If p_validate is false, then set to the
283 * effective end date for the created tax record. If p_validate is true, then
284 * set to null.
285 * @param p_effective_date_warning Set to TRUE if the effective date
286 * has has been reset to the date when assignment became a civil contract
287 * @rep:displayname Create Tax record for civil contract.
288 * @rep:category BUSINESS_ENTITY PAY_EMP_TAX_INFO
289 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
290 * @rep:lifecycle active
291 * @rep:scope public
292 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
293 */
294 --
295 -- {End Of Comments}
296 procedure create_pl_civil_paye_details
297 (p_validate in boolean default false
298 ,p_effective_date in date
299 ,p_contract_category in varchar2 default 'CIVIL'
300 ,p_assignment_id in number
301 ,p_income_reduction_amount in number default null
302 ,p_rate_of_tax in varchar2 default 'C01'
303 ,p_paye_details_id out nocopy number
304 ,p_object_version_number out nocopy number
305 ,p_effective_start_date out nocopy date
306 ,p_effective_end_date out nocopy date
307 ,p_effective_date_warning out nocopy boolean);
308
309 --
310 -- ----------------------------------------------------------------------------
311 -- |-------------------------< create_pl_Normal_paye_details >-----------------|
312 -- ----------------------------------------------------------------------------
313 -- {Start Of Comments}
314 --
315 /*#
316 * This API creates a tax record for a Polish employee with normal
317 * contract category.
318 *
319 * User hook for this module should be placed against create_pl_paye_details module.
320 *
321 * <p><b>Licensing</b><br>
322 * This API is licensed for use with Human Resources.
323 *
324 * <p><b>Prerequisites</b><br>
325 * The Person (p_person_id) record must exist as of the effective
326 * date (p_effective_date)
327 *
328 * <p><b>Post Success</b><br>
329 * A new tax record is created for the employee.
330 *
331 * <p><b>Post Failure</b><br>
332 * The API does not create tax record and raises an error.
333 *
334 * @param p_validate If true, then validation alone will be performed and the
335 * database will remain unchanged. If false and all validation checks pass,
336 * then the database will be modified.
337 * @param p_effective_date Determines when the datetrack operation comes into
338 * force.
339 * @param p_contract_category contract category for whom the tax record applies.
340 * Valid values are defined by 'PL_CONTRACT_CATEGORY' lookup type.
341 * @param p_person_id The Person to whom the tax record applies.
342 * @param p_tax_reduction Employee tax reduction information.
343 * Valid values are defined by 'PL_TAX_REDUCTION' lookup type.
344 * @param p_tax_calc_with_spouse_child Tax calculation with spouse or child
345 * Valid values are defined by 'YES_NO' lookup type.
346 * @param p_income_reduction Income reduction information
347 * @param p_rate_of_tax Rate of tax information .Valid values are defined
348 * by 'PL_NORMAL_RATE_OF_TAX' lookup type
349 * @param p_paye_details_id Unique id for the tax record created by the API
350 * @param p_object_version_number If p_validate is false, then set to the
351 * version number of the created tax record. If p_validate is true, then the
352 * value will be null.
353 * @param p_effective_start_date If p_validate is false, then set to the
354 * earliest effective start date for the created tax record. If p_validate is
355 * true, then set to null.
356 * @param p_effective_end_date If p_validate is false, then set to the
357 * effective end date for the created tax record. If p_validate is true, then
358 * set to null.
359 * @param p_effective_date_warning Set to TRUE if the effective date
360 * has has been reset to the Employee's start date
361 * @rep:displayname Create Tax record for normal contract.
362 * @rep:category BUSINESS_ENTITY PAY_EMP_TAX_INFO
363 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
364 * @rep:lifecycle active
365 * @rep:scope public
366 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
367 */
368 --
369 -- {End Of Comments}
370 --
371 procedure create_pl_normal_paye_details
372 (p_validate in boolean default false
373 ,p_effective_date in date
374 ,p_contract_category in varchar2 default 'NORMAL'
375 ,p_person_id in number
376 ,p_tax_reduction in varchar2 default 'NOTAX'
377 ,p_tax_calc_with_spouse_child in varchar2 default 'N'
378 ,p_income_reduction in varchar2 default 'N01'
379 ,p_rate_of_tax in varchar2 default 'N01'
380 ,p_paye_details_id out nocopy number
381 ,p_object_version_number out nocopy number
382 ,p_effective_start_date out nocopy date
383 ,p_effective_end_date out nocopy date
384 ,p_effective_date_warning out nocopy boolean
385 );
386 --
387 -- ----------------------------------------------------------------------------
388 -- |-------------------------< create_pl_lump_paye_details >------------------|
389 -- ----------------------------------------------------------------------------
390 -- {Start Of Comments}
391 --
392 /*#
393 * This API creates a tax record for a polish employee with
394 * lump sum cntract category.
395 * User hook for this module should be placed
396 * against create_pl_paye_details module.
397 *
398 * <p><b>Licensing</b><br>
399 * This API is licensed for use with Human Resources.
400 *
401 * <p><b>Prerequisites</b><br>
402 * The Assignment (p_assignment_id) record must exist as of the effective
403 * date (p_effective_date)
404 *
405 * <p><b>Post Success</b><br>
406 * A new tax record is created for the employee.
407 *
408 * <p><b>Post Failure</b><br>
409 * The API does not create tax record and raises an error.
410 *
411 * @param p_validate If true, then validation alone will be performed and the
412 * database will remain unchanged. If false and all validation checks pass,
413 * then the database will be modified.
414 * @param p_effective_date Determines when the datetrack operation comes into
415 * force.
416 * @param p_contract_category contract category for whom the tax record applies.
417 * Valid values are defined by the 'PL_CONTRACT_CATEGORY' lookup type.
418 * @param p_assignment_id The assignment to whom the record applies
419 * @param p_rate_of_tax Rate of tax information.Valid values are defined
420 * by globals 'PL_TAX_LUMP_FIRST' ,'PL_TAX_LUMP_SECOND','PL_TAX_LUMP_THIRD' or
421 * values between 0 and 100.
422 * @param p_paye_details_id Unique id for the tax record created by the API
423 * @param p_object_version_number If p_validate is false, then set to the
424 * version number of the created tax record. If p_validate is true, then the
425 * value will be null.
426 * @param p_effective_start_date If p_validate is false, then set to the
427 * earliest effective start date for the created tax record. If p_validate is
428 * true, then set to null.
429 * @param p_effective_end_date If p_validate is false, then set to the
430 * effective end date for the created tax record. If p_validate is true, then
431 * set to null.
432 * @param p_effective_date_warning Set to true if the effective date has
433 * has been reset to the date when the assignment first became lump sum contract
434 * @rep:displayname Create Tax record for lump sum contract.
435 * @rep:category BUSINESS_ENTITY PAY_EMP_TAX_INFO
436 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
437 * @rep:lifecycle active
438 * @rep:scope public
439 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
440 */
441 --
442 -- {End Of Comments}
443 procedure create_pl_lump_paye_details
444 (p_validate in boolean default false
445 ,p_effective_date in date
446 ,p_contract_category in varchar2 default 'LUMP'
447 ,p_assignment_id in number
448 ,p_rate_of_tax in varchar2
449 ,p_paye_details_id out nocopy number
450 ,p_object_version_number out nocopy number
454
451 ,p_effective_start_date out nocopy date
452 ,p_effective_end_date out nocopy date
453 ,p_effective_date_warning out nocopy boolean);
455 --
456 -- ----------------------------------------------------------------------------
457 -- |-------------------------< create_pl_f_lump_paye_details >------------------|
458 -- ----------------------------------------------------------------------------
459 -- {Start Of Comments}
460 --
461 /*#
462 * This API creates a tax record for a Polish employee with
463 * foreign lump sum contract category.
464 * User hook for this module should be placed
465 * against create_pl_paye_details module.
466 *
467 * <p><b>Licensing</b><br>
468 * This API is licensed for use with Human Resources.
469 *
470 * <p><b>Prerequisites</b><br>
471 * The Assignment (p_assignment_id) record must exist as of the effective
472 * date (p_effective_date)
473 *
474 * <p><b>Post Success</b><br>
475 * A new tax record is created for the employee.
476 *
477 * <p><b>Post Failure</b><br>
478 * The API does not create tax record and raises an error.
479 *
480 * @param p_validate If true, then validation alone will be performed and the
481 * database will remain unchanged. If false and all validation checks pass,
482 * then the database will be modified.
483 * @param p_effective_date Determines when the datetrack operation comes into
484 * force.
485 * @param p_contract_category contract category for whom the tax record applies .
486 * Valid values are defined by the 'PL_CONTRACT_CATEGORY' lookup type.
487 * @param p_assignment_id The assignment to whom the tax record applies
488 * @param p_rate_of_tax Rate of tax information.Valid values are defined
489 * by globals 'PL_TAX_LUMP_FIRST' ,'PL_TAX_LUMP_SECOND','PL_TAX_LUMP_THIRD' or
490 * values between 0 to 100.
491 * @param p_paye_details_id Unique id for the tax record created by the API
492 * @param p_object_version_number If p_validate is false, then set to the
493 * version number of the created tax record. If p_validate is true, then the
494 * value will be null.
495 * @param p_effective_start_date If p_validate is false, then set to the
496 * earliest effective start date for the created tax record. If p_validate is
497 * true, then set to null.
498 * @param p_effective_end_date If p_validate is false, then set to the
499 * effective end date for the created tax record. If p_validate is true, then
500 * set to null.
501 * @param p_effective_date_warning Set to true if the effective date has
502 * has been reset to the date when the assignment first became a foreign
503 * lumpsum contract
504 * @rep:displayname Create Tax record for foreign lump sum contract.
505 * @rep:category BUSINESS_ENTITY PAY_EMP_TAX_INFO
506 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
507 * @rep:lifecycle active
508 * @rep:scope public
509 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
510 */
511 --
512 -- {End Of Comments}
513 procedure create_pl_f_lump_paye_details
514 (p_validate in boolean default false
515 ,p_effective_date in date
516 ,p_contract_category in varchar2 default 'F_LUMP'
517 ,p_assignment_id in number
518 ,p_rate_of_tax in varchar2
519 ,p_paye_details_id out nocopy number
520 ,p_object_version_number out nocopy number
521 ,p_effective_start_date out nocopy date
522 ,p_effective_end_date out nocopy date
523 ,p_effective_date_warning out nocopy boolean);
524 end PAY_PL_PAYE_API;