DBA Data[Home] [Help]

APPS.GMS_BILLING dependencies on GMS_BILLING

Line 1: PACKAGE BODY GMS_BILLING AS

1: PACKAGE BODY GMS_BILLING AS
2: -- $Header: gmsinblb.pls 120.15.12010000.6 2008/11/27 11:13:44 rrambati ship $
3:
4: -- To check on, whether to print debug messages in log file or not
5: L_DEBUG varchar2(1) := NVL(FND_PROFILE.value('GMS_ENABLE_DEBUG_MODE'), 'N');

Line 78: -- Function Is_Invoice_Format_Valid : This is called from :AWARDS form and gms_billing.award_billing

74: X_trans_type VARCHAR2(10);
75: G_trans_type VARCHAR2(10);
76:
77: /* -----------------------------------------------------------------------------------------+ */
78: -- Function Is_Invoice_Format_Valid : This is called from :AWARDS form and gms_billing.award_billing
79: -- Function checks whether the invoice format (labor/non-labor) has any element (column) that is not
80: -- supported by Grants Accounting.
81: -- Calling context would be 'AWARDS_FORM' or 'BILLING_PROCESS'
82: -- Function returns TRUE is format is VALID else returns FALSE

Line 533: /* Create negative entry in gms_billing_cancellations

529: IF evt.event_type = 'Revenue'
530: THEN
531: IF f_raw_rev_accumulated = 'Y'
532: THEN
533: /* Create negative entry in gms_billing_cancellations
534: for ASI to backout revenue accumulated */
535: gms_billing_adjustments.insert_bill_cancel (evt.project_id,
536: evt.event_num,
537: f_raw_exp_item_id,

Line 535: gms_billing_adjustments.insert_bill_cancel (evt.project_id,

531: IF f_raw_rev_accumulated = 'Y'
532: THEN
533: /* Create negative entry in gms_billing_cancellations
534: for ASI to backout revenue accumulated */
535: gms_billing_adjustments.insert_bill_cancel (evt.project_id,
536: evt.event_num,
537: f_raw_exp_item_id,
538: f_raw_adl_line_num,
539: -1 * f_raw_revenue_amount,

Line 616: /* Create negative entry in gms_billing_cancellations

612: x_stage := 30;
613:
614: IF f_burd_rev_accumulated = 'Y' and evt.event_type = 'Revenue'
615: THEN
616: /* Create negative entry in gms_billing_cancellations
617: for ASI to backout revenue accumulated */
618: gms_billing_adjustments.insert_bill_cancel (evt.project_id,
619: evt.event_num,
620: f_burd_exp_item_id,

Line 618: gms_billing_adjustments.insert_bill_cancel (evt.project_id,

614: IF f_burd_rev_accumulated = 'Y' and evt.event_type = 'Revenue'
615: THEN
616: /* Create negative entry in gms_billing_cancellations
617: for ASI to backout revenue accumulated */
618: gms_billing_adjustments.insert_bill_cancel (evt.project_id,
619: evt.event_num,
620: f_burd_exp_item_id,
621: f_burd_adl_line_num,
622: -1 * f_burd_revenue_amount,

Line 716: gms_error_pkg.gms_message ('GMS_BILLING_ROLLBACK_EVT',

712:
713: If (f_bill_amount <> 0 or
714: f_rev_amount <> 0) then
715:
716: gms_error_pkg.gms_message ('GMS_BILLING_ROLLBACK_EVT',
717: 'PRJ',
718: f_act_project_id,
719: 'TASK',
720: f_act_task_id,

Line 745: gms_billing_adjustments.HANDLE_NET_ZERO_EVENTS (P_AWARD_PROJECT_ID => X_Award_Project_id,

741: x_err_code := 0;
742:
743: If ( F_request_id <> 0 ) then
744: -- Handle net zero events .... /* Added for bug 4957529 */
745: gms_billing_adjustments.HANDLE_NET_ZERO_EVENTS (P_AWARD_PROJECT_ID => X_Award_Project_id,
746: P_REQUEST_ID => F_request_id,
747: P_CALLING_PROCESS => F_calling_process);
748: End IF ; /* Added for bug 4957529 */
749:

Line 794: gms_error_pkg.gms_message('GMS_BILLING_ROLLBACK_FAILURE',

790: gms_error_pkg.gms_debug('In DELETE_NULL_EVENTS - Stage: After Rollback Invoice raw events,X_Err_Code:'||X_Err_Code,'C');
791: END IF;
792:
793: If X_Err_Code <> 0 then
794: gms_error_pkg.gms_message('GMS_BILLING_ROLLBACK_FAILURE',
795: 'PRJ',
796: X_award_project_id,
797: X_Exec_Type => 'C',
798: X_Err_Code => X_Err_Code,

Line 5573: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),

5569: )
5570: )
5571: )
5572: order by DECODE( NVL(ei.net_zero_adjustment_flag,'N'),'N', NVL(ei.raw_cost,
5573: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5574: 'Y', DECODE(SIGN(NVL(ei.raw_cost,
5575: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id))),
5576: 1,-NVL(ei.raw_Cost,
5577: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),

Line 5575: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id))),

5571: )
5572: order by DECODE( NVL(ei.net_zero_adjustment_flag,'N'),'N', NVL(ei.raw_cost,
5573: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5574: 'Y', DECODE(SIGN(NVL(ei.raw_cost,
5575: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id))),
5576: 1,-NVL(ei.raw_Cost,
5577: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5578: NVL(ei.raw_cost,
5579: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)))),

Line 5577: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),

5573: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5574: 'Y', DECODE(SIGN(NVL(ei.raw_cost,
5575: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id))),
5576: 1,-NVL(ei.raw_Cost,
5577: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5578: NVL(ei.raw_cost,
5579: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)))),
5580: NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5581: NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),

Line 5579: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)))),

5575: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id))),
5576: 1,-NVL(ei.raw_Cost,
5577: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5578: NVL(ei.raw_cost,
5579: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)))),
5580: NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5581: NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),
5582: adl.raw_cost, adl.cdl_line_num , -- Bug 3235390
5583: p.project_id,ei.task_id,ei.expenditure_type,EXPENDITURE_ORG;

Line 5580: NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),

5576: 1,-NVL(ei.raw_Cost,
5577: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5578: NVL(ei.raw_cost,
5579: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)))),
5580: NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5581: NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),
5582: adl.raw_cost, adl.cdl_line_num , -- Bug 3235390
5583: p.project_id,ei.task_id,ei.expenditure_type,EXPENDITURE_ORG;
5584:

Line 6494: gms_error_pkg.gms_message('GMS_BILLING_CONCURRENCY',

6490: gms_error_pkg.gms_debug('After gms_bill_concurrency x_error_code :'||St_Err_Code,'C');
6491: END IF;
6492:
6493: If St_Err_Code <> 0 then
6494: gms_error_pkg.gms_message('GMS_BILLING_CONCURRENCY',
6495: 'PRJ',
6496: X_Project_id,
6497: X_Exec_Type => 'C',
6498: X_Err_Code => St_Err_Code,

Line 6524: gms_error_pkg.gms_message('GMS_BILLING_CONCURRENCY',

6520: gms_error_pkg.gms_debug('After lock_award_records St_Err_Code :'||St_Err_Code,'C');
6521: END IF;
6522:
6523: If St_Err_Code <> 0 then
6524: gms_error_pkg.gms_message('GMS_BILLING_CONCURRENCY',
6525: 'PRJ',
6526: X_Project_id,
6527: X_Exec_Type => 'C',
6528: X_Err_Code => St_Err_Code,

Line 6550: gms_error_pkg.gms_message('GMS_BILLING_ROLLBACK_FAILURE',

6546: gms_error_pkg.gms_debug('After billing_rollback x_error_code :'||St_Err_Code,'C');
6547: END IF;
6548:
6549: If St_Err_Code <> 0 then
6550: gms_error_pkg.gms_message('GMS_BILLING_ROLLBACK_FAILURE',
6551: 'PRJ',
6552: X_Project_id,
6553: X_Exec_Type => 'C',
6554: X_Err_Code => St_Err_Code,

Line 6719: gms_error_pkg.gms_message('GMS_BILLING_CONCURRENCY',

6715: gms_error_pkg.gms_debug('After lock_award_records St_Err_Code :'||St_Err_Code,'C');
6716: END IF;
6717:
6718: If St_Err_Code <> 0 then
6719: gms_error_pkg.gms_message('GMS_BILLING_CONCURRENCY',
6720: 'PRJ',
6721: X_Project_id,
6722: X_Exec_Type => 'C',
6723: X_Err_Code => St_Err_Code,

Line 6925: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'

6921: /* ------ GROUP BY CHANGES ------- */
6922:
6923: -- Bug 3235390 : Modified the order by clause
6924: l_sql_orderby :=' DECODE( NVL(ei.net_zero_adjustment_flag,'||''''||'N'||''''||'),'||''''||'N' ||''''||
6925: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
6926: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6927: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
6928: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
6929: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('

Line 6926: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('

6922:
6923: -- Bug 3235390 : Modified the order by clause
6924: l_sql_orderby :=' DECODE( NVL(ei.net_zero_adjustment_flag,'||''''||'N'||''''||'),'||''''||'N' ||''''||
6925: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
6926: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6927: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
6928: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
6929: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6930: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'

Line 6928: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||

6924: l_sql_orderby :=' DECODE( NVL(ei.net_zero_adjustment_flag,'||''''||'N'||''''||'),'||''''||'N' ||''''||
6925: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
6926: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6927: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
6928: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
6929: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6930: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'
6931: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''
6932: ||',ei.expenditure_item_id)),NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),'

Line 6929: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('

6925: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
6926: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6927: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
6928: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
6929: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6930: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'
6931: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''
6932: ||',ei.expenditure_item_id)),NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),'
6933: || 'adl.raw_cost, adl.cdl_line_num';

Line 6931: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''

6927: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
6928: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
6929: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6930: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'
6931: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''
6932: ||',ei.expenditure_item_id)),NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),'
6933: || 'adl.raw_cost, adl.cdl_line_num';
6934:
6935:

Line 7064: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'

7060: /* ------ GROUP BY CHANGES ------- */
7061:
7062: -- Bug 3235390 : Modified the order by clause
7063: l_sql_orderby := ' DECODE( NVL(ei.net_zero_adjustment_flag,'||''''||'N'||''''||'),'||''''||'N' ||''''||
7064: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
7065: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7066: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
7067: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
7068: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('

Line 7065: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('

7061:
7062: -- Bug 3235390 : Modified the order by clause
7063: l_sql_orderby := ' DECODE( NVL(ei.net_zero_adjustment_flag,'||''''||'N'||''''||'),'||''''||'N' ||''''||
7064: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
7065: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7066: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
7067: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
7068: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7069: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'

Line 7067: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||

7063: l_sql_orderby := ' DECODE( NVL(ei.net_zero_adjustment_flag,'||''''||'N'||''''||'),'||''''||'N' ||''''||
7064: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
7065: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7066: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
7067: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
7068: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7069: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'
7070: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''
7071: ||',ei.expenditure_item_id)),NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),'

Line 7068: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('

7064: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
7065: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7066: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
7067: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
7068: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7069: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'
7070: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''
7071: ||',ei.expenditure_item_id)),NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),'
7072: || 'adl.raw_cost, adl.cdl_line_num';

Line 7070: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''

7066: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
7067: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
7068: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7069: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'
7070: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''
7071: ||',ei.expenditure_item_id)),NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),'
7072: || 'adl.raw_cost, adl.cdl_line_num';
7073:
7074:

Line 7544: gms_error_pkg.gms_exception_lines_proc('GMS_BILLING_ROLLBACK_FAILURE' ,

7540: If (nvl(GMS_ERROR_PKG.X_Request_Trace_Id,-1)<>X_Request_id) then
7541: gms_error_pkg.gms_exception_head_proc(x_calling_process) ;
7542: GMS_ERROR_PKG.X_Request_Trace_Id:=X_request_id;
7543: End If;
7544: gms_error_pkg.gms_exception_lines_proc('GMS_BILLING_ROLLBACK_FAILURE' ,
7545: 'PRJ',
7546: x_calling_place,
7547: x_project_id ,
7548: x_award_number ,

Line 7700: END GMS_BILLING;

7696: --RAISE_APPLICATION_ERROR(-20557,St_Err_Buff);
7697:
7698: End AWARD_BILLING;
7699:
7700: END GMS_BILLING;