DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_US_EXTRA_ASSIGNMENT_RULES

Source


1 PACKAGE BODY per_us_extra_assignment_rules AS
2 /* $Header: peasghcc.pkb 115.5 2001/12/10 09:58:16 pkm ship      $ */
3 PROCEDURE insert_tax_record
4   (p_effective_date    in date
5   ,p_assignment_id     in number
6   ) IS
7   BEGIN
8     pay_us_tax_internal.maintain_us_employee_taxes (
9        p_effective_date => p_effective_date
10       ,p_assignment_id  => p_assignment_id
11       ,p_delete_routine => 'ASSIGNMENT'
12       );
13   END;
14 --
15 PROCEDURE update_tax_record
16   (p_effective_date        in date
17   ,p_datetrack_update_mode in varchar2
18   ,p_assignment_id         in number
19   ,p_location_id           in number
20   ) IS
21   BEGIN
22     pay_us_tax_internal.maintain_us_employee_taxes (
23        p_effective_date => p_effective_date
24       ,p_datetrack_mode => p_datetrack_update_mode
25       ,p_assignment_id  => p_assignment_id
26       ,p_location_id    => p_location_id
27       ,p_delete_routine => 'ASSIGNMENT'
28       );
29   END;
30 --
31 PROCEDURE get_curr_ass_location_id
32   (p_effective_date        in date
33   ,p_datetrack_update_mode in varchar2
34   ,p_assignment_id         in number
35   ) IS
36 --
37   cursor csr_asg_data is
38     select asg.location_id
39     from   per_assignments_f asg
40     where  asg.assignment_id = p_assignment_id
41     and    p_effective_date between asg.effective_start_date
42            and asg.effective_end_date;
43   --
44 
45   BEGIN
46 --
47 -- Reset the global variable g_old_assgt_location
48 -- to its initial value.
49 --
50     per_us_extra_assignment_rules.g_old_assgt_location := hr_api.g_number;
51 --
52 -- read the location_id as of the effective_date to
53 -- store into the global for refrence in the package.procedure
54 -- pay_us_tax_internal.location_change.
55     open  csr_asg_data;
56      fetch csr_asg_data into
57         per_us_extra_assignment_rules.g_old_assgt_location;
58      if csr_asg_data%notfound then
59        close csr_asg_data;
60        hr_utility.set_message(801, 'HR_51253_PYP_ASS__NOT_VALID');
61        hr_utility.raise_error;
62      end if;
63      close csr_asg_data;
64   END;
65 --
66 PROCEDURE delete_tax_record
67   (p_final_process_date in date
68   ,p_assignment_id      in number
69   ) IS
70   BEGIN
71     pay_us_tax_internal.maintain_us_employee_taxes (
72        p_effective_date => p_final_process_date
73       ,p_datetrack_mode => 'DELETE'
74       ,p_assignment_id  => p_assignment_id
75       ,p_delete_routine => 'ASSIGNMENT'
76       );
77   END;
78 --
79 PROCEDURE pay_us_asg_reporting
80   (p_assignment_id      in number
81   ) IS
82   BEGIN
83     IF hr_utility.chk_product_install(p_product     => 'Oracle Payroll',
84                                       p_legislation => 'US') THEN
85       pay_asg_geo_pkg.pay_us_asg_rpt (
86         p_assignment_id  => p_assignment_id
87         );
88     END IF;
89   END;
90 END per_us_extra_assignment_rules;
91 --