DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_CPT_UPD

Source


1 Package Body pay_cpt_upd as
2 /* $Header: pycprrhi.pkb 120.1.12010000.3 2008/08/06 07:04:33 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33)	:= '  pay_cpt_upd.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_update_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This procedure controls the execution of dml from the datetrack mode
17 --   of CORRECTION only. It is important to note that the object version
18 --   number is only increment by 1 because the datetrack correction is
19 --   soley for one datetracked row.
20 --   This procedure controls the actual dml update logic. The functions of this
21 --   procedure are as follows:
22 --   1) Get the next object_version_number.
23 --   2) To set and unset the g_api_dml status as required (as we are about to
24 --      perform dml).
25 --   3) To update the specified row in the schema using the primary key in
26 --      the predicates.
27 --   4) To trap any constraint violations that may have occurred.
28 --   5) To raise any other errors.
29 --
30 -- Prerequisites:
31 --   This is an internal private procedure which must be called from the
32 --   update_dml procedure.
33 --
34 -- In Parameters:
35 --   A Pl/Sql record structre.
36 --
37 -- Post Success:
38 --   The specified row will be updated in the schema.
39 --
40 -- Post Failure:
41 --   On the update dml failure it is important to note that we always reset the
42 --   g_api_dml status to false.
43 --   If a check or unique integrity constraint violation is raised the
44 --   constraint_error procedure will be called.
45 --   If any other error is reported, the error will be raised after the
46 --   g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 --   The update 'set' arguments list should be modified if any of your
50 --   attributes are not updateable.
51 --
52 -- Access Status:
53 --   Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_update_dml
58 	(p_rec 			 in out nocopy pay_cpt_shd.g_rec_type,
59 	 p_effective_date	 in	date,
60 	 p_datetrack_mode	 in	varchar2,
61 	 p_validation_start_date in	date,
62 	 p_validation_end_date	 in	date) is
63 --
64   l_proc	varchar2(72) := g_package||'dt_update_dml';
65 --
66 Begin
67   hr_utility.set_location('Entering:'||l_proc, 5);
68   --
69   If (p_datetrack_mode = 'CORRECTION') then
70     hr_utility.set_location(l_proc, 10);
71     --
72     -- Because we are updating a row we must get the next object
73     -- version number.
74     --
75     p_rec.object_version_number :=
76       dt_api.get_object_version_number
77 	  (p_base_table_name	=> 'pay_ca_emp_prov_tax_info_f',
78 	   p_base_key_column	=> 'emp_province_tax_inf_id',
79 	   p_base_key_value	=> p_rec.emp_province_tax_inf_id);
80     --
81     pay_cpt_shd.g_api_dml := true;  -- Set the api dml status
82     --
83     -- Update the pay_ca_emp_prov_tax_info_f Row
84     --
85     update  pay_ca_emp_prov_tax_info_f
86     set
87         emp_province_tax_inf_id         = p_rec.emp_province_tax_inf_id,
88     legislation_code                = p_rec.legislation_code,
89     assignment_id                   = p_rec.assignment_id,
90     business_group_id               = p_rec.business_group_id,
91     province_code                   = p_rec.province_code,
92     jurisdiction_code               = p_rec.jurisdiction_code,
93     tax_credit_amount               = p_rec.tax_credit_amount,
94     basic_exemption_flag            = p_rec.basic_exemption_flag,
95     deduction_code                  = p_rec.deduction_code,
96     extra_info_not_provided         = p_rec.extra_info_not_provided,
97     marriage_status                 = p_rec.marriage_status,
98     no_of_infirm_dependants         = p_rec.no_of_infirm_dependants,
99     non_resident_status             = p_rec.non_resident_status,
100     disability_status               = p_rec.disability_status,
101     no_of_dependants                = p_rec.no_of_dependants,
102     annual_dedn                     = p_rec.annual_dedn,
103     total_expense_by_commission     = p_rec.total_expense_by_commission,
104     total_remnrtn_by_commission     = p_rec.total_remnrtn_by_commission,
105     prescribed_zone_dedn_amt        = p_rec.prescribed_zone_dedn_amt,
106     additional_tax                  = p_rec.additional_tax,
107     prov_override_rate              = p_rec.prov_override_rate,
108     prov_override_amount            = p_rec.prov_override_amount,
109     prov_exempt_flag                = p_rec.prov_exempt_flag,
110     pmed_exempt_flag                = p_rec.pmed_exempt_flag,
111     wc_exempt_flag                  = p_rec.wc_exempt_flag,
112     qpp_exempt_flag                 = p_rec.qpp_exempt_flag,
113     tax_calc_method                 = p_rec.tax_calc_method,
114     other_tax_credit                = p_rec.other_tax_credit,
115     ca_tax_information_category     = p_rec.ca_tax_information_category,
116     ca_tax_information1             = p_rec.ca_tax_information1,
117     ca_tax_information2             = p_rec.ca_tax_information2,
118     ca_tax_information3             = p_rec.ca_tax_information3,
119     ca_tax_information4             = p_rec.ca_tax_information4,
120     ca_tax_information5             = p_rec.ca_tax_information5,
121     ca_tax_information6             = p_rec.ca_tax_information6,
122     ca_tax_information7             = p_rec.ca_tax_information7,
123     ca_tax_information8             = p_rec.ca_tax_information8,
124     ca_tax_information9             = p_rec.ca_tax_information9,
125     ca_tax_information10            = p_rec.ca_tax_information10,
126     ca_tax_information11            = p_rec.ca_tax_information11,
127     ca_tax_information12            = p_rec.ca_tax_information12,
128     ca_tax_information13            = p_rec.ca_tax_information13,
129     ca_tax_information14            = p_rec.ca_tax_information14,
130     ca_tax_information15            = p_rec.ca_tax_information15,
131     ca_tax_information16            = p_rec.ca_tax_information16,
132     ca_tax_information17            = p_rec.ca_tax_information17,
133     ca_tax_information18            = p_rec.ca_tax_information18,
134     ca_tax_information19            = p_rec.ca_tax_information19,
135     ca_tax_information20            = p_rec.ca_tax_information20,
136     ca_tax_information21            = p_rec.ca_tax_information21,
137     ca_tax_information22            = p_rec.ca_tax_information22,
138     ca_tax_information23            = p_rec.ca_tax_information23,
139     ca_tax_information24            = p_rec.ca_tax_information24,
140     ca_tax_information25            = p_rec.ca_tax_information25,
141     ca_tax_information26            = p_rec.ca_tax_information26,
142     ca_tax_information27            = p_rec.ca_tax_information27,
143     ca_tax_information28            = p_rec.ca_tax_information28,
144     ca_tax_information29            = p_rec.ca_tax_information29,
145     ca_tax_information30            = p_rec.ca_tax_information30,
146     object_version_number           = p_rec.object_version_number,
147     prov_lsp_amount                 = p_rec.prov_lsp_amount,
148     ppip_exempt_flag                 = p_rec.ppip_exempt_flag
149     where   emp_province_tax_inf_id = p_rec.emp_province_tax_inf_id
150     and     effective_start_date = p_validation_start_date
151     and     effective_end_date   = p_validation_end_date;
152     --
153     pay_cpt_shd.g_api_dml := false;   -- Unset the api dml status
154     --
155     -- Set the effective start and end dates
156     --
157     p_rec.effective_start_date := p_validation_start_date;
158     p_rec.effective_end_date   := p_validation_end_date;
159   End If;
160 --
161 hr_utility.set_location(' Leaving:'||l_proc, 15);
162 Exception
163   When hr_api.check_integrity_violated Then
164     -- A check constraint has been violated
165     pay_cpt_shd.g_api_dml := false;   -- Unset the api dml status
166     pay_cpt_shd.constraint_error
167       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
168   When hr_api.unique_integrity_violated Then
169     -- Unique integrity has been violated
170     pay_cpt_shd.g_api_dml := false;   -- Unset the api dml status
171     pay_cpt_shd.constraint_error
172       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
173   When Others Then
174     pay_cpt_shd.g_api_dml := false;   -- Unset the api dml status
175     Raise;
176 End dt_update_dml;
177 --
178 -- ----------------------------------------------------------------------------
179 -- |------------------------------< update_dml >------------------------------|
180 -- ----------------------------------------------------------------------------
181 -- {Start Of Comments}
182 --
183 -- Description:
184 --   This procedure calls the dt_update_dml control logic which handles
185 --   the actual datetrack dml.
186 --
187 -- Prerequisites:
188 --   This is an internal private procedure which must be called from the upd
189 --   procedure.
190 --
191 -- In Parameters:
192 --   A Pl/Sql record structre.
193 --
194 -- Post Success:
195 --   Processing contines.
196 --
197 -- Post Failure:
198 --   No specific error handling is required within this procedure.
199 --
200 -- Developer Implementation Notes:
201 --   The update 'set' arguments list should be modified if any of your
202 --   attributes are not updateable.
203 --
204 -- Access Status:
205 --   Internal Row Handler Use Only.
206 --
207 -- {End Of Comments}
208 -- ----------------------------------------------------------------------------
209 Procedure update_dml
210 	(p_rec 			 in out nocopy pay_cpt_shd.g_rec_type,
211 	 p_effective_date	 in	date,
212 	 p_datetrack_mode	 in	varchar2,
213 	 p_validation_start_date in	date,
214 	 p_validation_end_date	 in	date) is
215 --
216   l_proc	varchar2(72) := g_package||'update_dml';
217 --
218 Begin
219   hr_utility.set_location('Entering:'||l_proc, 5);
220   --
221   dt_update_dml(p_rec			=> p_rec,
222 		p_effective_date	=> p_effective_date,
223 		p_datetrack_mode	=> p_datetrack_mode,
224        		p_validation_start_date	=> p_validation_start_date,
225 		p_validation_end_date	=> p_validation_end_date);
226   --
227   hr_utility.set_location(' Leaving:'||l_proc, 10);
228 End update_dml;
229 --
230 -- ----------------------------------------------------------------------------
231 -- |----------------------------< dt_pre_update >-----------------------------|
232 -- ----------------------------------------------------------------------------
233 -- {Start Of Comments}
234 --
235 -- Description:
236 --   The dt_pre_update procedure controls the execution
237 --   of dml for the datetrack modes of: UPDATE, UPDATE_OVERRIDE
238 --   and UPDATE_CHANGE_INSERT only. The execution required is as
239 --   follows:
240 --
241 --   1) Providing the datetrack update mode is not 'CORRECTION'
242 --      then set the effective end date of the current row (this
243 --      will be the validation_start_date - 1).
244 --   2) If the datetrack mode is 'UPDATE_OVERRIDE' then call the
245 --      corresponding delete_dml process to delete any future rows
246 --      where the effective_start_date is greater than or equal to
247 --	the validation_start_date.
248 --   3) Call the insert_dml process to insert the new updated row
249 --      details..
250 --
251 -- Prerequisites:
252 --   This is an internal procedure which is called from the
253 --   pre_update procedure.
254 --
255 -- In Parameters:
256 --
257 -- Post Success:
258 --   Processing continues.
259 --
260 -- Post Failure:
261 --   If an error has occurred, an error message and exception will be raised
262 --   but not handled.
263 --
264 -- Developer Implementation Notes:
265 --   This is an internal procedure which is required by Datetrack. Don't
266 --   remove or modify.
267 --
268 -- Access Status:
269 --   Internal Row Handler Use Only.
270 --
271 -- {End Of Comments}
272 -- ----------------------------------------------------------------------------
273 Procedure dt_pre_update
274 	(p_rec 			 in out	nocopy pay_cpt_shd.g_rec_type,
275 	 p_effective_date	 in	date,
276 	 p_datetrack_mode	 in	varchar2,
277 	 p_validation_start_date in	date,
278 	 p_validation_end_date	 in	date) is
279 --
280   l_proc	         varchar2(72) := g_package||'dt_pre_update';
281   l_dummy_version_number number;
282 --
283 Begin
284   hr_utility.set_location('Entering:'||l_proc, 5);
285   If (p_datetrack_mode <> 'CORRECTION') then
286     hr_utility.set_location(l_proc, 10);
287     --
288     -- Update the current effective end date
289     --
290     pay_cpt_shd.upd_effective_end_date
291      (p_effective_date	       => p_effective_date,
292       p_base_key_value	       => p_rec.emp_province_tax_inf_id,
293       p_new_effective_end_date => (p_validation_start_date - 1),
294       p_validation_start_date  => p_validation_start_date,
295       p_validation_end_date    => p_validation_end_date,
296       p_object_version_number  => l_dummy_version_number);
297     --
298     If (p_datetrack_mode = 'UPDATE_OVERRIDE') then
299       hr_utility.set_location(l_proc, 15);
300       --
301       -- As the datetrack mode is 'UPDATE_OVERRIDE' then we must
302       -- delete any future rows
303       --
304       pay_cpt_del.delete_dml
305         (p_rec			 => p_rec,
306 	 p_effective_date	 => p_effective_date,
307 	 p_datetrack_mode	 => p_datetrack_mode,
308 	 p_validation_start_date => p_validation_start_date,
309 	 p_validation_end_date   => p_validation_end_date);
310     End If;
311     hr_utility.set_location(l_proc, 20);
312     --
313     -- We must now insert the updated row
314     --
315     pay_cpt_ins.insert_dml
316       (p_rec			=> p_rec,
317        p_effective_date		=> p_effective_date,
318        p_datetrack_mode		=> p_datetrack_mode,
319        p_validation_start_date	=> p_validation_start_date,
320        p_validation_end_date	=> p_validation_end_date);
321   End If;
322   hr_utility.set_location(' Leaving:'||l_proc, 20);
323 End dt_pre_update;
324 --
325 -- ----------------------------------------------------------------------------
326 -- |------------------------------< pre_update >------------------------------|
327 -- ----------------------------------------------------------------------------
328 -- {Start Of Comments}
329 --
330 -- Description:
331 --   This private procedure contains any processing which is required before
332 --   the update dml.
333 --
334 -- Prerequisites:
335 --   This is an internal procedure which is called from the upd procedure.
336 --
337 -- In Parameters:
338 --   A Pl/Sql record structre.
339 --
340 -- Post Success:
341 --   Processing continues.
342 --
343 -- Post Failure:
344 --   If an error has occurred, an error message and exception will be raised
345 --   but not handled.
346 --
347 -- Developer Implementation Notes:
348 --   Any pre-processing required before the update dml is issued should be
349 --   coded within this procedure. It is important to note that any 3rd party
350 --   maintenance should be reviewed before placing in this procedure. The call
351 --   to the dt_update_dml procedure should NOT be removed.
352 --
353 -- Access Status:
354 --   Internal Row Handler Use Only.
355 --
356 -- {End Of Comments}
357 -- ----------------------------------------------------------------------------
358 Procedure pre_update
359 	(p_rec 			 in out	nocopy pay_cpt_shd.g_rec_type,
360 	 p_effective_date	 in	date,
361 	 p_datetrack_mode	 in	varchar2,
362 	 p_validation_start_date in	date,
363 	 p_validation_end_date	 in	date) is
364 --
365   l_proc	varchar2(72) := g_package||'pre_update';
366 --
367 Begin
368   hr_utility.set_location('Entering:'||l_proc, 5);
369   --
370   --
371   --
372   dt_pre_update
373     (p_rec 		     => p_rec,
374      p_effective_date	     => p_effective_date,
375      p_datetrack_mode	     => p_datetrack_mode,
376      p_validation_start_date => p_validation_start_date,
377      p_validation_end_date   => p_validation_end_date);
378   --
379   hr_utility.set_location(' Leaving:'||l_proc, 10);
380 End pre_update;
381 --
382 -- ----------------------------------------------------------------------------
383 -- |-----------------------------< post_update >------------------------------|
384 -- ----------------------------------------------------------------------------
385 -- {Start Of Comments}
386 --
387 -- Description:
388 --   This private procedure contains any processing which is required after the
389 --   update dml.
390 --
391 -- Prerequisites:
392 --   This is an internal procedure which is called from the upd procedure.
393 --
394 -- In Parameters:
395 --   A Pl/Sql record structre.
396 --
397 -- Post Success:
398 --   Processing continues.
399 --
400 -- Post Failure:
401 --   If an error has occurred, an error message and exception will be raised
402 --   but not handled.
403 --
404 -- Developer Implementation Notes:
405 --   Any post-processing required after the update dml is issued should be
406 --   coded within this procedure. It is important to note that any 3rd party
407 --   maintenance should be reviewed before placing in this procedure.
408 --
409 -- Access Status:
410 --   Internal Row Handler Use Only.
411 --
412 -- {End Of Comments}
413 -- ----------------------------------------------------------------------------
414 Procedure post_update
415 	(p_rec 			 in pay_cpt_shd.g_rec_type,
416 	 p_effective_date	 in date,
417 	 p_datetrack_mode	 in varchar2,
418 	 p_validation_start_date in date,
419 	 p_validation_end_date	 in date) is
420 --
421   l_proc	varchar2(72) := g_package||'post_update';
422 --
423 Begin
424   hr_utility.set_location('Entering:'||l_proc, 5);
425 --
426   --
427   -- Start of API User Hook for post_update.
428   --
429   begin
430     --
431     pay_cpt_rku.after_update
432       (
433   p_emp_province_tax_inf_id       =>p_rec.emp_province_tax_inf_id
434  ,p_effective_start_date          =>p_rec.effective_start_date
435  ,p_effective_end_date            =>p_rec.effective_end_date
436  ,p_legislation_code              =>p_rec.legislation_code
437  ,p_assignment_id                 =>p_rec.assignment_id
438  ,p_business_group_id             =>p_rec.business_group_id
439  ,p_province_code                 =>p_rec.province_code
440  ,p_jurisdiction_code             =>p_rec.jurisdiction_code
441  ,p_tax_credit_amount             =>p_rec.tax_credit_amount
442  ,p_basic_exemption_flag          =>p_rec.basic_exemption_flag
443  ,p_deduction_code                =>p_rec.deduction_code
444  ,p_extra_info_not_provided       =>p_rec.extra_info_not_provided
445  ,p_marriage_status               =>p_rec.marriage_status
446  ,p_no_of_infirm_dependants       =>p_rec.no_of_infirm_dependants
447  ,p_non_resident_status           =>p_rec.non_resident_status
448  ,p_disability_status             =>p_rec.disability_status
449  ,p_no_of_dependants              =>p_rec.no_of_dependants
450  ,p_annual_dedn                   =>p_rec.annual_dedn
451  ,p_total_expense_by_commission   =>p_rec.total_expense_by_commission
452  ,p_total_remnrtn_by_commission   =>p_rec.total_remnrtn_by_commission
453  ,p_prescribed_zone_dedn_amt      =>p_rec.prescribed_zone_dedn_amt
454  ,p_additional_tax                =>p_rec.additional_tax
455  ,p_prov_override_rate            =>p_rec.prov_override_rate
456  ,p_prov_override_amount          =>p_rec.prov_override_amount
457  ,p_prov_exempt_flag              =>p_rec.prov_exempt_flag
458  ,p_pmed_exempt_flag              =>p_rec.pmed_exempt_flag
459  ,p_wc_exempt_flag                =>p_rec.wc_exempt_flag
460  ,p_qpp_exempt_flag               =>p_rec.qpp_exempt_flag
461  ,p_tax_calc_method               =>p_rec.tax_calc_method
462  ,p_other_tax_credit              =>p_rec.other_tax_credit
463  ,p_ca_tax_information_category   =>p_rec.ca_tax_information_category
464  ,p_ca_tax_information1           =>p_rec.ca_tax_information1
465  ,p_ca_tax_information2           =>p_rec.ca_tax_information2
466  ,p_ca_tax_information3           =>p_rec.ca_tax_information3
467  ,p_ca_tax_information4           =>p_rec.ca_tax_information4
468  ,p_ca_tax_information5           =>p_rec.ca_tax_information5
469  ,p_ca_tax_information6           =>p_rec.ca_tax_information6
470  ,p_ca_tax_information7           =>p_rec.ca_tax_information7
471  ,p_ca_tax_information8           =>p_rec.ca_tax_information8
472  ,p_ca_tax_information9           =>p_rec.ca_tax_information9
473  ,p_ca_tax_information10          =>p_rec.ca_tax_information10
474  ,p_ca_tax_information11          =>p_rec.ca_tax_information11
475  ,p_ca_tax_information12          =>p_rec.ca_tax_information12
476  ,p_ca_tax_information13          =>p_rec.ca_tax_information13
477  ,p_ca_tax_information14          =>p_rec.ca_tax_information14
478  ,p_ca_tax_information15          =>p_rec.ca_tax_information15
479  ,p_ca_tax_information16          =>p_rec.ca_tax_information16
480  ,p_ca_tax_information17          =>p_rec.ca_tax_information17
481  ,p_ca_tax_information18          =>p_rec.ca_tax_information18
482  ,p_ca_tax_information19          =>p_rec.ca_tax_information19
483  ,p_ca_tax_information20          =>p_rec.ca_tax_information20
484  ,p_ca_tax_information21          =>p_rec.ca_tax_information21
485  ,p_ca_tax_information22          =>p_rec.ca_tax_information22
486  ,p_ca_tax_information23          =>p_rec.ca_tax_information23
487  ,p_ca_tax_information24          =>p_rec.ca_tax_information24
488  ,p_ca_tax_information25          =>p_rec.ca_tax_information25
489  ,p_ca_tax_information26          =>p_rec.ca_tax_information26
490  ,p_ca_tax_information27          =>p_rec.ca_tax_information27
491  ,p_ca_tax_information28          =>p_rec.ca_tax_information28
492  ,p_ca_tax_information29          =>p_rec.ca_tax_information29
493  ,p_ca_tax_information30          =>p_rec.ca_tax_information30
494  ,p_object_version_number         =>p_rec.object_version_number
495  ,p_prov_lsp_amount               =>p_rec.prov_lsp_amount
496  ,p_effective_date                =>p_effective_date
497  ,p_datetrack_mode                =>p_datetrack_mode
498  ,p_validation_start_date         =>p_validation_start_date
499  ,p_validation_end_date           =>p_validation_end_date
500  ,p_effective_start_date_o        =>pay_cpt_shd.g_old_rec.effective_start_date
501  ,p_effective_end_date_o          =>pay_cpt_shd.g_old_rec.effective_end_date
502  ,p_legislation_code_o            =>pay_cpt_shd.g_old_rec.legislation_code
503  ,p_assignment_id_o               =>pay_cpt_shd.g_old_rec.assignment_id
504  ,p_business_group_id_o           =>pay_cpt_shd.g_old_rec.business_group_id
505  ,p_province_code_o               =>pay_cpt_shd.g_old_rec.province_code
506  ,p_jurisdiction_code_o           =>pay_cpt_shd.g_old_rec.jurisdiction_code
507  ,p_tax_credit_amount_o           =>pay_cpt_shd.g_old_rec.tax_credit_amount
508  ,p_basic_exemption_flag_o        =>pay_cpt_shd.g_old_rec.basic_exemption_flag
509  ,p_deduction_code_o              =>pay_cpt_shd.g_old_rec.deduction_code
510  ,p_extra_info_not_provided_o     =>pay_cpt_shd.g_old_rec.extra_info_not_provided
511  ,p_marriage_status_o             =>pay_cpt_shd.g_old_rec.marriage_status
512  ,p_no_of_infirm_dependants_o     =>pay_cpt_shd.g_old_rec.no_of_infirm_dependants
513  ,p_non_resident_status_o         =>pay_cpt_shd.g_old_rec.non_resident_status
514  ,p_disability_status_o           =>pay_cpt_shd.g_old_rec.disability_status
515  ,p_no_of_dependants_o            =>pay_cpt_shd.g_old_rec.no_of_dependants
516  ,p_annual_dedn_o                 =>pay_cpt_shd.g_old_rec.annual_dedn
517  ,p_total_expense_by_commissio_o =>pay_cpt_shd.g_old_rec.total_expense_by_commission
518  ,p_total_remnrtn_by_commissio_o =>pay_cpt_shd.g_old_rec.total_remnrtn_by_commission
519  ,p_prescribed_zone_dedn_amt_o    =>pay_cpt_shd.g_old_rec.prescribed_zone_dedn_amt
520  ,p_additional_tax_o              =>pay_cpt_shd.g_old_rec.additional_tax
521  ,p_prov_override_rate_o          =>pay_cpt_shd.g_old_rec.prov_override_rate
522  ,p_prov_override_amount_o        =>pay_cpt_shd.g_old_rec.prov_override_amount
523  ,p_prov_exempt_flag_o            =>pay_cpt_shd.g_old_rec.prov_exempt_flag
524  ,p_pmed_exempt_flag_o            =>pay_cpt_shd.g_old_rec.pmed_exempt_flag
525  ,p_wc_exempt_flag_o              =>pay_cpt_shd.g_old_rec.wc_exempt_flag
526  ,p_qpp_exempt_flag_o             =>pay_cpt_shd.g_old_rec.qpp_exempt_flag
527  ,p_tax_calc_method_o             =>pay_cpt_shd.g_old_rec.tax_calc_method
528  ,p_other_tax_credit_o            =>pay_cpt_shd.g_old_rec.other_tax_credit
529  ,p_ca_tax_information_categor_o =>pay_cpt_shd.g_old_rec.ca_tax_information_category
530  ,p_ca_tax_information1_o         =>pay_cpt_shd.g_old_rec.ca_tax_information1
531  ,p_ca_tax_information2_o         =>pay_cpt_shd.g_old_rec.ca_tax_information2
532  ,p_ca_tax_information3_o         =>pay_cpt_shd.g_old_rec.ca_tax_information3
533  ,p_ca_tax_information4_o         =>pay_cpt_shd.g_old_rec.ca_tax_information4
534  ,p_ca_tax_information5_o         =>pay_cpt_shd.g_old_rec.ca_tax_information5
535  ,p_ca_tax_information6_o         =>pay_cpt_shd.g_old_rec.ca_tax_information6
536  ,p_ca_tax_information7_o         =>pay_cpt_shd.g_old_rec.ca_tax_information7
537  ,p_ca_tax_information8_o         =>pay_cpt_shd.g_old_rec.ca_tax_information8
538  ,p_ca_tax_information9_o         =>pay_cpt_shd.g_old_rec.ca_tax_information9
539  ,p_ca_tax_information10_o        =>pay_cpt_shd.g_old_rec.ca_tax_information10
540  ,p_ca_tax_information11_o        =>pay_cpt_shd.g_old_rec.ca_tax_information11
541  ,p_ca_tax_information12_o        =>pay_cpt_shd.g_old_rec.ca_tax_information12
542  ,p_ca_tax_information13_o        =>pay_cpt_shd.g_old_rec.ca_tax_information13
543  ,p_ca_tax_information14_o        =>pay_cpt_shd.g_old_rec.ca_tax_information14
544  ,p_ca_tax_information15_o        =>pay_cpt_shd.g_old_rec.ca_tax_information15
545  ,p_ca_tax_information16_o        =>pay_cpt_shd.g_old_rec.ca_tax_information16
546  ,p_ca_tax_information17_o        =>pay_cpt_shd.g_old_rec.ca_tax_information17
547  ,p_ca_tax_information18_o        =>pay_cpt_shd.g_old_rec.ca_tax_information18
548  ,p_ca_tax_information19_o        =>pay_cpt_shd.g_old_rec.ca_tax_information19
549  ,p_ca_tax_information20_o        =>pay_cpt_shd.g_old_rec.ca_tax_information20
550  ,p_ca_tax_information21_o        =>pay_cpt_shd.g_old_rec.ca_tax_information21
551  ,p_ca_tax_information22_o        =>pay_cpt_shd.g_old_rec.ca_tax_information22
552  ,p_ca_tax_information23_o        =>pay_cpt_shd.g_old_rec.ca_tax_information23
553  ,p_ca_tax_information24_o        =>pay_cpt_shd.g_old_rec.ca_tax_information24
554  ,p_ca_tax_information25_o        =>pay_cpt_shd.g_old_rec.ca_tax_information25
555  ,p_ca_tax_information26_o        =>pay_cpt_shd.g_old_rec.ca_tax_information26
556  ,p_ca_tax_information27_o        =>pay_cpt_shd.g_old_rec.ca_tax_information27
557  ,p_ca_tax_information28_o        =>pay_cpt_shd.g_old_rec.ca_tax_information28
558  ,p_ca_tax_information29_o        =>pay_cpt_shd.g_old_rec.ca_tax_information29
559  ,p_ca_tax_information30_o        =>pay_cpt_shd.g_old_rec.ca_tax_information30
560  ,p_object_version_number_o       =>pay_cpt_shd.g_old_rec.object_version_number
561  ,p_prov_lsp_amount_o             =>pay_cpt_shd.g_old_rec.prov_lsp_amount
562  ,p_ppip_exempt_flag               =>p_rec.ppip_exempt_flag
563       );
564     --
565   exception
566     --
567     when hr_api.cannot_find_prog_unit then
568       --
569       hr_api.cannot_find_prog_unit_error
570         (p_module_name => 'pay_ca_emp_prov_tax_info_f'
571         ,p_hook_type   => 'AU');
572       --
573   end;
574   --
575   -- End of API User Hook for post_update.
576   --
577   --
578   hr_utility.set_location(' Leaving:'||l_proc, 10);
579 End post_update;
580 --
581 -- ----------------------------------------------------------------------------
582 -- |-----------------------------< convert_defs >-----------------------------|
583 -- ----------------------------------------------------------------------------
584 -- {Start Of Comments}
585 --
586 -- Description:
587 --   The Convert_Defs procedure has one very important function:
588 --   It must return the record structure for the row with all system defaulted
589 --   values converted into its corresponding parameter value for update. When
590 --   we attempt to update a row through the Upd process , certain
591 --   parameters can be defaulted which enables flexibility in the calling of
592 --   the upd process (e.g. only attributes which need to be updated need to be
593 --   specified). For the upd process to determine which attributes
594 --   have NOT been specified we need to check if the parameter has a reserved
595 --   system default value. Therefore, for all parameters which have a
596 --   corresponding reserved system default mechanism specified we need to
597 --   check if a system default is being used. If a system default is being
598 --   used then we convert the defaulted value into its corresponding attribute
599 --   value held in the g_old_rec data structure.
600 --
601 -- Prerequisites:
602 --   This private function can only be called from the upd process.
603 --
604 -- In Parameters:
605 --   A Pl/Sql record structre.
606 --
607 -- Post Success:
608 --   The record structure will be returned with all system defaulted parameter
609 --   values converted into its current row attribute value.
610 --
611 -- Post Failure:
612 --   No direct error handling is required within this function. Any possible
613 --   errors within this procedure will be a PL/SQL value error due to conversion
614 --   of datatypes or data lengths.
615 --
616 -- Developer Implementation Notes:
617 --   None.
618 --
619 -- Access Status:
620 --   Internal Row Handler Use Only.
621 --
622 -- {End Of Comments}
623 -- ----------------------------------------------------------------------------
624 Procedure convert_defs(p_rec in out nocopy pay_cpt_shd.g_rec_type) is
625 --
626   l_proc  varchar2(72) := g_package||'convert_defs';
627 --
628 Begin
629   --
630   hr_utility.set_location('Entering:'||l_proc, 5);
631   --
632   -- We must now examine each argument value in the
633   -- p_rec plsql record structure
634   -- to see if a system default is being used. If a system default
635   -- is being used then we must set to the 'current' argument value.
636   --
637   If (p_rec.legislation_code = hr_api.g_varchar2) then
638     p_rec.legislation_code :=
639     pay_cpt_shd.g_old_rec.legislation_code;
640   End If;
641   If (p_rec.assignment_id = hr_api.g_number) then
642     p_rec.assignment_id :=
643     pay_cpt_shd.g_old_rec.assignment_id;
644   End If;
645   If (p_rec.business_group_id = hr_api.g_number) then
646     p_rec.business_group_id :=
647     pay_cpt_shd.g_old_rec.business_group_id;
648   End If;
649   If (p_rec.province_code = hr_api.g_varchar2) then
650     p_rec.province_code :=
651     pay_cpt_shd.g_old_rec.province_code;
652   End If;
653   If (p_rec.jurisdiction_code = hr_api.g_varchar2) then
654     p_rec.jurisdiction_code :=
655     pay_cpt_shd.g_old_rec.jurisdiction_code;
656   End If;
657   If (p_rec.tax_credit_amount = hr_api.g_number) then
658     p_rec.tax_credit_amount :=
659     pay_cpt_shd.g_old_rec.tax_credit_amount;
660   End If;
661   If (p_rec.basic_exemption_flag = hr_api.g_varchar2) then
662     p_rec.basic_exemption_flag :=
663     pay_cpt_shd.g_old_rec.basic_exemption_flag;
664   End If;
665   If (p_rec.deduction_code = hr_api.g_varchar2) then
666     p_rec.deduction_code :=
667     pay_cpt_shd.g_old_rec.deduction_code;
668   End If;
669   If (p_rec.extra_info_not_provided = hr_api.g_varchar2) then
670     p_rec.extra_info_not_provided :=
671     pay_cpt_shd.g_old_rec.extra_info_not_provided;
672   End If;
673   If (p_rec.marriage_status = hr_api.g_varchar2) then
674     p_rec.marriage_status :=
675     pay_cpt_shd.g_old_rec.marriage_status;
676   End If;
677   If (p_rec.no_of_infirm_dependants = hr_api.g_number) then
678     p_rec.no_of_infirm_dependants :=
679     pay_cpt_shd.g_old_rec.no_of_infirm_dependants;
680   End If;
681   If (p_rec.non_resident_status = hr_api.g_varchar2) then
682     p_rec.non_resident_status :=
683     pay_cpt_shd.g_old_rec.non_resident_status;
684   End If;
685   If (p_rec.disability_status = hr_api.g_varchar2) then
686     p_rec.disability_status :=
687     pay_cpt_shd.g_old_rec.disability_status;
688   End If;
689   If (p_rec.no_of_dependants = hr_api.g_number) then
690     p_rec.no_of_dependants :=
691     pay_cpt_shd.g_old_rec.no_of_dependants;
692   End If;
693   If (p_rec.annual_dedn = hr_api.g_number) then
694     p_rec.annual_dedn :=
695     pay_cpt_shd.g_old_rec.annual_dedn;
696   End If;
697   If (p_rec.total_expense_by_commission = hr_api.g_number) then
698     p_rec.total_expense_by_commission :=
699     pay_cpt_shd.g_old_rec.total_expense_by_commission;
700   End If;
701   If (p_rec.total_remnrtn_by_commission = hr_api.g_number) then
702     p_rec.total_remnrtn_by_commission :=
703     pay_cpt_shd.g_old_rec.total_remnrtn_by_commission;
704   End If;
705   If (p_rec.prescribed_zone_dedn_amt = hr_api.g_number) then
706     p_rec.prescribed_zone_dedn_amt :=
707     pay_cpt_shd.g_old_rec.prescribed_zone_dedn_amt;
708   End If;
709   If (p_rec.additional_tax = hr_api.g_number) then
710     p_rec.additional_tax :=
711     pay_cpt_shd.g_old_rec.additional_tax;
712   End If;
713   If (p_rec.prov_override_rate = hr_api.g_number) then
714     p_rec.prov_override_rate :=
715     pay_cpt_shd.g_old_rec.prov_override_rate;
716   End If;
717   If (p_rec.prov_override_amount = hr_api.g_number) then
718     p_rec.prov_override_amount :=
719     pay_cpt_shd.g_old_rec.prov_override_amount;
720   End If;
721   If (p_rec.prov_exempt_flag = hr_api.g_varchar2) then
722     p_rec.prov_exempt_flag :=
723     pay_cpt_shd.g_old_rec.prov_exempt_flag;
724   End If;
725   If (p_rec.pmed_exempt_flag = hr_api.g_varchar2) then
726     p_rec.pmed_exempt_flag :=
727     pay_cpt_shd.g_old_rec.pmed_exempt_flag;
728   End If;
729   If (p_rec.wc_exempt_flag = hr_api.g_varchar2) then
730     p_rec.wc_exempt_flag :=
731     pay_cpt_shd.g_old_rec.wc_exempt_flag;
732   End If;
733   If (p_rec.qpp_exempt_flag = hr_api.g_varchar2) then
734     p_rec.qpp_exempt_flag :=
735     pay_cpt_shd.g_old_rec.qpp_exempt_flag;
736   End If;
737   If (p_rec.tax_calc_method = hr_api.g_varchar2) then
738     p_rec.tax_calc_method :=
739     pay_cpt_shd.g_old_rec.tax_calc_method;
740   End If;
741   If (p_rec.other_tax_credit = hr_api.g_number) then
742     p_rec.other_tax_credit :=
743     pay_cpt_shd.g_old_rec.other_tax_credit;
744   End If;
745   If (p_rec.ca_tax_information_category = hr_api.g_varchar2) then
746     p_rec.ca_tax_information_category :=
747     pay_cpt_shd.g_old_rec.ca_tax_information_category;
748   End If;
749   If (p_rec.ca_tax_information1 = hr_api.g_varchar2) then
750     p_rec.ca_tax_information1 :=
751     pay_cpt_shd.g_old_rec.ca_tax_information1;
752   End If;
753   If (p_rec.ca_tax_information2 = hr_api.g_varchar2) then
754     p_rec.ca_tax_information2 :=
755     pay_cpt_shd.g_old_rec.ca_tax_information2;
756   End If;
757   If (p_rec.ca_tax_information3 = hr_api.g_varchar2) then
758     p_rec.ca_tax_information3 :=
759     pay_cpt_shd.g_old_rec.ca_tax_information3;
760   End If;
761   If (p_rec.ca_tax_information4 = hr_api.g_varchar2) then
762     p_rec.ca_tax_information4 :=
763     pay_cpt_shd.g_old_rec.ca_tax_information4;
764   End If;
765   If (p_rec.ca_tax_information5 = hr_api.g_varchar2) then
766     p_rec.ca_tax_information5 :=
767     pay_cpt_shd.g_old_rec.ca_tax_information5;
768   End If;
769   If (p_rec.ca_tax_information6 = hr_api.g_varchar2) then
770     p_rec.ca_tax_information6 :=
771     pay_cpt_shd.g_old_rec.ca_tax_information6;
772   End If;
773   If (p_rec.ca_tax_information7 = hr_api.g_varchar2) then
774     p_rec.ca_tax_information7 :=
775     pay_cpt_shd.g_old_rec.ca_tax_information7;
776   End If;
777   If (p_rec.ca_tax_information8 = hr_api.g_varchar2) then
778     p_rec.ca_tax_information8 :=
779     pay_cpt_shd.g_old_rec.ca_tax_information8;
780   End If;
781   If (p_rec.ca_tax_information9 = hr_api.g_varchar2) then
782     p_rec.ca_tax_information9 :=
783     pay_cpt_shd.g_old_rec.ca_tax_information9;
784   End If;
785   If (p_rec.ca_tax_information10 = hr_api.g_varchar2) then
786     p_rec.ca_tax_information10 :=
787     pay_cpt_shd.g_old_rec.ca_tax_information10;
788   End If;
789   If (p_rec.ca_tax_information11 = hr_api.g_varchar2) then
790     p_rec.ca_tax_information11 :=
791     pay_cpt_shd.g_old_rec.ca_tax_information11;
792   End If;
793   If (p_rec.ca_tax_information12 = hr_api.g_varchar2) then
794     p_rec.ca_tax_information12 :=
795     pay_cpt_shd.g_old_rec.ca_tax_information12;
796   End If;
797   If (p_rec.ca_tax_information13 = hr_api.g_varchar2) then
798     p_rec.ca_tax_information13 :=
799     pay_cpt_shd.g_old_rec.ca_tax_information13;
800   End If;
801   If (p_rec.ca_tax_information14 = hr_api.g_varchar2) then
802     p_rec.ca_tax_information14 :=
803     pay_cpt_shd.g_old_rec.ca_tax_information14;
804   End If;
805   If (p_rec.ca_tax_information15 = hr_api.g_varchar2) then
806     p_rec.ca_tax_information15 :=
807     pay_cpt_shd.g_old_rec.ca_tax_information15;
808   End If;
809   If (p_rec.ca_tax_information16 = hr_api.g_varchar2) then
810     p_rec.ca_tax_information16 :=
811     pay_cpt_shd.g_old_rec.ca_tax_information16;
812   End If;
813   If (p_rec.ca_tax_information17 = hr_api.g_varchar2) then
814     p_rec.ca_tax_information17 :=
815     pay_cpt_shd.g_old_rec.ca_tax_information17;
816   End If;
817   If (p_rec.ca_tax_information18 = hr_api.g_varchar2) then
818     p_rec.ca_tax_information18 :=
819     pay_cpt_shd.g_old_rec.ca_tax_information18;
820   End If;
821   If (p_rec.ca_tax_information19 = hr_api.g_varchar2) then
822     p_rec.ca_tax_information19 :=
823     pay_cpt_shd.g_old_rec.ca_tax_information19;
824   End If;
825   If (p_rec.ca_tax_information20 = hr_api.g_varchar2) then
826     p_rec.ca_tax_information20 :=
827     pay_cpt_shd.g_old_rec.ca_tax_information20;
828   End If;
829   If (p_rec.ca_tax_information21 = hr_api.g_varchar2) then
830     p_rec.ca_tax_information21 :=
831     pay_cpt_shd.g_old_rec.ca_tax_information21;
832   End If;
833   If (p_rec.ca_tax_information22 = hr_api.g_varchar2) then
834     p_rec.ca_tax_information22 :=
835     pay_cpt_shd.g_old_rec.ca_tax_information22;
836   End If;
837   If (p_rec.ca_tax_information23 = hr_api.g_varchar2) then
838     p_rec.ca_tax_information23 :=
839     pay_cpt_shd.g_old_rec.ca_tax_information23;
840   End If;
841   If (p_rec.ca_tax_information24 = hr_api.g_varchar2) then
842     p_rec.ca_tax_information24 :=
843     pay_cpt_shd.g_old_rec.ca_tax_information24;
844   End If;
845   If (p_rec.ca_tax_information25 = hr_api.g_varchar2) then
846     p_rec.ca_tax_information25 :=
847     pay_cpt_shd.g_old_rec.ca_tax_information25;
848   End If;
849   If (p_rec.ca_tax_information26 = hr_api.g_varchar2) then
850     p_rec.ca_tax_information26 :=
851     pay_cpt_shd.g_old_rec.ca_tax_information26;
852   End If;
853   If (p_rec.ca_tax_information27 = hr_api.g_varchar2) then
854     p_rec.ca_tax_information27 :=
855     pay_cpt_shd.g_old_rec.ca_tax_information27;
856   End If;
857   If (p_rec.ca_tax_information28 = hr_api.g_varchar2) then
858     p_rec.ca_tax_information28 :=
859     pay_cpt_shd.g_old_rec.ca_tax_information28;
860   End If;
861   If (p_rec.ca_tax_information29 = hr_api.g_varchar2) then
862     p_rec.ca_tax_information29 :=
863     pay_cpt_shd.g_old_rec.ca_tax_information29;
864   End If;
865   If (p_rec.ca_tax_information30 = hr_api.g_varchar2) then
866     p_rec.ca_tax_information30 :=
867     pay_cpt_shd.g_old_rec.ca_tax_information30;
868   End If;
869   If (p_rec.prov_lsp_amount = hr_api.g_number) then
870     p_rec.prov_lsp_amount :=
871     pay_cpt_shd.g_old_rec.prov_lsp_amount;
872   End If;
873   If (p_rec.ppip_exempt_flag = hr_api.g_varchar2) then
874     p_rec.ppip_exempt_flag :=
875     pay_cpt_shd.g_old_rec.ppip_exempt_flag;
876   End If;
877 
878   --
879   hr_utility.set_location(' Leaving:'||l_proc, 10);
880 --
881 End convert_defs;
882 --
883 -- ----------------------------------------------------------------------------
884 -- |---------------------------------< upd >----------------------------------|
885 -- ----------------------------------------------------------------------------
886 Procedure upd
887   (
888   p_rec			in out 	nocopy pay_cpt_shd.g_rec_type,
889   p_effective_date	in 	date,
890   p_datetrack_mode	in 	varchar2
891   ) is
892 --
893   l_proc			varchar2(72) := g_package||'upd';
894   l_validation_start_date	date;
895   l_validation_end_date		date;
896 --
897 Begin
898   hr_utility.set_location('Entering:'||l_proc, 5);
899   --
900   -- Ensure that the DateTrack update mode is valid
901   --
902   dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
903   --
904   -- We must lock the row which we need to update.
905   --
906   pay_cpt_shd.lck
907 	(p_effective_date	 => p_effective_date,
908       	 p_datetrack_mode	 => p_datetrack_mode,
909       	 p_emp_province_tax_inf_id => p_rec.emp_province_tax_inf_id,
910       	 p_object_version_number => p_rec.object_version_number,
911       	 p_validation_start_date => l_validation_start_date,
912       	 p_validation_end_date	 => l_validation_end_date);
913   --
914   -- 1. During an update system defaults are used to determine if
915   --    arguments have been defaulted or not. We must therefore
916   --    derive the full record structure values to be updated.
917   --
918   -- 2. Call the supporting update validate operations.
919   --
920   convert_defs(p_rec);
921   pay_cpt_bus.update_validate
922 	(p_rec			 => p_rec,
923 	 p_effective_date	 => p_effective_date,
924 	 p_datetrack_mode  	 => p_datetrack_mode,
925 	 p_validation_start_date => l_validation_start_date,
926 	 p_validation_end_date	 => l_validation_end_date);
927   --
928   -- Call the supporting pre-update operation
929   --
930   pre_update
931 	(p_rec			 => p_rec,
932 	 p_effective_date	 => p_effective_date,
933 	 p_datetrack_mode	 => p_datetrack_mode,
934 	 p_validation_start_date => l_validation_start_date,
935 	 p_validation_end_date	 => l_validation_end_date);
936   --
937   -- Update the row.
938   --
939   update_dml
940 	(p_rec			 => p_rec,
941 	 p_effective_date	 => p_effective_date,
942 	 p_datetrack_mode	 => p_datetrack_mode,
943 	 p_validation_start_date => l_validation_start_date,
944 	 p_validation_end_date	 => l_validation_end_date);
945   --
946   -- Call the supporting post-update operation
947   --
948 /*
949   post_update
950 	(p_rec			 => p_rec,
951 	 p_effective_date	 => p_effective_date,
952 	 p_datetrack_mode	 => p_datetrack_mode,
953 	 p_validation_start_date => l_validation_start_date,
954 	 p_validation_end_date	 => l_validation_end_date);
955 */
956 End upd;
957 --
958 -- ----------------------------------------------------------------------------
959 -- |---------------------------------< upd >----------------------------------|
960 -- ----------------------------------------------------------------------------
961 Procedure upd
962   (
963   p_emp_province_tax_inf_id      in number,
964   p_effective_start_date         out nocopy date,
965   p_effective_end_date           out nocopy date,
966   p_legislation_code             in varchar2         default hr_api.g_varchar2,
967   p_assignment_id                in number           default hr_api.g_number,
968   p_business_group_id            in number           default hr_api.g_number,
969   p_province_code                in varchar2         default hr_api.g_varchar2,
970   p_jurisdiction_code            in varchar2         default hr_api.g_varchar2,
971   p_tax_credit_amount            in number           default hr_api.g_number,
972   p_basic_exemption_flag         in varchar2         default hr_api.g_varchar2,
973   p_deduction_code               in varchar2         default hr_api.g_varchar2,
974   p_extra_info_not_provided      in varchar2         default hr_api.g_varchar2,
975   p_marriage_status              in varchar2         default hr_api.g_varchar2,
976   p_no_of_infirm_dependants      in number           default hr_api.g_number,
977   p_non_resident_status          in varchar2         default hr_api.g_varchar2,
978   p_disability_status            in varchar2         default hr_api.g_varchar2,
979   p_no_of_dependants             in number           default hr_api.g_number,
980   p_annual_dedn                  in number           default hr_api.g_number,
981   p_total_expense_by_commission  in number           default hr_api.g_number,
982   p_total_remnrtn_by_commission  in number           default hr_api.g_number,
983   p_prescribed_zone_dedn_amt     in number           default hr_api.g_number,
984   p_additional_tax               in number           default hr_api.g_number,
985   p_prov_override_rate           in number           default hr_api.g_number,
986   p_prov_override_amount         in number           default hr_api.g_number,
987   p_prov_exempt_flag             in varchar2         default hr_api.g_varchar2,
988   p_pmed_exempt_flag             in varchar2         default hr_api.g_varchar2,
989   p_wc_exempt_flag               in varchar2         default hr_api.g_varchar2,
990   p_qpp_exempt_flag              in varchar2         default hr_api.g_varchar2,
991   p_tax_calc_method              in varchar2         default hr_api.g_varchar2,
992   p_other_tax_credit             in number           default hr_api.g_number,
993   p_ca_tax_information_category  in varchar2         default hr_api.g_varchar2,
994   p_ca_tax_information1          in varchar2         default hr_api.g_varchar2,
995   p_ca_tax_information2          in varchar2         default hr_api.g_varchar2,
996   p_ca_tax_information3          in varchar2         default hr_api.g_varchar2,
997   p_ca_tax_information4          in varchar2         default hr_api.g_varchar2,
998   p_ca_tax_information5          in varchar2         default hr_api.g_varchar2,
999   p_ca_tax_information6          in varchar2         default hr_api.g_varchar2,
1000   p_ca_tax_information7          in varchar2         default hr_api.g_varchar2,
1001   p_ca_tax_information8          in varchar2         default hr_api.g_varchar2,
1002   p_ca_tax_information9          in varchar2         default hr_api.g_varchar2,
1003   p_ca_tax_information10         in varchar2         default hr_api.g_varchar2,
1004   p_ca_tax_information11         in varchar2         default hr_api.g_varchar2,
1005   p_ca_tax_information12         in varchar2         default hr_api.g_varchar2,
1006   p_ca_tax_information13         in varchar2         default hr_api.g_varchar2,
1007   p_ca_tax_information14         in varchar2         default hr_api.g_varchar2,
1008   p_ca_tax_information15         in varchar2         default hr_api.g_varchar2,
1009   p_ca_tax_information16         in varchar2         default hr_api.g_varchar2,
1010   p_ca_tax_information17         in varchar2         default hr_api.g_varchar2,
1011   p_ca_tax_information18         in varchar2         default hr_api.g_varchar2,
1012   p_ca_tax_information19         in varchar2         default hr_api.g_varchar2,
1013   p_ca_tax_information20         in varchar2         default hr_api.g_varchar2,
1014   p_ca_tax_information21         in varchar2         default hr_api.g_varchar2,
1015   p_ca_tax_information22         in varchar2         default hr_api.g_varchar2,
1016   p_ca_tax_information23         in varchar2         default hr_api.g_varchar2,
1017   p_ca_tax_information24         in varchar2         default hr_api.g_varchar2,
1018   p_ca_tax_information25         in varchar2         default hr_api.g_varchar2,
1019   p_ca_tax_information26         in varchar2         default hr_api.g_varchar2,
1020   p_ca_tax_information27         in varchar2         default hr_api.g_varchar2,
1021   p_ca_tax_information28         in varchar2         default hr_api.g_varchar2,
1022   p_ca_tax_information29         in varchar2         default hr_api.g_varchar2,
1023   p_ca_tax_information30         in varchar2         default hr_api.g_varchar2,
1024   p_object_version_number        in out nocopy number,
1025   p_prov_lsp_amount              in number           default hr_api.g_number,
1026   p_effective_date		 in date,
1027   p_datetrack_mode		 in varchar2,
1028   p_ppip_exempt_flag              in varchar2         default hr_api.g_varchar2
1029   ) is
1030 --
1031   l_rec		pay_cpt_shd.g_rec_type;
1032   l_proc	varchar2(72) := g_package||'upd';
1033 --
1034 Begin
1035   hr_utility.set_location('Entering:'||l_proc, 5);
1036   --
1037   -- Call conversion function to turn arguments into the
1038   -- l_rec structure.
1039   --
1040   l_rec :=
1041   pay_cpt_shd.convert_args
1042   (
1043   p_emp_province_tax_inf_id,
1044   null,
1045   null,
1046   p_legislation_code,
1047   p_assignment_id,
1048   p_business_group_id,
1049   p_province_code,
1050   p_jurisdiction_code,
1051   p_tax_credit_amount,
1052   p_basic_exemption_flag,
1053   p_deduction_code,
1054   p_extra_info_not_provided,
1055   p_marriage_status,
1056   p_no_of_infirm_dependants,
1057   p_non_resident_status,
1058   p_disability_status,
1059   p_no_of_dependants,
1060   p_annual_dedn,
1061   p_total_expense_by_commission,
1062   p_total_remnrtn_by_commission,
1063   p_prescribed_zone_dedn_amt,
1064   p_additional_tax,
1065   p_prov_override_rate,
1066   p_prov_override_amount,
1067   p_prov_exempt_flag,
1068   p_pmed_exempt_flag,
1069   p_wc_exempt_flag,
1070   p_qpp_exempt_flag,
1071   p_tax_calc_method,
1072   p_other_tax_credit,
1073   p_ca_tax_information_category,
1074   p_ca_tax_information1,
1075   p_ca_tax_information2,
1076   p_ca_tax_information3,
1077   p_ca_tax_information4,
1078   p_ca_tax_information5,
1079   p_ca_tax_information6,
1080   p_ca_tax_information7,
1081   p_ca_tax_information8,
1082   p_ca_tax_information9,
1083   p_ca_tax_information10,
1084   p_ca_tax_information11,
1085   p_ca_tax_information12,
1086   p_ca_tax_information13,
1087   p_ca_tax_information14,
1088   p_ca_tax_information15,
1089   p_ca_tax_information16,
1090   p_ca_tax_information17,
1091   p_ca_tax_information18,
1092   p_ca_tax_information19,
1093   p_ca_tax_information20,
1094   p_ca_tax_information21,
1095   p_ca_tax_information22,
1096   p_ca_tax_information23,
1097   p_ca_tax_information24,
1098   p_ca_tax_information25,
1099   p_ca_tax_information26,
1100   p_ca_tax_information27,
1101   p_ca_tax_information28,
1102   p_ca_tax_information29,
1103   p_ca_tax_information30,
1104   p_object_version_number,
1105   p_prov_lsp_amount,
1106   p_ppip_exempt_flag
1107   );
1108   --
1109   -- Having converted the arguments into the
1110   -- plsql record structure we call the corresponding record
1111   -- business process.
1112   --
1113   upd(l_rec, p_effective_date, p_datetrack_mode);
1114   p_object_version_number       := l_rec.object_version_number;
1115   p_effective_start_date        := l_rec.effective_start_date;
1116   p_effective_end_date          := l_rec.effective_end_date;
1117   --
1118   --
1119   hr_utility.set_location(' Leaving:'||l_proc, 10);
1120 End upd;
1121 --
1122 end pay_cpt_upd;