1 package PA_CALC_OVERTIME AUTHID CURRENT_USER as
2 /* $Header: PAXDLCOS.pls 120.3 2006/07/25 19:41:26 skannoji noship $ */
3 /*#
4 * This package contains procedures that can be modified to implement overtime calculation.
5 * @rep:scope public
6 * @rep:product PA
7 * @rep:lifecycle active
8 * @rep:displayname Overtime Calculation Extension
9 * @rep:compatibility S
10 * @rep:category BUSINESS_ENTITY PA_PROJECT
11 * @rep:category BUSINESS_ENTITY PA_PROJ_COST
12 * @rep:doccd 120pjapi.pdf See the Oracle Projects API's, Client Extensions, and Open Interfaces Reference
13 */
14 --
15 -- Process different types of overtime for each compensation rule
16 --
17 /*#
18 * This procedure determines the amount and type of overtime for each employee and period,
19 * creates new expenditure items for these values.
20 * @param New_Expenditure_Created Flag indicating whether a new expenditure is created
21 * @rep:paraminfo {@rep:required}
22 * @param R_P_USER_ID Identifier of the user
23 * @rep:paraminfo {@rep:required}
24 * @param R_P_Program_ID Standard Who column
25 * @rep:paraminfo {@rep:required}
26 * @param R_P_Request_ID Standard Who column
27 * @rep:paraminfo {@rep:required}
28 * @param R_P_Program_App_ID Standard Who column
29 * @rep:paraminfo {@rep:required}
30 * @param R_Person_Id The identifier of the person who entered the expenditure
31 * @rep:paraminfo {@rep:required}
32 * @param R_Expenditure_End_Date End date of expenditure batch
33 * @rep:paraminfo {@rep:required}
34 * @param R_Overtime_Exp_Type Overtime expenditure type
35 * @rep:paraminfo {@rep:required}
36 * @param R_C_Double_Time_Hours Number of hours worked in compensation rule type Double Time
37 * @rep:paraminfo {@rep:required}
38 * @param R_C_Time_And_A_Half_Hours Number of hours worked in compensation rule type Time and a Half
39 * @rep:paraminfo {@rep:required}
40 * @param R_C_Uncompensated_Hours Number of hours worked in compensation rule type Uncompensated
41 * @rep:paraminfo {@rep:required}
42 * @param R_C_Extra_OT_Hours_1 Number of other overtime working hours - 1
43 * @rep:paraminfo {@rep:required}
44 * @param R_C_Extra_OT_Hours_2 Number of other overtime working hours - 2
45 * @rep:paraminfo {@rep:required}
46 * @param R_Organization Expenditure incurred organization
47 * @rep:paraminfo {@rep:required}
48 * @param R_Rule_Set Compensation rule set
49 * @rep:paraminfo {@rep:required}
50 * @rep:scope public
51 * @rep:lifecycle active
52 * @rep:displayname Process Overtime
53 * @rep:compatibility S
54 */
55
56 procedure Process_Overtime(
57 New_Expenditure_Created OUT NOCOPY boolean,
58 R_P_User_ID IN number,
59 R_P_Program_ID IN number,
60 R_P_Request_ID IN number,
61 R_P_Program_App_ID IN number,
62 R_Person_Id IN number,
63 R_Expenditure_End_Date IN date,
64 R_Overtime_Exp_Type IN varchar2,
65 R_C_Double_Time_Hours IN OUT NOCOPY number,
66 R_C_Time_And_A_Half_Hours IN OUT NOCOPY number,
67 R_C_Uncompensated_Hours IN OUT NOCOPY number,
68 R_C_Extra_OT_Hours_1 IN OUT NOCOPY number,
69 R_C_Extra_OT_Hours_2 IN OUT NOCOPY number,
70 R_Organization IN number,
71 R_Rule_Set IN varchar2);
72
73 --
74 -- Fetch all overtime task ids.
75 -- Called from BEFOREREPORT trigger so that if no 'OT' project or
76 -- Double, Half, andUncomp tasks exist, report will stop.
77 --
78
79
80 /*#
81 * This procedure looks for overtime projects and tasks and returns all relevant task names up
82 * to a maximum of five. These tasks determine the column titles in overtime calculation report.
83 * @param Overtime_Tasks_Exist Flag indicating whether any overtime tasks exists for this project
84 * @rep:paraminfo {@rep:required}
85 * @param R_OT_Title_1 Title of the first item in the overtime calculation report
86 * @rep:paraminfo {@rep:required}
87 * @param R_OT_Title_2 Title of the second item in the overtime calculation report
88 * @rep:paraminfo {@rep:required}
89 * @param R_OT_Title_3 Title of the third item in the overtime calculation report
90 * @rep:paraminfo {@rep:required}
91 * @param R_OT_Title_4 Title of the fourth item in the overtime calculation report
92 * @rep:paraminfo {@rep:required}
93 * @param R_OT_Title_5 Title of the fifth item in the overtime calculation report
94 * @rep:paraminfo {@rep:required}
95 * @rep:scope public
96 * @rep:lifecycle active
97 * @rep:displayname Check If Overtime Tasks Exist
98 * @rep:compatibility S
99 */
100
101 procedure Check_Overtime_Tasks_Exist(
102 Overtime_Tasks_Exist OUT NOCOPY boolean,
103 R_OT_Title_1 OUT NOCOPY varchar2,
104 R_OT_Title_2 OUT NOCOPY varchar2,
105 R_OT_Title_3 OUT NOCOPY varchar2,
106 R_OT_Title_4 OUT NOCOPY varchar2,
107 R_OT_Title_5 OUT NOCOPY varchar2);
108
109 --
110 -- Create status record so labor distribution knows Report finished
111 --
112
113
114 /*#
115 * This procedure is called in the overtime calculation report PAXDLCOT.rdf to
116 * create a status record for the overtime calculation program. This record lets
117 * the costing program know whether the overtime calculation program is complete.
118 * @param R_P_User_ID Identifier of the user
119 * @rep:paraminfo {@rep:required}
120 * @param R_P_Request_ID Standard Who column
121 * @rep:paraminfo {@rep:required}
122 * @param R_P_Program_ID Standard Who column
123 * @rep:paraminfo {@rep:required}
124 * @param R_P_Program_App_ID Standard Who column
125 * @rep:paraminfo {@rep:required}
126 * @rep:scope public
127 * @rep:lifecycle active
128 * @rep:displayname Create status record.
129 * @rep:compatibility S
130 */
131 procedure create_status_record(
132 R_P_User_ID IN number,
133 R_P_Request_ID IN number,
134 R_P_Program_ID IN number,
135 R_P_Program_App_ID IN number);
136
137 end PA_CALC_OVERTIME;