1 PACKAGE pa_client_extn_budget AUTHID CURRENT_USER AS
2 /* $Header: PAXBCECS.pls 120.6 2006/07/20 09:22:53 psingara ship $ */
3 /*#
4 * This extension enables you to define rules for validating a budget before it's status is changed.
5 * @rep:scope public
6 * @rep:product PA
7 * @rep:lifecycle active
8 * @rep:displayname Budget Calculation Extension
9 * @rep:compatibility S
10 * @rep:category BUSINESS_ENTITY PA_PROJECT
11 * @rep:category BUSINESS_ENTITY PA_BUDGET
12 * @rep:category BUSINESS_ENTITY PA_FORECAST
13 * @rep:doccd 120pjapi.pdf See the Oracle Projects API's, Client Extensions, and Open Interfaces Reference
14 */
15
16 /*#
17 * This procedure is used to calculate the raw cost for a budget.
18 * @param x_budget_version_id The identifier of the budget version
19 * @rep:paraminfo {@rep:required}
20 * @param x_project_id The identifier of the project
21 * @rep:paraminfo {@rep:required}
22 * @param x_task_id The identifier of the task. This value is set to zero if budgeting is done at the project level.
23 * @rep:paraminfo {@rep:required}
24 * @param x_resource_list_member_id The identifier of the resource list member
25 * @rep:paraminfo {@rep:required}
26 * @param x_resource_list_id The identifier of the resource list
27 * @rep:paraminfo {@rep:required}
28 * @param x_resource_id The identifier of the resource
29 * @rep:paraminfo {@rep:required}
30 * @param x_start_date The start date of the budget line
31 * @rep:paraminfo {@rep:required}
32 * @param x_end_date The end date of the budget line
33 * @rep:paraminfo {@rep:required}
34 * @param x_period_name The effective period of the budget line (if any)
35 * @rep:paraminfo {@rep:required}
36 * @param x_quantity The quantity of the budget line
37 * @rep:paraminfo {@rep:required}
38 * @param x_raw_cost The raw cost of the budget line
39 * @rep:paraminfo {@rep:required}
40 * @param x_pm_product_code The product code of the product where the budget line originated
41 * @rep:paraminfo {@rep:required}
42 * @param x_txn_currency_code The transaction currency code
43 * @param x_error_code Error handling code
44 * @rep:paraminfo {@rep:required}
45 * @param x_error_message User-defined error message
46 * @rep:paraminfo {@rep:required}
47 * @rep:scope public
48 * @rep:lifecycle active
49 * @rep:displayname Calculate Raw Cost
50 * @rep:compatibility S
51 */
52 procedure Calc_Raw_Cost( x_budget_version_id in number,
53 x_project_id in number,
54 x_task_id in number,
55 x_resource_list_member_id in number,
56 x_resource_list_id in number,
57 x_resource_id in number,
58 x_start_date in date,
59 x_end_date in date,
60 x_period_name in varchar2,
61 x_quantity in number,
62 x_raw_cost in out NOCOPY number, --File.Sql.39 bug 4440895
63 x_pm_product_code in varchar2,
64 x_txn_currency_code IN VARCHAR2 DEFAULT NULL,
65 x_error_code out NOCOPY number, --File.Sql.39 bug 4440895
66 x_error_message out NOCOPY varchar2); --File.Sql.39 bug 4440895
67
68 /*#
69 * This procedure is used to calculate the burdened cost for a budget.
70 * @param x_budget_version_id The identifier of the budget version
71 * @rep:paraminfo {@rep:required}
72 * @param x_project_id The identifier of the project
73 * @rep:paraminfo {@rep:required}
74 * @param x_task_id The identifier of the task. This value is set to zero if budgeting is done at the project level.
75 * @rep:paraminfo {@rep:required}
76 * @param x_resource_list_member_id The identifier of the resource list member
77 * @rep:paraminfo {@rep:required}
78 * @param x_resource_list_id The identifier of the resource list
79 * @rep:paraminfo {@rep:required}
80 * @param x_resource_id The identifier of the resource
81 * @rep:paraminfo {@rep:required}
82 * @param x_start_date The start date of the budget line
83 * @rep:paraminfo {@rep:required}
84 * @param x_end_date The end date of the budget line
85 * @rep:paraminfo {@rep:required}
86 * @param x_period_name The effective period of the budget line (if any)
87 * @rep:paraminfo {@rep:required}
88 * @param x_quantity The quantity of the budget line
89 * @rep:paraminfo {@rep:required}
90 * @param x_raw_cost The raw cost of the budget line
91 * @rep:paraminfo {@rep:required}
92 * @param x_burdened_cost The burden cost of the budget line
93 * @rep:paraminfo {@rep:required}
94 * @param x_pm_product_code The product code of the product where the budget line originated
95 * @rep:paraminfo {@rep:required}
96 * @param x_txn_currency_code The transaction currency code
97 * @param x_error_code Error handling code
98 * @rep:paraminfo {@rep:required}
99 * @param x_error_message User-defined error message
100 * @rep:paraminfo {@rep:required}
101 * @rep:scope public
102 * @rep:lifecycle active
103 * @rep:displayname Calculate Burdened Cost
104 * @rep:compatibility S
105 */
106 procedure Calc_Burdened_Cost( x_budget_version_id in number,
107 x_project_id in number,
108 x_task_id in number,
109 x_resource_list_member_id in number,
110 x_resource_list_id in number,
111 x_resource_id in number,
112 x_start_date in date,
113 x_end_date in date,
114 x_period_name in varchar2,
115 x_quantity in number,
116 x_raw_cost in number,
117 x_burdened_cost in out NOCOPY number, --File.Sql.39 bug 4440895
118 x_pm_product_code in varchar2,
119 x_txn_currency_code IN VARCHAR2 DEFAULT NULL,
120 x_error_code out NOCOPY number, --File.Sql.39 bug 4440895
121 x_error_message out NOCOPY varchar2); --File.Sql.39 bug 4440895
122
123 /*#
124 * This procedure is used to calculate the revenue.
125 * @param x_budget_version_id The identifier of the budget version
126 * @rep:paraminfo {@rep:required}
127 * @param x_project_id The identifier of the project
128 * @rep:paraminfo {@rep:required}
129 * @param x_task_id The identifier of the task. This value is set to zero if budgeting is done at the project level.
130 * @rep:paraminfo {@rep:required}
131 * @param x_resource_list_member_id The identifier of the resource list member
132 * @rep:paraminfo {@rep:required}
133 * @param x_resource_list_id The identifier of the resource list
134 * @rep:paraminfo {@rep:required}
135 * @param x_resource_id The identifier of the resource
136 * @rep:paraminfo {@rep:required}
137 * @param x_start_date The start date of the budget line
138 * @rep:paraminfo {@rep:required}
139 * @param x_end_date The end date of the budget line
140 * @rep:paraminfo {@rep:required}
141 * @param x_period_name The effective period of the budget line (if any)
142 * @rep:paraminfo {@rep:required}
143 * @param x_quantity The quantity of the budget line
144 * @rep:paraminfo {@rep:required}
145 * @param x_raw_cost The raw cost of the budget line
146 * @rep:paraminfo {@rep:required}
147 * @param x_burdened_cost The burden cost of the budget line
148 * @rep:paraminfo {@rep:required}
149 * @param x_revenue The revenue of the budget line
150 * @rep:paraminfo {@rep:required}
151 * @param x_pm_product_code The product code of the product where the budget line originated
152 * @rep:paraminfo {@rep:required}
153 * @param x_txn_currency_code The transaction currency code
154 * @param x_error_code Error handling code
155 * @rep:paraminfo {@rep:required}
156 * @param x_error_message User-defined error message
157 * @rep:paraminfo {@rep:required}
158 * @rep:scope public
159 * @rep:lifecycle active
160 * @rep:displayname Calculate Revenue
161 * @rep:compatibility S
162 */
163 procedure Calc_Revenue( x_budget_version_id in number,
164 x_project_id in number,
165 x_task_id in number,
166 x_resource_list_member_id in number,
167 x_resource_list_id in number,
168 x_resource_id in number,
169 x_start_date in date,
170 x_end_date in date,
171 x_period_name in varchar2,
172 x_quantity in number,
173 x_revenue in out NOCOPY number, --File.Sql.39 bug 4440895
174 x_pm_product_code in varchar2,
175 x_txn_currency_code IN VARCHAR2 DEFAULT NULL,
176 x_error_code out NOCOPY number, --File.Sql.39 bug 4440895
177 x_error_message out NOCOPY varchar2, --File.Sql.39 bug 4440895
178 /*added thses new parameters for enhancement request */
179 x_raw_cost IN NUMBER DEFAULT NULL,
180 x_burdened_cost IN NUMBER DEFAULT NULL);
181
182 /*#
183 * This procedure is used to build additional validations that Oracle Projects checks whenever a budget is submitted or baselined. The parameter
184 * P_EVENT passes a value of either SUBMIT or BASELINE, to indicate the desired status of the budget being tested.
185 * @param p_draft_version_id The identifier of the draft budget version
186 * @rep:paraminfo {@rep:required}
187 * @param p_mark_as_original Marks the original request
188 * @rep:paraminfo {@rep:required}
189 * @param p_event Indicates the requested status of the budget. Value is either SUBMIT or BASELINE.
190 * @rep:paraminfo {@rep:required}
191 * @param p_project_id The identifier of the project
192 * @rep:paraminfo {@rep:required}
193 * @param p_budget_type_code The budge type code
194 * @rep:paraminfo {@rep:required}
195 * @param p_resource_list_id The identifier of the resource list for the budget
196 * @rep:paraminfo {@rep:required}
197 * @param p_project_type_class_code The project type class code of the budgets project
198 * @rep:paraminfo {@rep:required}
199 * @param p_created_by The identifier of the person who created the budget
200 * @rep:paraminfo {@rep:required}
201 * @param p_calling_module The module that called the extension
202 * @rep:paraminfo {@rep:required}
203 * @param p_fin_plan_type_id The identifier of the financial plan type
204 * @param p_version_type The type of version
205 * @param p_warnings_only_flag Flag indicating the level of errors the procedure generated. Y indicates that only warnings were generated. N indicates that errors were generated.
206 * @rep:paraminfo {@rep:required}
207 * @param p_err_msg_count The number of warnings and errors that the procedure generated
208 * @rep:paraminfo {@rep:required}
209 * @param p_error_code Error handling code
210 * @rep:paraminfo {@rep:required}
211 * @param p_error_message User-defined error message
212 * @rep:paraminfo {@rep:required}
213 * @rep:scope public
214 * @rep:lifecycle active
215 * @rep:displayname Verify Budget Rules
216 * @rep:compatibility S
217 */
218 PROCEDURE Verify_Budget_Rules
219 (
220 p_draft_version_id IN NUMBER
221 , p_mark_as_original IN VARCHAR2
222 , p_event IN VARCHAR2
223 , p_project_id IN NUMBER
224 , p_budget_type_code IN VARCHAR2
225 , p_resource_list_id IN NUMBER
226 , p_project_type_class_code IN VARCHAR2
227 , p_created_by IN NUMBER
228 , p_calling_module IN VARCHAR2
229 , p_fin_plan_type_id IN NUMBER DEFAULT NULL
230 , p_version_type IN VARCHAR2 DEFAULT NULL
231 , p_warnings_only_flag OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
232 , p_err_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
233 , p_error_code OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
234 , p_error_message OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
235 );
236
237 /* #2717299: Added the following procedure for the FinPlan WebADI Upload
238 Functionality. */
239 /*#
240 * You can use this procedure to modify the layout code for a budget version.
241 * @param p_budget_version_id Budget version identifier for which the layout code needs to be determined
242 * @rep:paraminfo {@rep:required}
243 * @param p_layout_code_in Layout code that is determined by the calling procedure for the budget version
244 * @rep:paraminfo {@rep:required}
245 * @param x_layout_code_out The customized layout code that the user would like to view for the budget version
246 * @rep:paraminfo {@rep:required}
247 * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
248 * @rep:paraminfo {@rep:required}
249 * @param x_msg_count API standard: number of error messages
250 * @rep:paraminfo {@rep:required}
251 * @param x_msg_data API standard: error message
252 * @rep:paraminfo {@rep:required}
253 * @rep:scope public
254 * @rep:lifecycle active
255 * @rep:displayname Get Custom Layout Code
256 * @rep:compatibility S
257 */
258 PROCEDURE Get_Custom_Layout_Code
259 (
260 p_budget_version_id IN NUMBER
261 , p_layout_code_in IN VARCHAR2
262 , x_layout_code_out OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
263 , x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
264 , x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
265 , x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
266 );
267
268 /* Added for bug 3736220*/
269 /*#
270 * This procedure is used to display error messages when you upload a project workplan from a spreadsheet. When you
271 * perform this action, the system calls both the Budget Calculation Extension and the Budget Verification Extension.
272 * You need to ensure that the lookup codes are defined for all the error messages that you would like to stamp on an uploaded budget.
273 * @param p_resource_assignment_id Identifier of the resource assignment against which the error is displayed
274 * @rep:paraminfo {@rep:required}
275 * @param p_error_code The lookup code which corresponds to the error message
276 * @rep:paraminfo {@rep:required}
277 * @param x_return_status API standard: return status of the API (success/failure/unexpected error)
278 * @rep:paraminfo {@rep:required}
279 * @param x_msg_count API standard: number of error messages
280 * @rep:paraminfo {@rep:required}
281 * @param x_msg_data API standard: error message
282 * @rep:paraminfo {@rep:required}
283 * @rep:scope public
284 * @rep:lifecycle active
285 * @rep:displayname Stamp Client Extension Errors
286 * @rep:compatibility S
287 */
288 PROCEDURE Stamp_Client_Extn_Errors
289 ( p_resource_assignment_id IN NUMBER
290 ,p_error_code IN VARCHAR2
291 , x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
292 , x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
293 , x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
294 );
295
296 END pa_client_extn_budget;