DBA Data[Home] [Help]

APPS.GMS_BILLING dependencies on GMS_EVENT_INTERSECT

Line 173: from gms_event_intersect

169: Select 1
170: into x_dummy
171: from dual
172: where exists (select 1
173: from gms_event_intersect
174: where award_project_id = X_Award_Project_Id
175: and request_id = X_Request_Id
176: and event_type = X_Event_Type
177: and event_num IS NULL);

Line 433: FROM gms_event_intersect gei, gms_event_attribute gea

429: SELECT DISTINCT gei.expenditure_item_id, gei.adl_line_num,
430: gea.actual_project_id, gea.actual_task_id,
431: gea.expenditure_org_id, gei.amount,
432: gei.revenue_accumulated, gei.creation_date,gea.request_id
433: FROM gms_event_intersect gei, gms_event_attribute gea
434: WHERE gea.project_id = f_project_id
435: AND gea.event_num = f_event_num
436: AND gea.event_calling_process = f_event_calling_process
437: AND gei.award_project_id = gea.project_id

Line 446: f_raw_rev_accumulated gms_event_intersect.revenue_accumulated%TYPE;

442: f_raw_adl_line_num gms_award_distributions.adl_line_num%TYPE;
443: f_raw_act_project_id gms_event_attribute.actual_project_id%TYPE;
444: f_raw_act_task_id gms_event_attribute.actual_task_id%TYPE;
445: f_raw_org_id gms_event_attribute.expenditure_org_id%TYPE;
446: f_raw_rev_accumulated gms_event_intersect.revenue_accumulated%TYPE;
447: f_raw_revenue_amount gms_event_intersect.amount%TYPE;
448: f_raw_creation_date gms_event_intersect.creation_date%TYPE;
449:
450: CURSOR get_exp_burden_info (f_project_id NUMBER, f_event_num NUMBER,

Line 447: f_raw_revenue_amount gms_event_intersect.amount%TYPE;

443: f_raw_act_project_id gms_event_attribute.actual_project_id%TYPE;
444: f_raw_act_task_id gms_event_attribute.actual_task_id%TYPE;
445: f_raw_org_id gms_event_attribute.expenditure_org_id%TYPE;
446: f_raw_rev_accumulated gms_event_intersect.revenue_accumulated%TYPE;
447: f_raw_revenue_amount gms_event_intersect.amount%TYPE;
448: f_raw_creation_date gms_event_intersect.creation_date%TYPE;
449:
450: CURSOR get_exp_burden_info (f_project_id NUMBER, f_event_num NUMBER,
451: f_event_calling_process VARCHAR2)

Line 448: f_raw_creation_date gms_event_intersect.creation_date%TYPE;

444: f_raw_act_task_id gms_event_attribute.actual_task_id%TYPE;
445: f_raw_org_id gms_event_attribute.expenditure_org_id%TYPE;
446: f_raw_rev_accumulated gms_event_intersect.revenue_accumulated%TYPE;
447: f_raw_revenue_amount gms_event_intersect.amount%TYPE;
448: f_raw_creation_date gms_event_intersect.creation_date%TYPE;
449:
450: CURSOR get_exp_burden_info (f_project_id NUMBER, f_event_num NUMBER,
451: f_event_calling_process VARCHAR2)
452: IS

Line 496: || 20. Deleting from gms_event_intersect

492: BEGIN
493: /* --------------------------------------------------------------------------
494: || Rollback Activities Include:
495: || 10. Updating gms_award_distributions (revenue_distributed_flag/billed_flag)
496: || 20. Deleting from gms_event_intersect
497: || 30. Deleting from gms_burden_components
498: || 40. Updating gms_summary_project_fundings
499: || 50. Deleting gms_event_attribute
500: -------------------------------------------------------------------------- */

Line 576: -- 20: Deleting records from gms_event_intersect

572: AND document_type = 'EXP'
573: AND adl_status = 'A';
574: END IF;
575:
576: -- 20: Deleting records from gms_event_intersect
577:
578: x_stage := 20;
579:
580: DELETE

Line 581: FROM gms_event_intersect

577:
578: x_stage := 20;
579:
580: DELETE
581: FROM gms_event_intersect
582: WHERE expenditure_item_id = f_raw_exp_item_id
583: AND adl_line_num = f_raw_adl_line_num
584: AND award_project_id = evt.project_id
585: AND event_num = evt.event_num

Line 754: -- records from gms_event_intersect and gms_burden_components

750: END billing_rollback;
751:
752: -- -----------------------------------------------------------------------------
753: -- Following procedure DELETE_NULL_EVENTS will delete the null event
754: -- records from gms_event_intersect and gms_burden_components
755: -- At the same time, it will reset the award distribution lines billing flags
756: -- For invoice records, procedure may have to update summary fundings ...
757:
758: -- !!! Flags will be reset with a value of "Z" indicating net zero ...

Line 819: from gms_event_intersect

815: set revenue_distributed_flag = decode(revenue_distributed_flag,'Y','Z','Z','N')
816: where (expenditure_item_id,adl_line_num) in
817: (select expenditure_item_id,
818: adl_line_num
819: from gms_event_intersect
820: where award_project_id = X_award_project_id
821: and event_num = -1
822: and request_id = X_request_id
823: and event_type = X_event_type

Line 832: from gms_event_intersect

828: gms_error_pkg.gms_debug('In DELETE_NULL_EVENTS - Stage: Revenue Raw - Delete records', 'C');
829: END IF;
830:
831: Delete
832: from gms_event_intersect
833: where award_project_id = X_award_project_id
834: and event_num = -1
835: and request_id = X_request_id
836: and event_type = X_event_type;

Line 1179: || 2. Deleting from gms_event_intersect

1175:
1176: /* --------------------------------------------------------------------------
1177: || Here's what we need to do :
1178: || 1. Updating gms_summary_project_fundings
1179: || 2. Deleting from gms_event_intersect
1180: || 3. Deleting from gms_burden_components
1181: || 4. Updating gms_award_distributions (revenue_distributed_flag/billed_flag)
1182: -------------------------------------------------------------------------- */
1183:

Line 1217: from gms_Event_intersect

1213: WHERE expenditure_item_id = x_expenditure_item_id
1214: AND document_type = 'EXP'
1215: AND adl_status = 'A'
1216: AND ( expenditure_item_id,adl_line_num ) in ( select expenditure_item_id, adl_line_num
1217: from gms_Event_intersect
1218: where expenditure_item_id = x_expenditure_item_id
1219: AND award_project_id = x_award_project_id
1220: AND event_num is NULL
1221: AND event_type = x_event_type

Line 1230: DELETE FROM gms_event_intersect

1226: AND award_project_id = x_award_project_id
1227: AND event_num is NULL
1228: AND event_type = x_event_type );
1229:
1230: DELETE FROM gms_event_intersect
1231: WHERE expenditure_item_id = x_expenditure_item_id
1232: AND award_project_id = x_award_project_id
1233: AND event_num is NULL
1234: AND event_type = x_event_type ;

Line 2562: -- Amount in the GMS_EVENT_INTERSECT table for all the number of times this

2558: END GET_FORMAT_SELECT;
2559:
2560: ---------------------------------------------------------------------------------------
2561: -- Procedure GET_AMOUNT_IN_INTERSECT: Given the Expenditure Item Id returns the cumulative
2562: -- Amount in the GMS_EVENT_INTERSECT table for all the number of times this
2563: -- expenditure item has been picked up before for billing
2564: --------------------------------------------------------------------------------------
2565: PROCEDURE GET_AMOUNT_IN_INTERSECT(X_Expenditure_Item_Id IN NUMBER,
2566: X_Adl_Line_Num IN NUMBER,

Line 2580: GMS_EVENT_INTERSECT

2576: nvl(sum(nvl(amount,0)),0)
2577: into
2578: X_Current_Amount
2579: from
2580: GMS_EVENT_INTERSECT
2581: where
2582: expenditure_item_id = X_Expenditure_Item_Id and
2583: adl_line_num = X_Adl_Line_Num and
2584: event_type = decode(X_Calling_Process,'Invoice','INVOICE','Revenue','REVENUE');

Line 2681: --GMS_EVENT_INTERSECT table for that Expenditure Item . If the calling Process is

2677:
2678: -------------------------------------------------------------------------------
2679: --Procedure GET_ACCRUE_BILL_OR_INSERT_AMT: Gets the resultant amount that needs to be accrued or
2680: --Billed for a particular Expenditure Item after taking into account the amount already existing in the
2681: --GMS_EVENT_INTERSECT table for that Expenditure Item . If the calling Process is
2682: --'Invoice' the process will look at the Billable Flag and Bill_Hold_Flag to decide how much amount
2683: --needs to be reduced from the Total Billed Amount. These two flags are not looked at for the
2684: --'Revenue' process.
2685:

Line 2888: -- Procedure INSERT_GMS_EVENT_INTERSECT: Inserts a row into GMS_EVENT_INTERSECT table for an

2884:
2885: End INSERT_GMS_BURDEN_COMPONENTS;
2886: ------------------------------------------------------------------------------------
2887: -----------------------------------------------------------------------------------------
2888: -- Procedure INSERT_GMS_EVENT_INTERSECT: Inserts a row into GMS_EVENT_INTERSECT table for an
2889: -- amount equal to the difference between the current Raw Cost on the Expenditure Item and
2890: -- the cumulative amount for the expenditure item in the table
2891: -----------------------------------------------------------------------------------------
2892: PROCEDURE INSERT_GMS_EVENT_INTERSECT(X_Award_Project_Id IN NUMBER,

Line 2892: PROCEDURE INSERT_GMS_EVENT_INTERSECT(X_Award_Project_Id IN NUMBER,

2888: -- Procedure INSERT_GMS_EVENT_INTERSECT: Inserts a row into GMS_EVENT_INTERSECT table for an
2889: -- amount equal to the difference between the current Raw Cost on the Expenditure Item and
2890: -- the cumulative amount for the expenditure item in the table
2891: -----------------------------------------------------------------------------------------
2892: PROCEDURE INSERT_GMS_EVENT_INTERSECT(X_Award_Project_Id IN NUMBER,
2893: X_Raw_Cost IN NUMBER,
2894: X_Expenditure_Item_Id IN NUMBER,
2895: X_Adl_Line_Num IN NUMBER,
2896: X_request_id IN NUMBER,

Line 2922: INSERT INTO GMS_EVENT_INTERSECT(AWARD_PROJECT_ID,

2918:
2919: X_Amount_To_Insert := pa_currency.round_currency_amt(nvl(X_Amount_To_Insert,0)); -- added for bug 5182669
2920: If X_Amount_To_Insert <> 0 then
2921: Begin
2922: INSERT INTO GMS_EVENT_INTERSECT(AWARD_PROJECT_ID,
2923: EXPENDITURE_ITEM_ID,
2924: ADL_LINE_NUM,
2925: AMOUNT,
2926: REQUEST_ID,

Line 2982: End INSERT_GMS_EVENT_INTERSECT;

2978:
2979: End;
2980: End If;
2981:
2982: End INSERT_GMS_EVENT_INTERSECT;
2983:
2984: -----------------------------------------------------------------------------------------
2985: -- Procedure UPDATE_GMS_EVENT_INTERSECT: Updates GMS_EVENT_INTERSECT table with the Event Num
2986: -- of the Event created.

Line 2985: -- Procedure UPDATE_GMS_EVENT_INTERSECT: Updates GMS_EVENT_INTERSECT table with the Event Num

2981:
2982: End INSERT_GMS_EVENT_INTERSECT;
2983:
2984: -----------------------------------------------------------------------------------------
2985: -- Procedure UPDATE_GMS_EVENT_INTERSECT: Updates GMS_EVENT_INTERSECT table with the Event Num
2986: -- of the Event created.
2987: -- Bug 3235390 : Modified the below procedure to update records based on project and task_id.
2988: -----------------------------------------------------------------------------------------
2989: PROCEDURE UPDATE_GMS_EVENT_INTERSECT(X_Event_Num IN NUMBER,

Line 2989: PROCEDURE UPDATE_GMS_EVENT_INTERSECT(X_Event_Num IN NUMBER,

2985: -- Procedure UPDATE_GMS_EVENT_INTERSECT: Updates GMS_EVENT_INTERSECT table with the Event Num
2986: -- of the Event created.
2987: -- Bug 3235390 : Modified the below procedure to update records based on project and task_id.
2988: -----------------------------------------------------------------------------------------
2989: PROCEDURE UPDATE_GMS_EVENT_INTERSECT(X_Event_Num IN NUMBER,
2990: X_Award_Project_Id IN NUMBER,
2991: X_request_id IN NUMBER,
2992: X_ACT_PROJECT_ID IN NUMBER,
2993: X_TASK_ID IN NUMBER) IS

Line 3003: update GMS_EVENT_INTERSECT gei

2999: gms_error_pkg.gms_debug('IN EVENT INTERSECT Updation - START','C');
3000: END IF;
3001:
3002: /* commented for bug bug 9852339
3003: update GMS_EVENT_INTERSECT gei
3004: set
3005: gei.EVENT_NUM = X_Event_Num
3006: ,gei.last_update_date = sysdate
3007: ,gei.last_updated_by = fnd_global.user_id

Line 3015: gms_event_intersect gei2

3011: gei.EVENT_NUM IS NULL
3012: AND EXISTS ( -- Bug 3235390 : Added below conditions to check for project and task.
3013: SELECT gei2.expenditure_item_id
3014: FROM gms_award_distributions adl,
3015: gms_event_intersect gei2
3016: WHERE gei2.expenditure_item_id = gei.expenditure_item_id
3017: AND adl.expenditure_item_id = gei2.expenditure_item_id
3018: AND adl.adl_status = 'A'
3019: AND adl.document_type ='EXP'

Line 3027: UPDATE GMS_EVENT_INTERSECT GEI

3023: */
3024:
3025: /* re-writing the above query for bug 9852339 */
3026:
3027: UPDATE GMS_EVENT_INTERSECT GEI
3028: SET GEI.EVENT_NUM = X_Event_Num
3029: ,GEI.LAST_UPDATE_DATE = SYSDATE
3030: ,GEI.LAST_UPDATED_BY = FND_GLOBAL.USER_ID
3031: ,GEI.LAST_UPDATE_LOGIN = FND_GLOBAL.LOGIN_ID

Line 3067: End UPDATE_GMS_EVENT_INTERSECT;

3063: IF L_DEBUG = 'Y' THEN
3064: gms_error_pkg.gms_debug('IN EVENT INTERSECT Updation - END','C');
3065: END IF;
3066:
3067: End UPDATE_GMS_EVENT_INTERSECT;
3068:
3069: --------------------------------------------------------------------------------------------
3070:
3071: --------------------------------------------------------------------------------------------

Line 3449: gms_event_intersect gei,

3445: -- Bug 3235390 : Added decode to get correct quantity
3446: Select SUM(NVL( DECODE(adl.line_num_reversed, NULL, peia.quantity,-1*peia.quantity),0))
3447: into x_qty
3448: from pa_expenditure_items_all peia,
3449: gms_event_intersect gei,
3450: gms_award_distributions adl
3451: where peia.expenditure_item_id = gei.expenditure_item_id
3452: and adl.expenditure_item_id = gei.expenditure_item_id
3453: and adl.adl_line_num = gei.adl_line_num

Line 3766: UPDATE gms_event_intersect

3762:
3763:
3764: END IF;
3765:
3766: UPDATE gms_event_intersect
3767: SET Event_Num = Evt_num
3768: WHERE Event_num = pa_events_rec.event_num
3769: AND award_project_id = p_project_id; /* Added for bug 4172924*/
3770:

Line 3862: gms_event_intersect gei,

3858: ,adl.project_id Actual_Project_Id
3859: ,adl.task_id Actual_Task_Id
3860: ,sum(gei.Amount) amount
3861: from
3862: gms_event_intersect gei,
3863: gms_award_distributions adl
3864: where
3865: gei.award_project_id = X_Proj_Id and
3866: gei.request_id = X_Req_Id and

Line 4037: UPDATE_GMS_EVENT_INTERSECT(Evt_Num,

4033: IF X_Err_Code <> 0 then
4034: Raise NO_PROCESSING_OF_AWARD ;
4035: END IF;
4036:
4037: UPDATE_GMS_EVENT_INTERSECT(Evt_Num,
4038: X_Proj_Id,
4039: X_Req_Id,
4040: raw_events.actual_project_id,
4041: raw_events.actual_task_id );

Line 4044: gms_error_pkg.gms_debug('IN DO_EVENT_PROCESSING - After UPDATE_GMS_EVENT_INTERSECT','C');

4040: raw_events.actual_project_id,
4041: raw_events.actual_task_id );
4042:
4043: IF L_DEBUG = 'Y' THEN
4044: gms_error_pkg.gms_debug('IN DO_EVENT_PROCESSING - After UPDATE_GMS_EVENT_INTERSECT','C');
4045: END IF;
4046:
4047: END LOOP;
4048:

Line 4387: FROM gms_event_intersect gei,

4383: X_Err_Buff IN OUT NOCOPY VARCHAR2) IS
4384:
4385: CURSOR GET_RAW_ROWS_FROM_INTERSECT IS
4386: SELECT 'Y'
4387: FROM gms_event_intersect gei,
4388: gms_award_distributions adl
4389: WHERE gei.award_project_id = X_Project_Id
4390: AND gei.request_id = X_Request_Id
4391: AND gei.event_type = 'REVENUE'

Line 4477: UPDATE_GMS_EVENT_INTERSECT(Evt_Num,

4473: Raise NO_PROCESSING_OF_AWARD ;
4474: END IF;
4475:
4476:
4477: UPDATE_GMS_EVENT_INTERSECT(Evt_Num,
4478: X_Project_Id,
4479: X_Request_Id,
4480: X_Act_Project_Id,
4481: X_Task_Id );

Line 4484: gms_error_pkg.gms_debug('IN DO_REV_EVENT_PROCESSING - After UPDATE_GMS_EVENT_INTERSECT','C');

4480: X_Act_Project_Id,
4481: X_Task_Id );
4482:
4483: IF L_DEBUG = 'Y' THEN
4484: gms_error_pkg.gms_debug('IN DO_REV_EVENT_PROCESSING - After UPDATE_GMS_EVENT_INTERSECT','C');
4485: gms_error_pkg.gms_debug('IN DO_REV_EVENT_PROCESSING - END','C');
4486: END IF;
4487:
4488: END IF;

Line 5244: --GMS_EVENT_INTERSECT table with the corresponding Event Number --

5240: gms_error_pkg.gms_debug('Old Values are not equal to new values','C');
5241: END IF;
5242: ------------------------------------------------
5243: -- This procedure builds the Event Description, Creates the Event and Updates the --
5244: --GMS_EVENT_INTERSECT table with the corresponding Event Number --
5245:
5246: -- Following IF .. End if statement commented for NULL Events logic ..
5247: -- zero $ amount logic shifted to DO_EVENT_PROCESSING
5248:

Line 5317: -- Inserting a row into GMS_EVENT_INTERSECT for every row Fetched --

5313:
5314: /***********************************************************************************************/
5315:
5316:
5317: -- Inserting a row into GMS_EVENT_INTERSECT for every row Fetched --
5318: -- after checking to see if rows already exist for that Expenditure Item Id --
5319: --dbms_output.put_line('Before GMS_EVENT_INTERSECT');
5320: INSERT_GMS_EVENT_INTERSECT(X_Project_Id,
5321: X_Raw_Cost,

Line 5319: --dbms_output.put_line('Before GMS_EVENT_INTERSECT');

5315:
5316:
5317: -- Inserting a row into GMS_EVENT_INTERSECT for every row Fetched --
5318: -- after checking to see if rows already exist for that Expenditure Item Id --
5319: --dbms_output.put_line('Before GMS_EVENT_INTERSECT');
5320: INSERT_GMS_EVENT_INTERSECT(X_Project_Id,
5321: X_Raw_Cost,
5322: X_Expenditure_Item_Id,
5323: X_Adl_Line_Num,

Line 5320: INSERT_GMS_EVENT_INTERSECT(X_Project_Id,

5316:
5317: -- Inserting a row into GMS_EVENT_INTERSECT for every row Fetched --
5318: -- after checking to see if rows already exist for that Expenditure Item Id --
5319: --dbms_output.put_line('Before GMS_EVENT_INTERSECT');
5320: INSERT_GMS_EVENT_INTERSECT(X_Project_Id,
5321: X_Raw_Cost,
5322: X_Expenditure_Item_Id,
5323: X_Adl_Line_Num,
5324: X_Request_id,

Line 5330: X_Err_Stg); -- Insert into GMS_EVENT_INTERSECT

5326: x_calling_process,
5327: X_Billable_Flag,
5328: X_Bill_Hold_Flag,
5329: X_Err_Nbr,
5330: X_Err_Stg); -- Insert into GMS_EVENT_INTERSECT
5331: If X_Err_Nbr <> 0 then
5332: --dbms_output.put_line('After GMS EVENT INTERSECT '||to_char(X_Err_Nbr)||X_Err_Stg);
5333: RETURN;
5334: End If;

Line 5332: --dbms_output.put_line('After GMS EVENT INTERSECT '||to_char(X_Err_Nbr)||X_Err_Stg);

5328: X_Bill_Hold_Flag,
5329: X_Err_Nbr,
5330: X_Err_Stg); -- Insert into GMS_EVENT_INTERSECT
5331: If X_Err_Nbr <> 0 then
5332: --dbms_output.put_line('After GMS EVENT INTERSECT '||to_char(X_Err_Nbr)||X_Err_Stg);
5333: RETURN;
5334: End If;
5335:
5336: /* bug 5242484 - start */

Line 5404: -- GMS_EVENT_INTERSECT table with the corresponding Event Number --

5400: Else -- Else for 'Cursor_Rows_Check_If'
5401: --dbms_output.put_line('For last Row or If no rows present');
5402: -- This is for the Last Row being processed --
5403: --This procedure builds the Event Description, Creates the Event and Updates the --
5404: -- GMS_EVENT_INTERSECT table with the corresponding Event Number --
5405:
5406: -- Following IF .. End if statement commented for NULL Events logic ..
5407: -- zero $ amount logic shifted to DO_EVENT_PROCESSING
5408:

Line 6133: INSERT_GMS_EVENT_INTERSECT(X_Project_Id,

6129: End If;
6130:
6131: End If;
6132: ---------------------------------------------------
6133: INSERT_GMS_EVENT_INTERSECT(X_Project_Id,
6134: X_Rev_Expenditure_Cost,
6135: X_Rev_Expenditure_Item_Id,
6136: X_Rev_Adl_Line_Num,
6137: X_Request_id,

Line 6143: X_Err_Stg); -- Insert into GMS_EVENT_INTERSECT

6139: X_Calling_process,
6140: X_Rev_Billable_Flag,
6141: X_Rev_Bill_Hold_Flag,
6142: X_Err_Nbr,
6143: X_Err_Stg); -- Insert into GMS_EVENT_INTERSECT
6144: If X_Err_Nbr <> 0 then
6145: RETURN;
6146: End If;
6147: