DBA Data[Home] [Help]

PACKAGE: APPS.HR_NZ_HOLIDAYS

Source


1 PACKAGE hr_nz_holidays AUTHID CURRENT_USER AS
2   --  $Header: hrnzhol.pkh 115.19 2003/12/21 17:17:09 sclarke ship $
3   --
4   --    Copyright (C) 1999 Oracle Corporation
5   --    All Rights Reserved
6   --
7   --    Script to create NZ HRMS hr_nz_holidays package
8   --
9   --  Change List
10   --  ===========
11   --
12   --  Date        Author      Reference Description
13   --  -----------+-----------+---------+---------------------------------------
14   --  22 Dec 2003 sclarke     3064179   altered comments
15   --  06 Dec 2003 sclarke     3064179   Changed for NZ holidays 2003
16   --                                    Added comments to indicate redundant
17   --                                    functions
18   --  13 Mar 2003 vgsriniv    2264070   Added the function check_retro_eoy
19   --  03 Dec 2002 srrajago    2689221   Included 'nocopy' option to the 'out'
20   --                                    and 'in out' parameters of all the
21   --                                    procedures and functions.
22   --  25 Jun 2002 vgsriniv    2366349   Added a function get_adjustment_values
23   --  12 May 2002 apunekar    2364468   Corrected for errors on 9i.
24   --  21 Mar 2002 vgsriniv    2264070   Added functions to handle leaves
25   --                                    retroed after EOY period
26   --  24 Jan 2002 vgsriniv    2185116   Added two extra parameters to function
27   --                                    annual_leave_entitled_to_pay
28   --  17 Jan 2002 vgsriniv    2183135   Added function get_acp_start_date
29   --  04 Dec 2001 vgsriniv    2127114   added function get_leap_year_mon
30   --  31-JUL 2001 rbsinha     1422001   added function average_accrual_rate
31   --  02-Jun 2000 SClarke     1323990   Display of Leave accrual vs entitlement
32   --  26 Jan 2000 JTurner     1098494   Modified annual_leave_eoy_adjustment
33   --                                    function to cater for no carryover
34   --  25 Jan 2000 JTurner     1098494   Modified annual_leave_entitled_to_pay
35   --                                    function to cater for no carryover
36   --  14 Jan 2000 JTURNER     1098494   Added accrual_period_basis
37   --                                    function.
38   --  11 Jan 2000 J Turner              Moved Header symbol to 2nd line for
39   --                                    standards compliance and removed
40   --                                    pragmas.
41   --  13 Aug 1999 P.Macdonald           Add new functions
42   --  30 Jul 1999 J Turner              Added get_net_accrual fn
43   --  25 Jul 1999 P.Macdonald           Created
44 
45   g_package constant varchar2(33) := ' hr_nz_holidays.';
46 
47   FUNCTION get_acp_start_date
48   (p_assignment_id    IN    NUMBER
49   ,p_plan_id          IN    NUMBER
50   ,p_effective_date   IN    DATE)
51   RETURN DATE;
52 
53   FUNCTION get_accrual_plan_by_category
54   (p_assignment_id    IN    NUMBER
55   ,p_effective_date   IN    DATE
56   ,p_plan_category    IN    VARCHAR2)
57   RETURN NUMBER;
58 
59   --
60   -- =========================================================
61   -- 3064179
62   -- get_accrual_entitlement
63   -- This function becomes redundant on 01-APR-2004
64   -- =========================================================
65   --
66   FUNCTION get_accrual_entitlement
67   (p_assignment_id     IN  NUMBER
68   ,p_payroll_id        IN  NUMBER
69   ,p_business_group_id IN  NUMBER
70   ,p_plan_id           IN  NUMBER
71   ,p_calculation_date  IN  DATE
72   ,p_net_accrual       OUT NOCOPY NUMBER
73   ,p_net_entitlement   OUT NOCOPY NUMBER
74   ,p_calc_start_date   OUT NOCOPY DATE
75   ,p_last_accrual      OUT NOCOPY DATE
76   ,p_next_period_end   OUT NOCOPY DATE)
77   RETURN NUMBER;
78 
79  function check_periods
80   (p_payroll_id                   in      number)
81   return date;
82 --
83 --  get_net_accrual
84 --
85 --  This function is a wrapper for the
86 --  per_accrual_calc_functions.get_net_accrual procedure.  The
87 --  wrapper is required so that a FastFormula function can be
88 --  registered for use in formulas.
89 --
90 
91   FUNCTION get_net_accrual
92   (p_assignment_id     IN  NUMBER
93   ,p_payroll_id        IN  NUMBER
94   ,p_business_group_id IN  NUMBER
95   ,p_plan_id           IN  NUMBER
96   ,p_calculation_date  IN  DATE)
97   RETURN NUMBER;
98 
99   -- =========================================================
100   -- 3064179
101   -- This function becomes redundant on 01-APR-2004
102   -- =========================================================
103   PROCEDURE annual_leave_net_entitlement
104   (p_assignment_id     IN  NUMBER
105   ,p_payroll_id        IN  NUMBER
106   ,p_business_group_id IN  NUMBER
107   ,p_plan_id           IN  NUMBER
108   ,p_calculation_date  IN  DATE
109   ,p_start_date        OUT NOCOPY DATE
110   ,p_end_date          OUT NOCOPY DATE
111   ,p_net_entitlement   OUT NOCOPY NUMBER);
112 
113   FUNCTION get_net_entitlement
114   (p_assignment_id     IN  NUMBER
115   ,p_payroll_id        IN  NUMBER
116   ,p_business_group_id IN  NUMBER
117   ,p_calculation_date  IN  DATE)
118   RETURN NUMBER;
119 
120   FUNCTION call_accrual_formula
121   (p_assignment_id      IN NUMBER
122   ,p_payroll_id         IN NUMBER
123   ,p_business_group_id  IN NUMBER
124   ,p_accrual_plan_name  IN VARCHAR2
125   ,p_formula_name       IN VARCHAR2
126   ,p_calculation_date   IN DATE)
127   RETURN NUMBER;
128 
129   FUNCTION get_annual_leave_plan
130   (p_assignment_id      IN NUMBER
131   ,p_business_group_id  IN NUMBER
132   ,p_calculation_date   IN DATE)
133   RETURN NUMBER;
134 
135   FUNCTION get_continuous_service_date
136   (p_assignment_id      IN NUMBER
137   ,p_business_group_id  IN NUMBER
138   ,p_accrual_plan_id    IN NUMBER
139   ,p_calculation_date   IN DATE)
140   RETURN DATE;
141 
142   -- =========================================================
143   -- 3064179
144   -- This function becomes redundant on 01-APR-2004
145   -- =========================================================
146   FUNCTION get_anniversary_date
147   (p_assignment_id      IN NUMBER
148   ,p_business_group_id  IN NUMBER
149   ,p_calculation_date   IN DATE)
150   RETURN DATE;
151   -- PRAGMA RESTRICT_REFERENCES(get_anniversary_date, WNDS, WNPS);
152 
153   -- =========================================================
154   -- 3064179
155   -- This function is now redundant
156   -- Anniversary is calculated differently
157   -- =========================================================
158   FUNCTION get_last_anniversary
159   (p_assignment_id      IN NUMBER
160   ,p_business_group_id  IN NUMBER
161   ,p_calculation_date   IN DATE)
162   RETURN DATE;
163 
164   FUNCTION get_annual_entitlement
165   (p_assignment_id      IN NUMBER
166   ,p_business_group_id  IN NUMBER
167   ,p_calculation_date   IN DATE)
168   RETURN NUMBER;
169 
170   FUNCTION get_annual_leave_taken
171   (p_assignment_id      IN NUMBER
172   ,p_business_group_id  IN NUMBER
173   ,p_calculation_date   IN DATE
174   ,p_start_date         IN DATE
175   ,p_end_date           IN DATE)
176   RETURN NUMBER;
177 
178   FUNCTION num_weeks_for_avg_earnings
179   (p_assignment_id      IN  NUMBER
180   ,p_start_of_year_date IN  DATE)
181   RETURN NUMBER;
182 
183   FUNCTION get_ar_element_details
184   (p_assignment_id               IN NUMBER
185   ,p_business_group_id           IN NUMBER
186   ,p_calculation_date            IN DATE
187   ,p_element_type_id             OUT NOCOPY NUMBER
188   ,p_accual_plan_name_iv_id      OUT NOCOPY NUMBER
189   ,p_holiday_year_end_date_iv_id OUT NOCOPY NUMBER
190   ,p_hours_accrued_iv_id         OUT NOCOPY NUMBER)
191   RETURN NUMBER;
192 
193 
194 /* Bug# 2185116 Added p_ordinary_rate and p_type parameters */
195   FUNCTION annual_leave_entitled_to_pay
196   (p_assignment_id      IN NUMBER
197   ,p_business_group_id  IN NUMBER
198   ,p_payroll_id         in number
199   ,p_calculation_date   IN DATE
200   ,p_entitled_to_hours  IN NUMBER
201   ,p_start_date         IN DATE
202   ,p_anniversary_date   IN DATE
203   ,p_working_hours      IN NUMBER
204   ,p_ordinary_rate      IN NUMBER
205   ,p_type               IN VARCHAR2 DEFAULT 'H')
206   RETURN NUMBER;
207 
208   -- =========================================================
209   -- 3064179
210   -- This function becomes redundant on 01-APR-2004
211   -- =========================================================
212   -----------------------------------------------------------------------------
213   --  annual_leave_eoy_adjustment
214   -----------------------------------------------------------------------------
215   function annual_leave_eoy_adjustment
216   (p_business_group_id            in     number
217   ,p_payroll_id                   in     number
218   ,p_assignment_id                in     number
219   ,p_asg_hours                    in     number
220   ,p_year_end_date                in     date
221   ,p_in_advance_pay_carryover     in out nocopy number
222   ,p_in_advance_hours_carryover   in out nocopy number)
223   return number ;
224 
225 FUNCTION get_weekdays_in_period
226  (p_start_date          IN DATE
227  ,p_end_date            IN DATE)
228  RETURN NUMBER;
229 
230 function get_leap_year_mon
231   (p_start_date    in date
232   ,p_end_date      in date)
233 return number;
234 
235   -- =========================================================
236   -- 3064179
237   -- This function becomes redundant on 01-APR-2004
238   --  accrual_period_basis function
239   -- =========================================================
240   function accrual_period_basis
241   (p_payroll_id                   in      number
242   ,p_accrual_plan_id              in      number
243   ,p_assignment_id                in      number
244   ,p_calculation_start_date       in      date
245   ,p_calculation_end_date         in      date
246   ,p_service_start_date           in      date
247   ,p_business_group_hours         in      number
248   ,p_business_group_freq          in      varchar2)
249   return number ;
250   --
251   -- =========================================================
252   -- 3064179
253   -- This function becomes redundant on 01-APR-2004
254   --  accrual_daily_basis function
255   -- =========================================================
256   function accrual_daily_basis
257   (p_payroll_id                   in      number
258   ,p_accrual_plan_id              in      number
259   ,p_assignment_id                in      number
260   ,p_calculation_start_date       in      date
261   ,p_calculation_end_date         in      date
262   ,p_service_start_date           in      date
263   ,p_anniversary_date             in      date
264   ,p_business_group_hours         in      number
265   ,p_business_group_freq          in      varchar2)
266   return number ;
267   -----------------------------------------------------------------------------
268   --  function to get the average accrual rate  - bug 1422001
269   --  used for leave liability process
270   -----------------------------------------------------------------------------
271 function  average_accrual_rate(
272               p_assignment_id    IN  per_all_assignments_f.assignment_id%type
273              ,p_calculation_date IN  date
274              ,p_anniversary_date IN  date
275              ,p_asg_hours        IN  number ) return number ;
276 
277 /* Bug 2264070 Added the following 5 functions to handle leaves retroed after
278    EOY period */
279 
280 function get_act_ann_lev_pay(
281               p_assignment_id   IN number
282              ,p_element_entry_id IN number
283              ,p_assgt_action_id IN number
284              ,p_effective_date IN date) return number;
285 
286 function num_of_weeks_for_avg_earnings(
287               p_assignment_id IN  number
288              ,p_hol_ann_date IN date) RETURN  number;
289 
290 function get_current_action_type(
291               p_payroll_id       IN  number ) return number;
292 
293 
294 function gross_earnings_ytd_for_retro(
295               p_assignment_id     IN  per_all_assignments_f.assignment_id%type
296              ,p_effective_date    IN  date) return number;
297 
298 function retro_start_date(
299               p_assignment_id      IN number) return date;
300 
301 /* Bug 2366349 Added the function to handle adjustment elements for accrual
302    and entitlement */
303 
304 function get_adjustment_values
305   (p_assignment_id                   in      NUMBER
306   ,p_accrual_plan_id                 in      NUMBER
307   ,p_calc_end_date                   in      DATE
308   ,p_adjustment_element              in      VARCHAR2
309   ,p_start_date                      in      DATE
310   ,p_end_date                        in      DATE)
311   return number;
312 
313 /* Bug 2264070 */
314 function check_retro_eoy(p_element_entry_id in number)
315          Return number;
316 
317 END hr_nz_holidays ;