1 Package per_fastformula_events_utility as
2 /* $Header: perffevt.pkh 120.1 2005/06/06 04:35:19 ssmukher noship $ */
3
4 -- Variables declaration--
5 -- Added by ssmukher for Employment Equity Report -----
6 TYPE date_tab is TABLE OF date
7 index by BINARY_INTEGER;
8 --
9 -- ----------------------------------------------------------------------------
10 -- |------------------------< per_fastformula_event >-------------------------|
11 -- ----------------------------------------------------------------------------
12 -- {Start Of Comments}
13 --
14 -- Description:
15 -- This package calls a fast formula repitiously, currently for each
16 -- assignment_start_date for each assignment for a person id. It then totals
17 -- the number returned from the fast formula.
18 -- It is designed to be expandable, based on event type entered.
19 --
20 --
21 -- Prerequisites:
22 -- An event type (which with current coding must also exist as a Fast Formula
23 -- name), person_id, start date and end date must be passed into the package.
24 --
25 --
26 -- In Parameters:
27 -- Name Reqd Type Description
28 -- p_event_type Yes varchar2 Decides which event to process
29 -- Must match a formula name.
30 -- p_business_group_id number If this is entered the code
31 -- will look for the promotions
32 -- fast formula for this
33 -- business group first
34 -- p_person_id Yes number Person for whom the fast
35 -- formula returns are counted.
36 -- p_start_date Yes varchar2 Date from which require data.
37 -- p_end_date Yes varchar2 Date to which require data
38 --
39 function per_fastformula_event(p_event_type in varchar2,
40 p_formula_type in varchar2,
41 p_business_group_id in number,
42 p_person_id in number,
43 p_start_date in date,
44 p_end_date in date)
45 return number;
46 --
47 -- ----------------------------------------------------------------------------
48 -- |--< per_fastformula_event >---overload function to run for a single date--|
49 -- ----------------------------------------------------------------------------
50 --
51 function per_fastformula_event(p_event_type in varchar2,
52 p_formula_type in varchar2,
53 p_business_group_id in number,
54 p_person_id in number,
55 p_effective_date in date)
56 return number;
57 --
58 -- ----------------------------------------------------------------------------
59 -- !--------- Added by ssmukher for Employment Equity Report -----------------!
60 -- |--< per_fastformula_event >---overload function to return promotion dates-|
61 -- ----------------------------------------------------------------------------
62 --
63 function per_fastformula_event(p_event_type in varchar2,
64 p_formula_type in varchar2,
65 p_business_group_id in number,
66 p_person_id in number,
67 p_start_date in date,
68 p_end_date in date,
69 p_date_tab out nocopy date_tab)
70 return number;
71 --
72 -- ----------------------------------------------------------------------------
73 -- |---------------------------< get_formula_id >-----------------------------|
74 -- ----------------------------------------------------------------------------
75 --
76 -- Description:
77 -- This package calls a gets the fast formula id,for the event type passed in,
78 -- first looking for this at business group level
79 --
80 --
81 -- Prerequisites:
82 -- An event type (which must be the same as the Fast Formula name)
83 -- and effective date must be passed into the package.
84 --
85 --
86 -- In Parameters:
87 -- Name Reqd Type Description
88 -- p_event_type Yes varchar2 Decides formula id to look for
89 -- Must match a formula name.
90 -- p_business_group_id number If this is entered the code
91 -- will look for the
92 -- fast formula for this
93 -- business group first
94 -- p_effective_date Yes date Effective Date of formula
95 --
96 function get_formula_id(p_event_type in varchar2,
97 p_formula_type in varchar2,
98 p_business_group_id in number,
99 p_effective_date in date)
100 return number;
101 --
102 end per_fastformula_events_utility;