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.22.12020000.2 2012/07/18 09:31:48 admarath 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 5602: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),

5598: )
5599: )
5600: )
5601: order by DECODE( NVL(ei.net_zero_adjustment_flag,'N'),'N', NVL(ei.raw_cost,
5602: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5603: 'Y', DECODE(SIGN(NVL(ei.raw_cost,
5604: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id))),
5605: 1,-NVL(ei.raw_Cost,
5606: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),

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

5600: )
5601: order by DECODE( NVL(ei.net_zero_adjustment_flag,'N'),'N', NVL(ei.raw_cost,
5602: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5603: 'Y', DECODE(SIGN(NVL(ei.raw_cost,
5604: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id))),
5605: 1,-NVL(ei.raw_Cost,
5606: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5607: NVL(ei.raw_cost,
5608: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)))),

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

5602: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5603: 'Y', DECODE(SIGN(NVL(ei.raw_cost,
5604: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id))),
5605: 1,-NVL(ei.raw_Cost,
5606: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5607: NVL(ei.raw_cost,
5608: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)))),
5609: NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5610: NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),

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

5604: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id))),
5605: 1,-NVL(ei.raw_Cost,
5606: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5607: NVL(ei.raw_cost,
5608: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)))),
5609: NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5610: NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),
5611: adl.raw_cost, adl.cdl_line_num , -- Bug 3235390
5612: p.project_id,ei.task_id,ei.expenditure_type,EXPENDITURE_ORG;

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

5605: 1,-NVL(ei.raw_Cost,
5606: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5607: NVL(ei.raw_cost,
5608: gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)))),
5609: NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost(X_calling_process,ei.expenditure_item_id)),
5610: NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),
5611: adl.raw_cost, adl.cdl_line_num , -- Bug 3235390
5612: p.project_id,ei.task_id,ei.expenditure_type,EXPENDITURE_ORG;
5613:

Line 6525: gms_error_pkg.gms_message('GMS_BILLING_CONCURRENCY',

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

Line 6555: gms_error_pkg.gms_message('GMS_BILLING_CONCURRENCY',

6551: gms_error_pkg.gms_debug('After lock_award_records St_Err_Code :'||St_Err_Code,'C');
6552: END IF;
6553:
6554: If St_Err_Code <> 0 then
6555: gms_error_pkg.gms_message('GMS_BILLING_CONCURRENCY',
6556: 'PRJ',
6557: X_Project_id,
6558: X_Exec_Type => 'C',
6559: X_Err_Code => St_Err_Code,

Line 6581: gms_error_pkg.gms_message('GMS_BILLING_ROLLBACK_FAILURE',

6577: gms_error_pkg.gms_debug('After billing_rollback x_error_code :'||St_Err_Code,'C');
6578: END IF;
6579:
6580: If St_Err_Code <> 0 then
6581: gms_error_pkg.gms_message('GMS_BILLING_ROLLBACK_FAILURE',
6582: 'PRJ',
6583: X_Project_id,
6584: X_Exec_Type => 'C',
6585: X_Err_Code => St_Err_Code,

Line 6750: gms_error_pkg.gms_message('GMS_BILLING_CONCURRENCY',

6746: gms_error_pkg.gms_debug('After lock_award_records St_Err_Code :'||St_Err_Code,'C');
6747: END IF;
6748:
6749: If St_Err_Code <> 0 then
6750: gms_error_pkg.gms_message('GMS_BILLING_CONCURRENCY',
6751: 'PRJ',
6752: X_Project_id,
6753: X_Exec_Type => 'C',
6754: X_Err_Code => St_Err_Code,

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

6952: /* ------ GROUP BY CHANGES ------- */
6953:
6954: -- Bug 3235390 : Modified the order by clause
6955: l_sql_orderby :=' DECODE( NVL(ei.net_zero_adjustment_flag,'||''''||'N'||''''||'),'||''''||'N' ||''''||
6956: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
6957: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6958: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
6959: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
6960: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('

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

6953:
6954: -- Bug 3235390 : Modified the order by clause
6955: l_sql_orderby :=' DECODE( NVL(ei.net_zero_adjustment_flag,'||''''||'N'||''''||'),'||''''||'N' ||''''||
6956: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
6957: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6958: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
6959: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
6960: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6961: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'

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

6955: l_sql_orderby :=' DECODE( NVL(ei.net_zero_adjustment_flag,'||''''||'N'||''''||'),'||''''||'N' ||''''||
6956: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
6957: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6958: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
6959: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
6960: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6961: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'
6962: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''
6963: ||',ei.expenditure_item_id)),NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),'

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

6956: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
6957: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6958: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
6959: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
6960: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6961: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'
6962: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''
6963: ||',ei.expenditure_item_id)),NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),'
6964: || 'adl.raw_cost, adl.cdl_line_num';

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

6958: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
6959: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
6960: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
6961: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'
6962: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''
6963: ||',ei.expenditure_item_id)),NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),'
6964: || 'adl.raw_cost, adl.cdl_line_num';
6965:
6966:

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

7091: /* ------ GROUP BY CHANGES ------- */
7092:
7093: -- Bug 3235390 : Modified the order by clause
7094: l_sql_orderby := ' DECODE( NVL(ei.net_zero_adjustment_flag,'||''''||'N'||''''||'),'||''''||'N' ||''''||
7095: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
7096: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7097: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
7098: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
7099: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('

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

7092:
7093: -- Bug 3235390 : Modified the order by clause
7094: l_sql_orderby := ' DECODE( NVL(ei.net_zero_adjustment_flag,'||''''||'N'||''''||'),'||''''||'N' ||''''||
7095: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
7096: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7097: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
7098: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
7099: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7100: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'

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

7094: l_sql_orderby := ' DECODE( NVL(ei.net_zero_adjustment_flag,'||''''||'N'||''''||'),'||''''||'N' ||''''||
7095: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
7096: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7097: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
7098: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
7099: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7100: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'
7101: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''
7102: ||',ei.expenditure_item_id)),NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),'

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

7095: ', NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||',ei.expenditure_item_id)),'
7096: ||''''||'Y'||''''||', DECODE(SIGN(NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7097: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
7098: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
7099: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7100: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'
7101: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''
7102: ||',ei.expenditure_item_id)),NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),'
7103: || 'adl.raw_cost, adl.cdl_line_num';

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

7097: ||''''||'Invoice'||''''||',ei.expenditure_item_id))),'
7098: ||'1,-NVL(ei.raw_Cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''||
7099: ',ei.expenditure_item_id)),' ||' NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('
7100: ||''''||'Invoice'||''''||',ei.expenditure_item_id)))),'
7101: || 'NVL(ei.raw_cost,gms_billing.get_total_adl_raw_cost('||''''||'Invoice'||''''
7102: ||',ei.expenditure_item_id)),NVL(ei.adjusted_expenditure_item_id,ei.expenditure_item_id),'
7103: || 'adl.raw_cost, adl.cdl_line_num';
7104:
7105:

Line 7575: gms_error_pkg.gms_exception_lines_proc('GMS_BILLING_ROLLBACK_FAILURE' ,

7571: If (nvl(GMS_ERROR_PKG.X_Request_Trace_Id,-1)<>X_Request_id) then
7572: gms_error_pkg.gms_exception_head_proc(x_calling_process) ;
7573: GMS_ERROR_PKG.X_Request_Trace_Id:=X_request_id;
7574: End If;
7575: gms_error_pkg.gms_exception_lines_proc('GMS_BILLING_ROLLBACK_FAILURE' ,
7576: 'PRJ',
7577: x_calling_place,
7578: x_project_id ,
7579: x_award_number ,

Line 7731: END GMS_BILLING;

7727: --RAISE_APPLICATION_ERROR(-20557,St_Err_Buff);
7728:
7729: End AWARD_BILLING;
7730:
7731: END GMS_BILLING;