1 PACKAGE HR_PTO_VIEWS AUTHID CURRENT_USER AS
2 /* $Header: hrptovws.pkh 120.0 2005/05/31 02:23 appldev noship $ */
3 --
4 -- Package global variables
5 --
6 TYPE g_per_acc_plan_rec_type IS RECORD
7 (plan_id pay_accrual_plans.accrual_plan_id%TYPE
8 ,plan_name pay_accrual_plans.accrual_plan_name%TYPE
9 ,UOM pay_accrual_plans.ACCRUAL_UNITS_OF_MEASURE%TYPE
10 ,assignment_id per_all_assignments_f.assignment_id%TYPE
11 ,net_entitlement_ytd number
12 ,gross_accruals_ytd number
13 ,gross_accruals_ptd number
14 ,plan_element_entry_id pay_element_entries_f.element_entry_id%TYPE
15 ,ee_start_date date
16 );
17
18 TYPE g_per_acc_plan_tab_type IS TABLE OF g_per_acc_plan_rec_type
19 INDEX BY BINARY_INTEGER;
20 -- ---------------------------------------------------------------------- +
21 -- Get_pto_ytd_net_entitlement
22 -- ---------------------------------------------------------------------- +
23 -- Returns the latest balance Year to date
24 -- This considers all the net calculation rules.
25 --
26 PROCEDURE Get_pto_ytd_net_entitlement(
27 p_assignment_id number
28 ,p_plan_id number
29 ,p_calculation_date date
30 ,p_net_entitlement OUT nocopy number
31 ,p_last_accrual_date OUT nocopy date);
32 -- ---------------------------------------------------------------------- +
33 -- Get_pto_ytd_gross
34 -- ---------------------------------------------------------------------- +
35 -- Calculates the GROSS amount Year to Date
36 -- This returns the number of units accrued year to date as of last
37 -- accrual date. This does not consider any net calculation rule.
38 --
39 PROCEDURE Get_pto_ytd_gross(
40 p_assignment_id number
41 ,p_plan_id number
42 ,p_calculation_date date
43 ,p_gross_accruals OUT nocopy number
44 ,p_last_accrual_date OUT nocopy date);
45 -- ---------------------------------------------------------------------- +
46 -- Get_pto_ptd_gross
47 -- ---------------------------------------------------------------------- +
48 -- Calculates the GROSS amount Period to Date
49 -- This returns the number of units accrued for a period as of
50 -- last accrual date.
51 --
52 PROCEDURE Get_pto_ptd_gross
53 (p_assignment_id number
54 ,p_plan_id number
55 ,p_calculation_date date
56 ,p_gross_accruals OUT nocopy number
57 ,p_last_accrual_date OUT nocopy date);
58 --
59 -- ---------------------------------------------------------------------- +
60 -- Get_pto_all_plans
61 -- ---------------------------------------------------------------------- +
62 -- Returns a list of plans associated with a person as of calculation date.
63 -- A PL/SQL table is returned and the following amounts are calculated:
64 -- + net entitlement year to date
65 -- + gross accruals year to date
66 -- + gross accruals period to date
67 --
68 FUNCTION Get_pto_all_plans(
69 p_person_id number
70 ,p_calculation_date date) RETURN g_per_acc_plan_tab_type;
71 --
72 -- ---------------------------------------------------------------------- +
73 -- Get_pto_stored_balance
74 -- ---------------------------------------------------------------------- +
75 -- Returns stored balance based on assignment action ID
76 -- Pre-requisites: defined balance ID exists for the plan and assignment
77 -- action ID is not null
78 -- Returns stored balance, otherwise NULL
79 --
80 FUNCTION Get_pto_stored_balance(
81 p_assignment_action_id number
82 ,p_plan_id number) RETURN NUMBER;
83 --
84 END HR_PTO_VIEWS;