1 PACKAGE ozf_actbudgets_pvt AS
2 /*$Header: ozfvbdgs.pls 120.4.12010000.4 2008/10/08 03:40:32 nirprasa ship $*/
3 -- Start of Comments
4 --
5 -- NAME
6 -- OZF_ACTBUDGETS_PVT
7 --
8 -- PURPOSE
9 -- This package is a Private API for managing Budget information in
10 -- OZF.
11 --
12 -- Procedures:
13 -- Create_Act_Budgets (see below for specification)
14 -- Update_Act_Budgets (see below for specification)
15 -- Delete_Act_Budgets (see below for specification)
16 -- Lock_Act_Budgets (see below for specification)
17 -- Validate_Act_Budgets (see below for specification)
18 -- Validate_Act_Budgets_Items (see below for specification)
19 -- Validate_Act_Budgets_Record (see below for specification
20 -- Complete_Act_Budgets_Rec
21 -- Init_Act_Budgets_Rec
22 --
23 -- NOTES
24 -- Added by mpande 04/26/2001
25 -- The Transfer_type columns can have the follwoing values
26 -- REQUEST -- When an object requests money . A workflow is submitted
27 -- Workflow for FUND --> to FUND is different than FUND --> OTHER OBJECTS (CAMP,EVEH)
28 -- TRANSFER -- This means it is a transfer back to the parent or the FUND
29 -- RELEASE -- Only for FUND ( Releasing Holdback)
30 -- RESERVE -- Only for FUND ( Reserving Holdback)
31 -- UTILIZED-- Utilized budget Amounts by the objects
32 --- The data in the table looks the following
33 -- Budget Source is always the depleting object and used_by is always the target object
34 -- Used_by_id Used_by_type bdg_src_id bdg_src_type transfer_type request_amt req cur apprv_amt appr_in_curr apprv_org_amt
35 -- C1 CAMP F1 FUND 'REQUEST' 1000 USD 1000 GBP 300
36 --
37 -- (C1 curr) (C1 curr) (F1 curr)
38 -- C1 CAMP F2 FUND 'REQUEST' 2000 USD 1500 CND 500
39 -- (C1 curr) (C1 curr) (F2 curr)
40 -- F1 CAMP C1 FUND 'TRANSFER' 1000 USD 500 GBP 150
41 -- (F1 curr) (F1 curr) (F1 curr)
42 -- CS1 CSCH C1 FUND 'REQUEST' 1200 RS 60,000 USD 1200
43 -- (CS1 curr) (CS1 curr) (C1 curr)
44
45 --- Sourcing Rules
46 -- 1) You can only source directly frma budget or from your parent object
47 -- for eg. Campaign schedule can only source from its parent campaign or a budget
48 -- and not from its peer or anyother object
49 -- 2) Progrozf cannot source from a budget
50 -- 3) Offers have to source directly from a budget . It cannot use the fund from its parent activity
51 -- 4) You cannot transfer more than what you have requested
52 -- History created sugupta 04/12/2000
53 -- 25-Jun-2000 choang Commented out show errors and uncommented exit
54 -- 14-Aug-2000 choang Modified signature of act_budgets_rec_type.
55 -- 16-Aug-2000 choang Added Init_Act_Budgets_Rec, Approve_ActBudget,
56 -- Reject_ActBudget and Close_ActBudget.
57 -- 20-Aug-2000 choang Added user_status_id.
58 -- 22-Aug-2000 choang Added can_modify() and is_account_closed().
59 -- 12-Sep-2000 choang 1) Moved approval API's to OZF_BudgetApproval_PVT.
60 -- 22-FEB-2001 mpande ADDED two more columns, adjusted_flag and posted flag
61 -- 22-Feb-2001 mpande Modified for All Hornet changes.
62 -- 1) Addded 7 new columns and added functional validation
63 -- 2) ALL FUND_TRANSFERS and requests are going to be performed from this table-- Added code for that
64 -- 3) Integrated with notes API to create justification and comments
65 -- 04/26/2001 mpande 1)Added code for utilizarions , requesterId , date_requred_by , transfertype and respective validations
66 -- 2) Added code for Parent source_id -- This value is always Budget id
67 -- 3) Added Code for transfer_type - Utilizations
68 -- 05/22/2001 mpande Added a new overloaded procedure for update_Act_budget
69 -- 06/07/2001 feliu Added partner_holding_type, partner_address_id, vendor_id.
70 -- 06/29/2001 feliu Added owner_id.
71 -- 10/22/2001 mpande Changed code different owner allocation bug
72 -- 10/23/2001 feliu Added record type act_util_rec_type, recal_flag in act_budgets_rec_type, and
73 -- one more input p_act_util_rec in create_act_budgets. added one overload create_act_budgets.
74 -- 12/19/2001 mpande Added Code for src_curr_request_amount
75 -- 02/26/2002 fliu added more comlumns for act_util_rec_type.
76 -- 04/16/2002 feliu Moved some functions to OZF_ACTBUDGETRULES_PVT to reduce this file size.
77 -- 10/28/2002 feliu Change for 11.5.9
78 -- 10/28/2002 feliu added scan_unit,scan_unit_remaining,activity_product_id,scan_type_id for act_util_rec_type.
79 -- 11/12/2002 feliu added volume_offer_tiers_id.
80 -- 11/04/2003 yzhao 11.5.10: added billto_cust_account_id, reference_type, reference_id to act_util_rec_type
81 -- 06/12/2005 rimehrot R12 Changes
82 -- 03/16/2006 kdass fixed bug 5080481 - exposed flexfields
83 -- 08/01/2008 nirprasa fixed bug 7030415
84 -- 08/14/2008 nirprasa fixed bug 6657242
85 -- 08/14/2008 nirprasa fixed bug 7425189
86 -- End of Comments
87
88 -- global constants
89
90 TYPE act_budgets_rec_type IS RECORD(
91 activity_budget_id NUMBER,
92 last_update_date DATE,
93 last_updated_by NUMBER,
94 creation_date DATE,
95 created_by NUMBER,
96 last_update_login NUMBER,
97 object_version_number NUMBER,
98 act_budget_used_by_id NUMBER,
99 arc_act_budget_used_by VARCHAR2(30),
100 budget_source_type VARCHAR2(30),
101 budget_source_id NUMBER,
102 transaction_type VARCHAR2(30),
103 request_amount NUMBER,
104 request_currency VARCHAR2(15),
105 request_date DATE,
106 user_status_id NUMBER,
107 status_code VARCHAR2(30),
108 approved_amount NUMBER,
109 approved_original_amount NUMBER,
110 approved_in_currency VARCHAR2(15),
111 -- ADDED 06/18/2000 SUGUPTA
112 approval_date DATE,
113 approver_id NUMBER,
114 spent_amount NUMBER,
115 partner_po_number VARCHAR2(50),
116 partner_po_date DATE,
117 partner_po_approver VARCHAR2(120),
118 --ADDED 02/22/2001 MPANDE
119 adjusted_flag VARCHAR2(1),
120 posted_flag VARCHAR2(1),
121 justification VARCHAR(4000),
122 comment VARCHAR(4000),
123 parent_act_budget_id NUMBER,
124 contact_id NUMBER,
125 reason_code VARCHAR2(30),
126 transfer_type VARCHAR2(30),
127 requester_id NUMBER,
128 date_required_by DATE,
129 parent_source_id NUMBER,
130 parent_src_curr VARCHAR2(30),
131 parent_src_apprvd_amt NUMBER,
132 partner_holding_type VARCHAR2(30),
133 partner_address_id NUMBER,
134 vendor_id NUMBER,
135 owner_id NUMBER,
136 recal_flag VARCHAR2(1),
137 exchange_rate_date DATE,-- nirprasa, Added for bug 7425189
138 -- **************--
139 attribute_category VARCHAR2(30),
140 attribute1 VARCHAR2(150),
141 attribute2 VARCHAR2(150),
142 attribute3 VARCHAR2(150),
143 attribute4 VARCHAR2(150),
144 attribute5 VARCHAR2(150),
145 attribute6 VARCHAR2(150),
146 attribute7 VARCHAR2(150),
147 attribute8 VARCHAR2(150),
148 attribute9 VARCHAR2(150),
149 attribute10 VARCHAR2(150),
150 attribute11 VARCHAR2(150),
151 attribute12 VARCHAR2(150),
152 attribute13 VARCHAR2(150),
153 attribute14 VARCHAR2(150),
154 attribute15 VARCHAR2(150),
155 src_curr_req_amt NUMBER);
156
157 TYPE act_util_rec_type IS RECORD
158 (
159 object_type VARCHAR2(30)
160 ,object_id NUMBER
161 ,adjustment_type VARCHAR2(30)
162 ,camp_schedule_id NUMBER
163 ,adjustment_type_id NUMBER
164 ,product_level_type VARCHAR2(30)
165 ,product_id NUMBER
166 ,cust_account_id NUMBER
167 ,price_adjustment_id NUMBER
168 ,utilization_type VARCHAR2(30)
169 ,adjustment_date DATE
170 ,gl_date DATE
171 ,scan_unit NUMBER
172 ,scan_unit_remaining NUMBER
173 ,activity_product_id NUMBER
174 ,scan_type_id NUMBER -- this colums is not in the table but required for scan data offers adj
175 ,volume_offer_tiers_id NUMBER
176 -- 11/04/2003 yzhao 11.5.10: added
177 ,billto_cust_account_id NUMBER
178 ,reference_type VARCHAR2(30)
179 ,reference_id NUMBER
180 -- 01/02/2004 kdass added for 11.5.10
181 ,order_line_id NUMBER
182 ,org_id NUMBER
183 ,orig_utilization_id NUMBER
184 ,gl_posted_flag VARCHAR2(1)
185 ,bill_to_site_use_id NUMBER
186 ,ship_to_site_use_id NUMBER
187 --07/26/2005 kdass added for 12.0
188 ,gl_account_credit NUMBER
189 ,gl_account_debit NUMBER
190 ,site_use_id NUMBER -- fix for bug 6657242
191 ,exchange_rate_date DATE -- nirprasa, Added for bug 7425189
192 --kdass added flexfields
193 ,attribute_category VARCHAR2(30)
194 ,attribute1 VARCHAR2(150)
195 ,attribute2 VARCHAR2(150)
196 ,attribute3 VARCHAR2(150)
197 ,attribute4 VARCHAR2(150)
198 ,attribute5 VARCHAR2(150)
199 ,attribute6 VARCHAR2(150)
200 ,attribute7 VARCHAR2(150)
201 ,attribute8 VARCHAR2(150)
202 ,attribute9 VARCHAR2(150)
203 ,attribute10 VARCHAR2(150)
204 ,attribute11 VARCHAR2(150)
205 ,attribute12 VARCHAR2(150)
206 ,attribute13 VARCHAR2(150)
207 ,attribute14 VARCHAR2(150)
208 ,attribute15 VARCHAR2(150)
209 );
210
211 G_MISS_ACT_UTIL_REC act_util_rec_type;
212
213 /****************************************************************************/
214 -- Start of Comments
215 --
216 -- API name : create_act_budgets
217 -- Type : Private
218 -- Function : Create a row in OZF_ACT_Budgets table
219 --
220 -- Pre-reqs : None
221 --
222 -- Version : Current version 1.0
223 -- Initial version 1.0
224 --
225 -- Note
226 -- End Of Comments
227 /****************************************************************************/
228
229 PROCEDURE create_act_budgets(
230 p_api_version IN NUMBER
231 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
232 ,p_commit IN VARCHAR2 := fnd_api.g_false
233 ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
234 ,x_return_status OUT NOCOPY VARCHAR2
235 ,x_msg_count OUT NOCOPY NUMBER
236 ,x_msg_data OUT NOCOPY VARCHAR2
237 ,p_act_budgets_rec IN act_budgets_rec_type
238 ,x_act_budget_id OUT NOCOPY NUMBER);
239
240 /****************************************************************************/
241 -- Start of Comments
242 --
243 -- API name : create_act_budgets
244 -- Type : Private
245 -- Function : Create a row in OZF_ACT_Budgets table
246 --
247 -- Pre-reqs : None
248 --
249 -- Version : Current version 1.0
250 -- Initial version 1.0
251 --
252 -- Note : This overloaded procedure is to be called from
253 -- recalculating concurrent program.
254 --
255 -- End Of Comments
256 /****************************************************************************/
257
258 PROCEDURE create_act_budgets(
259 p_api_version IN NUMBER
260 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
261 ,p_commit IN VARCHAR2 := fnd_api.g_false
262 ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
263 ,x_return_status OUT NOCOPY VARCHAR2
264 ,x_msg_count OUT NOCOPY NUMBER
265 ,x_msg_data OUT NOCOPY VARCHAR2
266 ,p_act_budgets_rec IN act_budgets_rec_type
267 ,p_act_util_rec IN act_util_rec_type
268 ,x_act_budget_id OUT NOCOPY NUMBER
269 ,p_approval_flag IN VARCHAR2 :=fnd_api.g_false);
270
271
272 /****************************************************************************
273 * Ying Zhao: 06/21/2004 overloaded function to return actual utilized amount for chargeback
274 * added x_utilized_amount
275 */
276 PROCEDURE create_act_budgets(
277 p_api_version IN NUMBER
278 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
279 ,p_commit IN VARCHAR2 := fnd_api.g_false
280 ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
281 ,x_return_status OUT NOCOPY VARCHAR2
282 ,x_msg_count OUT NOCOPY NUMBER
283 ,x_msg_data OUT NOCOPY VARCHAR2
284 ,p_act_budgets_rec IN act_budgets_rec_type
285 ,p_act_util_rec IN act_util_rec_type
286 ,x_act_budget_id OUT NOCOPY NUMBER
287 ,p_approval_flag IN VARCHAR2 :=fnd_api.g_false
288 ,x_utilized_amount OUT NOCOPY NUMBER);
289
290
291 /****************************************************************************/
292 -- Start of Comments
293 --
294 -- API name : Update_Act_Budgets
295 -- Type : Private
296 -- Function : Update a row in OZF_ACT_Budgets table
297 --
298 -- Pre-reqs : None
299 --
300 -- Version : Current version 1.0
301 -- Initial version 1.0
302 --
303 -- Note : 1. p_act_Budgets_rec.ACT_BUDGET_USED_BY_ID, ARC_ACT_BUDGET_USED_BY
304 -- BUDGET_SOURCE_TYPE, BUDGET_SOURCE_ID are required parameters
305 -- Should also make CONTRIBUTION_AMOUNT mandatory
306 -- 2. if source type is PARTNER, then PO related fields become mandatory
307 -- 3. p_act_Budgets_rec.activity_budget_id is not updatable
308 --
309 -- End Of Comments
310 /****************************************************************************/
311
312 PROCEDURE update_act_budgets(
313 p_api_version IN NUMBER
314 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
315 ,p_commit IN VARCHAR2 := fnd_api.g_false
316 ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
317 ,x_return_status OUT NOCOPY VARCHAR2
318 ,x_msg_count OUT NOCOPY NUMBER
319 ,x_msg_data OUT NOCOPY VARCHAR2
320 ,p_act_budgets_rec IN act_budgets_rec_type);
321 /****************************************************************************/
322 -- Start of Comments
323 --
324 -- API name : Update_Act_Budgets
325 -- Type : Private
326 -- Function : Update a row in OZF_ACT_Budgets table
327 -- Note : This overloaded procedure is to be called from
328 -- Workflow to maintain the context.
329 --
330 -- End Of Comments
331 /****************************************************************************/
332 PROCEDURE update_act_budgets(
333 p_api_version IN NUMBER
334 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
335 ,p_commit IN VARCHAR2 := fnd_api.g_false
336 ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
337 ,x_return_status OUT NOCOPY VARCHAR2
338 ,x_msg_count OUT NOCOPY NUMBER
339 ,x_msg_data OUT NOCOPY VARCHAR2
340 ,p_act_budgets_rec IN act_budgets_rec_type
341 ,p_parent_process_flag IN VARCHAR2
342 ,p_parent_process_key IN VARCHAR2
343 ,p_parent_context IN VARCHAR2
344 ,p_parent_approval_flag IN VARCHAR2
345 ,p_continue_flow IN VARCHAR2
346 ,p_child_approval_flag IN VARCHAR2 := fnd_api.g_false
347 -- 10/22/2001 mpande added for allocation bug
348 ,p_requestor_owner_flag IN VARCHAR2 := 'N'
349 ,p_act_util_rec IN act_util_rec_type := NULL
350 );
351
352
353
354 /****************************************************************************/
355 -- Start of Comments
356 --
357 -- API name : Update_Act_Budgets
358 -- Type : Private
359 -- Function : Update a row in OZF_ACT_Budgets table
360 -- Note : This overloaded procedure is to be called from
361 -- Workflow to maintain the context.
362 --
363 -- End Of Comments
364 /****************************************************************************/
365 PROCEDURE update_act_budgets(
366 p_api_version IN NUMBER
367 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
368 ,p_commit IN VARCHAR2 := fnd_api.g_false
369 ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
370 ,x_return_status OUT NOCOPY VARCHAR2
371 ,x_msg_count OUT NOCOPY NUMBER
372 ,x_msg_data OUT NOCOPY VARCHAR2
373 ,p_act_budgets_rec IN act_budgets_rec_type
374 ,p_parent_process_flag IN VARCHAR2
375 ,p_parent_process_key IN VARCHAR2
376 ,p_parent_context IN VARCHAR2
377 ,p_parent_approval_flag IN VARCHAR2
378 ,p_continue_flow IN VARCHAR2
379 ,p_child_approval_flag IN VARCHAR2 := fnd_api.g_false
380 -- 10/22/2001 mpande added for allocation bug
381 ,p_requestor_owner_flag IN VARCHAR2 := 'N'
382 ,p_act_util_rec IN act_util_rec_type := NULL
383 ,x_utilized_amount OUT NOCOPY NUMBER);
384
385
386 /****************************************************************************/
387 -- Start of Comments
388 --
389 -- API name : Update_Act_Budgets
390 -- Type : Private
391 -- Function : Update a row in OZF_ACT_Budgets table
392 -- Note : This overloaded procedure is to be called from fund module for child -- parent approval
393 -- Workflow to maintain the context.
394 --
395 -- End Of Comments
396 /****************************************************************************/
397 PROCEDURE update_act_budgets(
398 p_api_version IN NUMBER
399 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
400 ,p_commit IN VARCHAR2 := fnd_api.g_false
401 ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
402 ,x_return_status OUT NOCOPY VARCHAR2
403 ,x_msg_count OUT NOCOPY NUMBER
404 ,x_msg_data OUT NOCOPY VARCHAR2
405 ,p_act_budgets_rec IN act_budgets_rec_type
406 ,p_child_approval_flag IN VARCHAR2
407 -- 10/22/2001 mpande added for allocation bug
408 ,p_requestor_owner_flag IN VARCHAR2 := 'N'
409 ,p_act_util_rec IN act_util_rec_type := NULL
410 );
411
412
413 /****************************************************************************
414 * Ying Zhao: 06/21/2004 overloaded function to return actual utilized amount for chargeback
415 * added x_utilized_amount
416 */
417 PROCEDURE update_act_budgets(
418 p_api_version IN NUMBER
419 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
420 ,p_commit IN VARCHAR2 := fnd_api.g_false
421 ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
422 ,x_return_status OUT NOCOPY VARCHAR2
423 ,x_msg_count OUT NOCOPY NUMBER
424 ,x_msg_data OUT NOCOPY VARCHAR2
425 ,p_act_budgets_rec IN act_budgets_rec_type
426 ,p_child_approval_flag IN VARCHAR2
427 -- 10/22/2001 mpande added for allocation bug
428 ,p_requestor_owner_flag IN VARCHAR2 := 'N'
429 ,p_act_util_rec IN act_util_rec_type := NULL
430 ,x_utilized_amount OUT NOCOPY NUMBER
431 );
432
433
434 /*****************************************************************************************/
435 -- Start of Comments
436 --
437 -- API name : Delete_Act_Budgets
438 -- Type : Private
439 -- Function : Delete a row in OZF_ACT_BudgetsS table
440 --
441 -- Pre-reqs : None
442 -- Version : Current version 1.0
443 -- Initial version 1.0
444 --
445 -- Note : 1. p_Budgets_rec.activity_budget_id, object_version_number is a required parameter
446 --
447 -- End Of Comments
448
449 PROCEDURE delete_act_budgets(
450 p_api_version IN NUMBER
451 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
452 ,p_commit IN VARCHAR2 := fnd_api.g_false
453 ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
454 ,x_return_status OUT NOCOPY VARCHAR2
455 ,x_msg_count OUT NOCOPY NUMBER
456 ,x_msg_data OUT NOCOPY VARCHAR2
457 ,p_act_budget_id IN NUMBER
458 ,p_object_version IN NUMBER);
459
460 /*****************************************************************************************/
461 -- Start of Comments
462 --
463 -- API name : Lock_Act_Budgets
464 -- Type : Private
465 -- Function : Lock a row in OZF_ACT_BudgetsS table
466 --
467 -- Pre-reqs : None
468 -- Paramaeters :
469 -- IN :
470 -- Version : Current version 1.0
471 -- Initial version 1.0
472 --
473 -- Note : p_Budgets_rec.activity_Budget_id, object_version_number is a required parameter
474 --
475 -- End Of Comments
476
477 PROCEDURE lock_act_budgets(
478 p_api_version IN NUMBER
479 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
480 ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
481 ,x_return_status OUT NOCOPY VARCHAR2
482 ,x_msg_count OUT NOCOPY NUMBER
483 ,x_msg_data OUT NOCOPY VARCHAR2
484 ,p_act_budget_id IN NUMBER
485 ,p_object_version IN NUMBER);
486
487 /*****************************************************************************************/
488 -- Start of Comments
489 --
490 -- API name : Validate_Act_Budgets
491 -- Type : Private
492 -- Function : Validate a row in OZF_ACT_BudgetsS table
493 --
494 -- Pre-reqs : None
495 -- Version : Current version 1.0
496 -- Initial version 1.0
497 --
498 -- Note : 1. p_Budgets_rec.activity_Budget_id is a required parameter
499 -- 2. x_return_status will be FND_API.G_RET_STS_SUCCESS,
500 -- FND_API.G_RET_STS_ERROR, or
501 -- FND_API.G_RET_STS_UNEXP_ERROR
502 --
503 -- End Of Comments
504 /*****************************************************************************************/
505 PROCEDURE validate_act_budgets(
506 p_api_version IN NUMBER
507 ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
508 ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
509 ,x_return_status OUT NOCOPY VARCHAR2
510 ,x_msg_count OUT NOCOPY NUMBER
511 ,x_msg_data OUT NOCOPY VARCHAR2
512 ,p_act_budgets_rec IN act_budgets_rec_type);
513
514 /*****************************************************************************************/
515 -- Start of Comments
516 --
517 -- NAME
518 -- Validate_Act_Budgets_Items
519 --
520 -- PURPOSE
521 -- This procedure is to validate busget items
522 -- HISTORY
523 -- 24-Aug-2000 choang Changed ams_fund_details_v to ams_fund_details_v
524 -- 22-Feb-2001 mpande Modified for Hornet changes.
525 -- End of Comments
526 /*****************************************************************************************/
527 PROCEDURE validate_act_budgets_items(
528 p_act_budgets_rec IN act_budgets_rec_type
529 ,p_validation_mode IN VARCHAR2 := jtf_plsql_api.g_create
530 ,x_return_status OUT NOCOPY VARCHAR2);
531 /*****************************************************************************************/
532 -- Start of Comments
533 --
534 -- NAME
535 -- Validate_Act_Budgets_Record
536 --
537 -- PURPOSE
538 -- This procedure is to validate budget record
539 --
540 -- NOTES
541 -- HISTORY
542 -- 22-Aug-2000 choang Added validation of credit request amounts.
543 -- 23-Jan-2001 mpande Added validation in validation_actbudget_rec for not
544 -- to submit for approval when the requested amount is 0. BUG# 1604000
545 -- 22-Feb-2001 mpande Modified for Hornet changes.
546 -- End of Comments
547 /*****************************************************************************************/
548 PROCEDURE validate_act_budgets_record(
549 p_act_budgets_rec IN act_budgets_rec_type
550 ,p_validation_mode IN VARCHAR2 := jtf_plsql_api.g_create
551 ,x_return_status OUT NOCOPY VARCHAR2);
552 /*****************************************************************************************/
553 -- Start of Comments
554 --
555 -- NAME
556 -- complete_act_budgets_rec
557 --
558 -- PURPOSE
559 -- This procedure is to complete budget record
560 --
561 -- NOTES
562 -- HISTORY
563 -- End of Comments
564 /*****************************************************************************************/
565 PROCEDURE complete_act_budgets_rec(
566 p_act_budgets_rec IN act_budgets_rec_type
567 ,x_act_budgets_rec OUT NOCOPY act_budgets_rec_type);
568
569
570 /*****************************************************************************************/
571 -- Start of Comments
572 --
573 -- NAME
574 -- Init_Act_Budgets_Rec
575 -- PURPOSE
576 -- Initialize all column values to FND_API.g_miss_char/num/date
577 -- HISTORY
578 -- 15-Aug-2000 choang Created.
579 -- 22-Feb-2001 mpande Modified for Hornet changes.
580 /*****************************************************************************************/
581 PROCEDURE init_act_budgets_rec(
582 x_act_budgets_rec OUT NOCOPY act_budgets_rec_type);
583 /*****************************************************************************************/
584 -- Start of Comments
585 --
586 -- Procedure and function declarations.
587 --
588 -- NAME
589 -- get_object_currency
590 -- PURPOSE
591 -- Return the currency code of the object trying to
592 -- associate a budget.
593 /*****************************************************************************************/
594 FUNCTION get_object_currency(
595 p_object IN VARCHAR2
596 ,p_object_id IN NUMBER
597 ,x_return_status OUT NOCOPY VARCHAR2)
598 RETURN VARCHAR2;
599
600
601 /*****************************************************************************************/
602 -- Start of Comments
603 --
604 -- Procedure and function declarations.
605 --
606 -- NAME
607 -- create_child_act_budget
608 -- PURPOSE
609 -- create child requests when sourcing from parent.
610 --
611 /*****************************************************************************************/
612
613 PROCEDURE create_child_act_budget (
614 x_return_status OUT NOCOPY VARCHAR2,
615 x_msg_count OUT NOCOPY NUMBER,
616 x_msg_data OUT NOCOPY VARCHAR2,
617 p_act_budgets_rec IN ozf_actbudgets_pvt.act_budgets_rec_type,
618 p_exchange_rate_type IN VARCHAR2 DEFAULT FND_API.G_MISS_CHAR --Added for bug 7030415
619 );
620
621 /*****************************************************************************************/
622 -- nirprasa, Added for bug 7425189
623 -- NAME
624 -- update_reconcile_objfundsum
625 --
626 -- PURPOSE
627 -- This Procedure updates record in object fund summary table
628 -- for budget reconcile. This will not affect any other flow.
629 --
630 -- NOTES
631 --
632 -- HISTORY
633
634 /******************************************************************************************/
635 PROCEDURE update_reconcile_objfundsum (
636 p_api_version IN NUMBER,
637 p_init_msg_list IN VARCHAR2 := Fnd_Api.G_FALSE,
638 p_validation_level IN NUMBER := Fnd_Api.G_VALID_LEVEL_FULL,
639 p_objfundsum_rec IN OZF_OBJFUNDSUM_PVT.objfundsum_rec_type,
640 p_conv_date IN DATE,
641 x_return_status OUT NOCOPY VARCHAR2,
642 x_msg_count OUT NOCOPY NUMBER,
643 x_msg_data OUT NOCOPY VARCHAR2
644 );
645 /******************************************************************************************/
646 END ozf_actbudgets_pvt;