DBA Data[Home] [Help]

APPS.PA_BILLING_AMOUNT dependencies on PA_BILLING

Line 1: PACKAGE BODY pa_billing_amount AS

1: PACKAGE BODY pa_billing_amount AS
2: /* $Header: PAXIAMTB.pls 120.6.12010000.3 2008/08/11 04:18:10 arbandyo ship $ */
3:
4: --------------------------------------
5: -- FUNCTION/PROCEDURE IMPLEMENTATIONS

Line 20: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.CostAmount :');

16: l_calling_process varchar2(15);
17:
18: BEGIN
19: IF g1_debug_mode = 'Y' THEN
20: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.CostAmount :');
21: END IF;
22:
23: l_calling_process := pa_billing.GetCallProcess; /*Added for bug 7299493*/
24:

Line 23: l_calling_process := pa_billing.GetCallProcess; /*Added for bug 7299493*/

19: IF g1_debug_mode = 'Y' THEN
20: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.CostAmount :');
21: END IF;
22:
23: l_calling_process := pa_billing.GetCallProcess; /*Added for bug 7299493*/
24:
25: /* commented for bug 4251205 */
26: /* SELECT nvl(sum(nvl(a.burdened_cost,0)),0)
27: INTO new_cost

Line 166: PA_MCB_INVOICE_PKG.log_message('Exiting pa_billing_amount.CostAmount :');

162:
163: X2_cost_amount := nvl(new_cost,0);
164:
165: IF g1_debug_mode = 'Y' THEN
166: PA_MCB_INVOICE_PKG.log_message('Exiting pa_billing_amount.CostAmount :');
167: END IF;
168: END CostAmount;
169:
170:

Line 226: pa_billing_assignments bea,

222: CURSOR func_revenue(X2_project_id Number,X2_task_id Number) IS
223: SELECT NVL(e.bill_trans_rev_amount,0) trans_rev_amount,e.bill_trans_currency_code,
224: e.projfunc_currency_code,e.projfunc_rate_type,e.projfunc_rate_date,e.projfunc_exchange_rate
225: FROM pa_events e,
226: pa_billing_assignments bea,
227: pa_billing_extensions be
228: where be.billing_extension_id = bea.billing_extension_id
229: and e.project_id = X2_project_id
230: and nvl(e.task_id,0) = decode(X2_task_id,NULL,nvl(e.task_id,0), X2_task_id )

Line 227: pa_billing_extensions be

223: SELECT NVL(e.bill_trans_rev_amount,0) trans_rev_amount,e.bill_trans_currency_code,
224: e.projfunc_currency_code,e.projfunc_rate_type,e.projfunc_rate_date,e.projfunc_exchange_rate
225: FROM pa_events e,
226: pa_billing_assignments bea,
227: pa_billing_extensions be
228: where be.billing_extension_id = bea.billing_extension_id
229: and e.project_id = X2_project_id
230: and nvl(e.task_id,0) = decode(X2_task_id,NULL,nvl(e.task_id,0), X2_task_id )
231: and bea.billing_assignment_id = e.billing_assignment_id

Line 232: and be.procedure_name = 'pa_billing.ccrev'

228: where be.billing_extension_id = bea.billing_extension_id
229: and e.project_id = X2_project_id
230: and nvl(e.task_id,0) = decode(X2_task_id,NULL,nvl(e.task_id,0), X2_task_id )
231: and bea.billing_assignment_id = e.billing_assignment_id
232: and be.procedure_name = 'pa_billing.ccrev'
233: and e.revenue_distributed_flag||'' = 'N';
234:
235: l_projfunc_convers_fail EXCEPTION;
236: BEGIN

Line 238: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.RevenueAmount :');

234:
235: l_projfunc_convers_fail EXCEPTION;
236: BEGIN
237: IF g1_debug_mode = 'Y' THEN
238: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.RevenueAmount :');
239: END IF;
240:
241: -- Cost-Cost Revenue that has been accrued.
242: SELECT sum(nvl(dri.projfunc_revenue_amount,0)) /* change this column from amount to projfunc_revenue_amount for MCB2 */

Line 250: pa_billing_assignments bea,

246: AND nvl(dri.task_id,0) = decode(X2_task_id, NULL, nvl(dri.task_id,0), X2_task_id )
247: AND (EXISTS ( select '1'
248: from pa_cust_event_rev_dist_lines erdl,
249: pa_events e,
250: pa_billing_assignments bea,
251: pa_billing_extensions be
252: where be.billing_extension_id = bea.billing_extension_id
253: and bea.billing_assignment_id = e.billing_assignment_id
254: and e.project_id = erdl.project_id

Line 251: pa_billing_extensions be

247: AND (EXISTS ( select '1'
248: from pa_cust_event_rev_dist_lines erdl,
249: pa_events e,
250: pa_billing_assignments bea,
251: pa_billing_extensions be
252: where be.billing_extension_id = bea.billing_extension_id
253: and bea.billing_assignment_id = e.billing_assignment_id
254: and e.project_id = erdl.project_id
255: and e.event_num = erdl.event_num

Line 260: and be.procedure_name = 'pa_billing.ccrev')

256: and nvl(e.task_id,0) = nvl(erdl.task_id, 0)
257: and erdl.project_id = dri.project_id
258: and erdl.draft_revenue_num = dri.draft_revenue_num
259: and erdl.draft_revenue_item_line_num = dri.line_num
260: and be.procedure_name = 'pa_billing.ccrev')
261: OR dri.revenue_source like 'Expenditure%');
262:
263: IF g1_debug_mode = 'Y' THEN
264: PA_MCB_INVOICE_PKG.log_message('Number 01 RevenueAmount.accrued_ccrev :'||TO_CHAR(accrued_ccrev));

Line 273: pa_billing_assignments bea,

269: */
270: /* SELECT sum(nvl(e.revenue_amount,0))
271: INTO pending_ccrev
272: FROM pa_events e,
273: pa_billing_assignments bea,
274: pa_billing_extensions be
275: where be.billing_extension_id = bea.billing_extension_id
276: and e.project_id = X2_project_id
277: and nvl(e.task_id,0) =

Line 274: pa_billing_extensions be

270: /* SELECT sum(nvl(e.revenue_amount,0))
271: INTO pending_ccrev
272: FROM pa_events e,
273: pa_billing_assignments bea,
274: pa_billing_extensions be
275: where be.billing_extension_id = bea.billing_extension_id
276: and e.project_id = X2_project_id
277: and nvl(e.task_id,0) =
278: decode(X2_task_id,

Line 281: and be.procedure_name = 'pa_billing.ccrev'

277: and nvl(e.task_id,0) =
278: decode(X2_task_id,
279: NULL, nvl(e.task_id,0), X2_task_id )
280: and bea.billing_assignment_id = e.billing_assignment_id
281: and be.procedure_name = 'pa_billing.ccrev'
282: and e.revenue_distributed_flag||'' = 'N'; */
283:
284: /* Following code has been added for MCB2 */
285: l_project_id := X2_project_id;

Line 317: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetPaDate);

313: FETCH func_revenue INTO l_trans_rev_amt,l_txn_currency_code,l_projfunc_currency_code,
314: l_projfunc_rate_type,l_projfunc_rate_date,l_projfunc_exchange_rate;
315: EXIT WHEN func_revenue%NOTFOUND;
316: IF ( l_project_bil_rate_date_code = 'PA_INVOICE_DATE' ) THEN
317: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetPaDate);
318: END IF;
319: /* Calling convert amount proc to convert this amount in PFC */
320: PA_MULTI_CURRENCY.convert_amount(
321: P_FROM_CURRENCY => l_txn_currency_code,

Line 345: PA_MCB_INVOICE_PKG.log_message('Exiting pa_billing_amount.RevenueAmount :');

341: Close func_revenue;
342: pending_ccrev := l_projfunc_rev_amount_sum;
343: X2_revenue_amount := nvl(accrued_ccrev,0) + nvl(pending_ccrev,0);
344: IF g1_debug_mode = 'Y' THEN
345: PA_MCB_INVOICE_PKG.log_message('Exiting pa_billing_amount.RevenueAmount :');
346: END IF;
347: END RevenueAmount;
348:
349:

Line 422: from pa_billing_assignments bea,

418: AND e.project_id = X2_project_id
419: AND nvl(e.task_id,0) = nvl(X2_task_id, nvl(e.task_id,0))
420: AND e.completion_date <= nvl(X2_accrue_through_date, sysdate)
421: AND NOT EXISTS ( select 'cost-cost event'
422: from pa_billing_assignments bea,
423: pa_billing_extensions be
424: where be.billing_extension_id = bea.billing_extension_id
425: and bea.billing_assignment_id = e.billing_assignment_id
426: and be.procedure_name = 'pa_billing.ccrev');

Line 423: pa_billing_extensions be

419: AND nvl(e.task_id,0) = nvl(X2_task_id, nvl(e.task_id,0))
420: AND e.completion_date <= nvl(X2_accrue_through_date, sysdate)
421: AND NOT EXISTS ( select 'cost-cost event'
422: from pa_billing_assignments bea,
423: pa_billing_extensions be
424: where be.billing_extension_id = bea.billing_extension_id
425: and bea.billing_assignment_id = e.billing_assignment_id
426: and be.procedure_name = 'pa_billing.ccrev');
427:

Line 426: and be.procedure_name = 'pa_billing.ccrev');

422: from pa_billing_assignments bea,
423: pa_billing_extensions be
424: where be.billing_extension_id = bea.billing_extension_id
425: and bea.billing_assignment_id = e.billing_assignment_id
426: and be.procedure_name = 'pa_billing.ccrev');
427:
428: BEGIN
429: IF g1_debug_mode = 'Y' THEN
430: PA_MCB_INVOICE_PKG.log_message('PotEventAmount: ' || 'Entering pa_billing_amount.PotEvent :');

Line 430: PA_MCB_INVOICE_PKG.log_message('PotEventAmount: ' || 'Entering pa_billing_amount.PotEvent :');

426: and be.procedure_name = 'pa_billing.ccrev');
427:
428: BEGIN
429: IF g1_debug_mode = 'Y' THEN
430: PA_MCB_INVOICE_PKG.log_message('PotEventAmount: ' || 'Entering pa_billing_amount.PotEvent :');
431: END IF;
432: /* The following sql has been commented for MCB2 */
433: /* SELECT sum(decode(et.event_type_classification,
434: 'WRITE OFF', -1 * nvl(revenue_amount,0),

Line 448: from pa_billing_assignments bea,

444: AND e.project_id = X2_project_id
445: AND nvl(e.task_id,0) = nvl(X2_task_id, nvl(e.task_id,0))
446: AND e.completion_date <= nvl(X2_accrue_through_date, sysdate)
447: AND NOT EXISTS ( select 'cost-cost event'
448: from pa_billing_assignments bea,
449: pa_billing_extensions be
450: where be.billing_extension_id = bea.billing_extension_id
451: and bea.billing_assignment_id = e.billing_assignment_id
452: and be.procedure_name = 'pa_billing.ccrev'); */

Line 449: pa_billing_extensions be

445: AND nvl(e.task_id,0) = nvl(X2_task_id, nvl(e.task_id,0))
446: AND e.completion_date <= nvl(X2_accrue_through_date, sysdate)
447: AND NOT EXISTS ( select 'cost-cost event'
448: from pa_billing_assignments bea,
449: pa_billing_extensions be
450: where be.billing_extension_id = bea.billing_extension_id
451: and bea.billing_assignment_id = e.billing_assignment_id
452: and be.procedure_name = 'pa_billing.ccrev'); */
453:

Line 452: and be.procedure_name = 'pa_billing.ccrev'); */

448: from pa_billing_assignments bea,
449: pa_billing_extensions be
450: where be.billing_extension_id = bea.billing_extension_id
451: and bea.billing_assignment_id = e.billing_assignment_id
452: and be.procedure_name = 'pa_billing.ccrev'); */
453:
454: /* Following code has been added for MCB2 */
455: l_project_id := X2_project_id;
456: l_calling_process := pa_billing.GetCallProcess;

Line 456: l_calling_process := pa_billing.GetCallProcess;

452: and be.procedure_name = 'pa_billing.ccrev'); */
453:
454: /* Following code has been added for MCB2 */
455: l_project_id := X2_project_id;
456: l_calling_process := pa_billing.GetCallProcess;
457: PA_MULTI_CURRENCY_BILLING.get_project_defaults (
458: p_project_id => l_project_id,
459: x_multi_currency_billing_flag => l_multi_currency_billing_flag,
460: x_baseline_funding_flag => l_baseline_funding_flag,

Line 488: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetPaDate);

484: INTO l_trans_rev_amt,l_trans_bill_amt,l_txn_currency_code,l_projfunc_currency_code,
485: l_projfunc_rate_type,l_projfunc_rate_date,l_projfunc_exchange_rate;
486: EXIT WHEN func_rev_inv_amt%NOTFOUND;
487: IF ( l_calling_process = 'Revenue' ) THEN
488: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetPaDate);
489: l_passd_amt := l_trans_rev_amt;
490: ELSIF ( l_calling_process = 'Invoice' ) THEN
491: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetInvoiceDate);
492: l_passd_amt := l_trans_bill_amt;

Line 491: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetInvoiceDate);

487: IF ( l_calling_process = 'Revenue' ) THEN
488: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetPaDate);
489: l_passd_amt := l_trans_rev_amt;
490: ELSIF ( l_calling_process = 'Invoice' ) THEN
491: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetInvoiceDate);
492: l_passd_amt := l_trans_bill_amt;
493: END IF;
494: /* Calling convert amount proc to convert this amount in PFC */
495: PA_MULTI_CURRENCY.convert_amount(

Line 514: PA_MCB_INVOICE_PKG.log_message('PotEventAmount: ' || 'Number 01 pa_billing_amount.PotEvent.l_projfunc_amount_sum :'||to_char(l_projfunc_amount_sum));

510: END IF;
511:
512: l_projfunc_amount_sum := NVL(l_projfunc_amount_sum,0) + NVL(l_converted_amount,0);
513: IF g1_debug_mode = 'Y' THEN
514: PA_MCB_INVOICE_PKG.log_message('PotEventAmount: ' || 'Number 01 pa_billing_amount.PotEvent.l_projfunc_amount_sum :'||to_char(l_projfunc_amount_sum));
515: END IF;
516: End Loop;
517: Close func_rev_inv_amt;
518:

Line 527: PA_MCB_INVOICE_PKG.log_message('PotEventAmount: ' || 'Exiting pa_billing_amount.PotEvent :');

523: X2_revenue_amount := 0;
524: X2_invoice_amount := l_projfunc_amount_sum;
525: END IF;
526: IF g1_debug_mode = 'Y' THEN
527: PA_MCB_INVOICE_PKG.log_message('PotEventAmount: ' || 'Exiting pa_billing_amount.PotEvent :');
528: END IF;
529: END PotEventAmount;
530:
531:

Line 592: pa_billing_assignments bea,

588: SELECT NVL(e.bill_trans_bill_amount,0) trans_bill_amount,e.bill_trans_currency_code,
589: e.projfunc_currency_code,
590: e.projfunc_rate_type,e.projfunc_rate_date,e.projfunc_exchange_rate
591: FROM pa_events e,
592: pa_billing_assignments bea,
593: pa_billing_extensions be
594: WHERE be.billing_extension_id = bea.billing_extension_id
595: AND bea.billing_assignment_id = e.billing_assignment_id
596: AND e.project_id = X2_project_id

Line 593: pa_billing_extensions be

589: e.projfunc_currency_code,
590: e.projfunc_rate_type,e.projfunc_rate_date,e.projfunc_exchange_rate
591: FROM pa_events e,
592: pa_billing_assignments bea,
593: pa_billing_extensions be
594: WHERE be.billing_extension_id = bea.billing_extension_id
595: AND bea.billing_assignment_id = e.billing_assignment_id
596: AND e.project_id = X2_project_id
597: AND be.procedure_name = 'pa_billing.ccrev'

Line 597: AND be.procedure_name = 'pa_billing.ccrev'

593: pa_billing_extensions be
594: WHERE be.billing_extension_id = bea.billing_extension_id
595: AND bea.billing_assignment_id = e.billing_assignment_id
596: AND e.project_id = X2_project_id
597: AND be.procedure_name = 'pa_billing.ccrev'
598: AND nvl(e.task_id,0) = decode(X2_task_id,
599: NULL, nvl(e.task_id,0), X2_task_id)
600: AND NOT EXISTS
601: (select 'billed'

Line 609: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.InvoiceAmount :');

605: and nvl(pdii.task_id,0) = nvl(e.task_id,0));
606:
607: BEGIN
608: IF g1_debug_mode = 'Y' THEN
609: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.InvoiceAmount :');
610: END IF;
611:
612: -- Cost/Cost Invoice Amount that has been created as an event, but not billed
613: -- yet.

Line 622: pa_billing_assignments bea,

618: /*
619: SELECT sum(nvl(e.bill_amount,0))
620: INTO pending_ccinv
621: from pa_events e,
622: pa_billing_assignments bea,
623: pa_billing_extensions be
624: where be.billing_extension_id = bea.billing_extension_id
625: and bea.billing_assignment_id = e.billing_assignment_id
626: and e.project_id = X2_project_id

Line 623: pa_billing_extensions be

619: SELECT sum(nvl(e.bill_amount,0))
620: INTO pending_ccinv
621: from pa_events e,
622: pa_billing_assignments bea,
623: pa_billing_extensions be
624: where be.billing_extension_id = bea.billing_extension_id
625: and bea.billing_assignment_id = e.billing_assignment_id
626: and e.project_id = X2_project_id
627: and be.procedure_name = 'pa_billing.ccrev'

Line 627: and be.procedure_name = 'pa_billing.ccrev'

623: pa_billing_extensions be
624: where be.billing_extension_id = bea.billing_extension_id
625: and bea.billing_assignment_id = e.billing_assignment_id
626: and e.project_id = X2_project_id
627: and be.procedure_name = 'pa_billing.ccrev'
628: and nvl(e.task_id,0) = decode(X2_task_id,
629: NULL, nvl(e.task_id,0), X2_task_id)
630: and NOT EXISTS
631: (select 'billed'

Line 670: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetInvoiceDate);

666: FETCH func_invoice INTO l_trans_bill_amt,l_txn_currency_code,l_projfunc_currency_code,
667: l_projfunc_rate_type,l_projfunc_rate_date,l_projfunc_exchange_rate;
668: EXIT WHEN func_invoice%NOTFOUND;
669: IF ( l_project_bil_rate_date_code = 'PA_INVOICE_DATE' ) THEN
670: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetInvoiceDate);
671: END IF;
672: /* Calling convert amount proc to convert this amount in PFC */
673: PA_MULTI_CURRENCY.convert_amount(
674: P_FROM_CURRENCY => l_txn_currency_code,

Line 692: PA_MCB_INVOICE_PKG.log_message('inside pa_billing_amount.InvoiceAmount :'||l_projfunc_bill_amount_sum);

688: END IF;
689:
690: l_projfunc_bill_amount_sum := NVL(l_projfunc_bill_amount_sum,0) + NVL(l_converted_bill_amount,0);
691: IF g1_debug_mode = 'Y' THEN
692: PA_MCB_INVOICE_PKG.log_message('inside pa_billing_amount.InvoiceAmount :'||l_projfunc_bill_amount_sum);
693: END IF;
694: End Loop;
695: Close func_invoice;
696: pending_ccinv := l_projfunc_bill_amount_sum;

Line 711: pa_billing_assignments bea,

707: FROM pa_draft_invoice_items dii
708: WHERE dii.project_id = X2_project_id
709: AND (EXISTS (select '1'
710: from pa_events e,
711: pa_billing_assignments bea,
712: pa_billing_extensions be
713: where be.billing_extension_id = bea.billing_extension_id
714: and bea.billing_assignment_id = e.billing_assignment_id
715: and dii.project_id = e.project_id

Line 712: pa_billing_extensions be

708: WHERE dii.project_id = X2_project_id
709: AND (EXISTS (select '1'
710: from pa_events e,
711: pa_billing_assignments bea,
712: pa_billing_extensions be
713: where be.billing_extension_id = bea.billing_extension_id
714: and bea.billing_assignment_id = e.billing_assignment_id
715: and dii.project_id = e.project_id
716: and dii.event_num = e.event_num

Line 718: and be.procedure_name = 'pa_billing.ccrev')

714: and bea.billing_assignment_id = e.billing_assignment_id
715: and dii.project_id = e.project_id
716: and dii.event_num = e.event_num
717: and nvl(dii.event_task_id,0) = nvl(e.task_id,0)
718: and be.procedure_name = 'pa_billing.ccrev')
719: OR EXISTS ( select '1'
720: from pa_cust_rev_dist_lines erdl
721: where erdl.project_id = dii.project_id
722: and erdl.draft_invoice_num = dii.draft_invoice_num

Line 752: pa_billing_assignments bea,

748: WHERE pdii.event_task_id = X2_task_id
749: AND pdii.Project_ID = X2_Project_ID -- Perf Bug 2695243
750: AND EXISTS (select '1'
751: from pa_events e,
752: pa_billing_assignments bea,
753: pa_billing_extensions be
754: where be.billing_extension_id = bea.billing_extension_id
755: and bea.billing_assignment_id = e.billing_assignment_id
756: and pdii.project_id = e.project_id

Line 753: pa_billing_extensions be

749: AND pdii.Project_ID = X2_Project_ID -- Perf Bug 2695243
750: AND EXISTS (select '1'
751: from pa_events e,
752: pa_billing_assignments bea,
753: pa_billing_extensions be
754: where be.billing_extension_id = bea.billing_extension_id
755: and bea.billing_assignment_id = e.billing_assignment_id
756: and pdii.project_id = e.project_id
757: and pdii.event_num = e.event_num

Line 759: and be.procedure_name = 'pa_billing.ccrev');

755: and bea.billing_assignment_id = e.billing_assignment_id
756: and pdii.project_id = e.project_id
757: and pdii.event_num = e.event_num
758: and pdii.event_task_id = e.task_id
759: and be.procedure_name = 'pa_billing.ccrev');
760:
761: X2_invoice_amount := nvl(task_billed_ccinv,0) + nvl(task_billed_ev_ccinv,0) + nvl(pending_ccinv,0);
762:
763: IF g1_debug_mode = 'Y' THEN

Line 764: PA_MCB_INVOICE_PKG.log_message('Overall invoice amount pa_billing_amount.InvoiceAmount :'||to_char(nvl(task_billed_ccinv,0) + nvl(task_billed_ev_ccinv,0) + nvl(pending_ccinv,0)));

760:
761: X2_invoice_amount := nvl(task_billed_ccinv,0) + nvl(task_billed_ev_ccinv,0) + nvl(pending_ccinv,0);
762:
763: IF g1_debug_mode = 'Y' THEN
764: PA_MCB_INVOICE_PKG.log_message('Overall invoice amount pa_billing_amount.InvoiceAmount :'||to_char(nvl(task_billed_ccinv,0) + nvl(task_billed_ev_ccinv,0) + nvl(pending_ccinv,0)));
765: PA_MCB_INVOICE_PKG.log_message('Exiting pa_billing_amount.InvoiceAmount :');
766: END IF;
767: END IF;
768:

Line 765: PA_MCB_INVOICE_PKG.log_message('Exiting pa_billing_amount.InvoiceAmount :');

761: X2_invoice_amount := nvl(task_billed_ccinv,0) + nvl(task_billed_ev_ccinv,0) + nvl(pending_ccinv,0);
762:
763: IF g1_debug_mode = 'Y' THEN
764: PA_MCB_INVOICE_PKG.log_message('Overall invoice amount pa_billing_amount.InvoiceAmount :'||to_char(nvl(task_billed_ccinv,0) + nvl(task_billed_ev_ccinv,0) + nvl(pending_ccinv,0)));
765: PA_MCB_INVOICE_PKG.log_message('Exiting pa_billing_amount.InvoiceAmount :');
766: END IF;
767: END IF;
768:
769: END InvoiceAmount;

Line 848: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.LowestAmountLeft :');

844:
845: BEGIN
846:
847: IF g1_debug_mode = 'Y' THEN
848: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.LowestAmountLeft :');
849: END IF;
850: -- This select gets automatic events that were created in this run or some
851: -- previous run, but have not been accrued/billed yet.
852: -- This must be subtracted from amount available to get the real amount

Line 906: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetPaDate);

902: INTO l_trans_rev_amt,l_trans_bill_amt,l_txn_currency_code,l_projfunc_currency_code,
903: l_projfunc_rate_type,l_projfunc_rate_date,l_projfunc_exchange_rate;
904: EXIT WHEN func_lwst_rev_inv_amt%NOTFOUND;
905: IF ( X2_calling_process = 'Revenue' ) THEN
906: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetPaDate);
907: l_passd_amt := l_trans_rev_amt;
908: ELSIF ( X2_calling_process = 'Invoice' ) THEN
909: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetInvoiceDate);
910: l_passd_amt := l_trans_bill_amt;

Line 909: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetInvoiceDate);

905: IF ( X2_calling_process = 'Revenue' ) THEN
906: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetPaDate);
907: l_passd_amt := l_trans_rev_amt;
908: ELSIF ( X2_calling_process = 'Invoice' ) THEN
909: l_projfunc_rate_date := NVL(l_projfunc_rate_date,pa_billing.GetInvoiceDate);
910: l_passd_amt := l_trans_bill_amt;
911: END IF;
912: /* Calling convert amount proc to convert this amount in PFC */
913: PA_MULTI_CURRENCY.convert_amount(

Line 932: PA_MCB_INVOICE_PKG.log_message('LowestAmountLeft: ' || 'Inside pa_billing_amount.LowestAmount :'||l_projfunc_amount_sum);

928: END IF;
929:
930: l_projfunc_amount_sum := NVL(l_projfunc_amount_sum,0) + NVL(l_converted_amount,0);
931: IF g1_debug_mode = 'Y' THEN
932: PA_MCB_INVOICE_PKG.log_message('LowestAmountLeft: ' || 'Inside pa_billing_amount.LowestAmount :'||l_projfunc_amount_sum);
933: END IF;
934: End Loop;
935: Close func_lwst_rev_inv_amt;
936:

Line 957: l_Enable_Top_Task_Cust_Flag := PA_Billing_Pub.Get_Top_Task_Customer_Flag (

953: total_billed_amount to projfunc_billed_amount, and total_baselined_amount to
954: projfunc_baselined_amount */
955:
956: -- Following changes are made for FP_M : Top Task customer changes
957: l_Enable_Top_Task_Cust_Flag := PA_Billing_Pub.Get_Top_Task_Customer_Flag (
958: P_Project_ID => l_Project_ID );
959:
960: -- If the project is implemented with Top Task customer enabled then the
961: -- lowest revenue amount is calculated as the total baselined fundings

Line 1022: PA_MCB_INVOICE_PKG.log_message('LowestAmountLeft: ' || 'Exiting pa_billing_amount.LowestAmount :');

1018: - nvl(current_event_invoice,0)),0);
1019: END IF;
1020:
1021: IF g1_debug_mode = 'Y' THEN
1022: PA_MCB_INVOICE_PKG.log_message('LowestAmountLeft: ' || 'Exiting pa_billing_amount.LowestAmount :');
1023: END IF;
1024: EXCEPTION
1025: WHEN OTHERS THEN
1026: /* DBMS_OUTPUT.PUT_LINE(SQLERRM); */

Line 1037: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.rdl_amount :');

1033:
1034: Ramount REAL;
1035: BEGIN
1036: IF g1_debug_mode = 'Y' THEN
1037: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.rdl_amount :');
1038: END IF;
1039: /* Changed column from bill_amount to projfunc_bill_amount and amount to projfunc_revenue_amount for MCB2 */
1040: SELECT sum(decode(X_which, 'I', nvl(rdl.projfunc_bill_amount,0),
1041: 'R', NVL(rdl.projfunc_revenue_amount,0),NVL(rdl.projfunc_revenue_amount,0)))

Line 1065: PA_MCB_INVOICE_PKG.log_message('Exiting pa_billing_amount.rdl_amount :');

1061: -- 2. Exclude items which have been reversed out, if
1062: -- only positive items requested.
1063:
1064: IF g1_debug_mode = 'Y' THEN
1065: PA_MCB_INVOICE_PKG.log_message('Exiting pa_billing_amount.rdl_amount :');
1066: END IF;
1067:
1068: RETURN Ramount;
1069: END rdl_amount;

Line 1095: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.get_baseline_budget :');

1091:
1092:
1093: BEGIN
1094: IF g1_debug_mode = 'Y' THEN
1095: PA_MCB_INVOICE_PKG.log_message('Entering pa_billing_amount.get_baseline_budget :');
1096: END IF;
1097: c := 5;
1098:
1099: SELECT Decode(SUBSTR(distribution_rule,INSTR(distribution_rule,'/')+1),'COST','x','y') /* Added Decode for Bug 2389765 */

Line 1211: PA_MCB_INVOICE_PKG.log_message('Exiting pa_billing_amount.get_baseline_budget :');

1207: pa_currency.round_currency_amt(l_revenue_total);
1208:
1209:
1210: IF g1_debug_mode = 'Y' THEN
1211: PA_MCB_INVOICE_PKG.log_message('Exiting pa_billing_amount.get_baseline_budget :');
1212: END IF;
1213: EXCEPTION
1214: When NO_DATA_FOUND
1215: then

Line 1241: END pa_billing_amount;

1237: X_err_msg := 'Exception Raised in Cost Budget Calculation';
1238:
1239: END get_baseline_budget;
1240:
1241: END pa_billing_amount;