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 3002: update GMS_EVENT_INTERSECT gei

2998: IF L_DEBUG = 'Y' THEN
2999: gms_error_pkg.gms_debug('IN EVENT INTERSECT Updation - START','C');
3000: END IF;
3001:
3002: update GMS_EVENT_INTERSECT gei
3003: set
3004: gei.EVENT_NUM = X_Event_Num
3005: ,gei.last_update_date = sysdate
3006: ,gei.last_updated_by = fnd_global.user_id

Line 3014: gms_event_intersect gei2

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

Line 3042: End UPDATE_GMS_EVENT_INTERSECT;

3038: IF L_DEBUG = 'Y' THEN
3039: gms_error_pkg.gms_debug('IN EVENT INTERSECT Updation - END','C');
3040: END IF;
3041:
3042: End UPDATE_GMS_EVENT_INTERSECT;
3043:
3044: --------------------------------------------------------------------------------------------
3045:
3046: --------------------------------------------------------------------------------------------

Line 3424: gms_event_intersect gei,

3420: -- Bug 3235390 : Added decode to get correct quantity
3421: Select SUM(NVL( DECODE(adl.line_num_reversed, NULL, peia.quantity,-1*peia.quantity),0))
3422: into x_qty
3423: from pa_expenditure_items_all peia,
3424: gms_event_intersect gei,
3425: gms_award_distributions adl
3426: where peia.expenditure_item_id = gei.expenditure_item_id
3427: and adl.expenditure_item_id = gei.expenditure_item_id
3428: and adl.adl_line_num = gei.adl_line_num

Line 3741: UPDATE gms_event_intersect

3737:
3738:
3739: END IF;
3740:
3741: UPDATE gms_event_intersect
3742: SET Event_Num = Evt_num
3743: WHERE Event_num = pa_events_rec.event_num
3744: AND award_project_id = p_project_id; /* Added for bug 4172924*/
3745:

Line 3837: gms_event_intersect gei,

3833: ,adl.project_id Actual_Project_Id
3834: ,adl.task_id Actual_Task_Id
3835: ,sum(gei.Amount) amount
3836: from
3837: gms_event_intersect gei,
3838: gms_award_distributions adl
3839: where
3840: gei.award_project_id = X_Proj_Id and
3841: gei.request_id = X_Req_Id and

Line 4012: UPDATE_GMS_EVENT_INTERSECT(Evt_Num,

4008: IF X_Err_Code <> 0 then
4009: Raise NO_PROCESSING_OF_AWARD ;
4010: END IF;
4011:
4012: UPDATE_GMS_EVENT_INTERSECT(Evt_Num,
4013: X_Proj_Id,
4014: X_Req_Id,
4015: raw_events.actual_project_id,
4016: raw_events.actual_task_id );

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

4015: raw_events.actual_project_id,
4016: raw_events.actual_task_id );
4017:
4018: IF L_DEBUG = 'Y' THEN
4019: gms_error_pkg.gms_debug('IN DO_EVENT_PROCESSING - After UPDATE_GMS_EVENT_INTERSECT','C');
4020: END IF;
4021:
4022: END LOOP;
4023:

Line 4362: FROM gms_event_intersect gei,

4358: X_Err_Buff IN OUT NOCOPY VARCHAR2) IS
4359:
4360: CURSOR GET_RAW_ROWS_FROM_INTERSECT IS
4361: SELECT 'Y'
4362: FROM gms_event_intersect gei,
4363: gms_award_distributions adl
4364: WHERE gei.award_project_id = X_Project_Id
4365: AND gei.request_id = X_Request_Id
4366: AND gei.event_type = 'REVENUE'

Line 4452: UPDATE_GMS_EVENT_INTERSECT(Evt_Num,

4448: Raise NO_PROCESSING_OF_AWARD ;
4449: END IF;
4450:
4451:
4452: UPDATE_GMS_EVENT_INTERSECT(Evt_Num,
4453: X_Project_Id,
4454: X_Request_Id,
4455: X_Act_Project_Id,
4456: X_Task_Id );

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

4455: X_Act_Project_Id,
4456: X_Task_Id );
4457:
4458: IF L_DEBUG = 'Y' THEN
4459: gms_error_pkg.gms_debug('IN DO_REV_EVENT_PROCESSING - After UPDATE_GMS_EVENT_INTERSECT','C');
4460: gms_error_pkg.gms_debug('IN DO_REV_EVENT_PROCESSING - END','C');
4461: END IF;
4462:
4463: END IF;

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

5211: gms_error_pkg.gms_debug('Old Values are not equal to new values','C');
5212: END IF;
5213: ------------------------------------------------
5214: -- This procedure builds the Event Description, Creates the Event and Updates the --
5215: --GMS_EVENT_INTERSECT table with the corresponding Event Number --
5216:
5217: -- Following IF .. End if statement commented for NULL Events logic ..
5218: -- zero $ amount logic shifted to DO_EVENT_PROCESSING
5219:

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

5284:
5285: /***********************************************************************************************/
5286:
5287:
5288: -- Inserting a row into GMS_EVENT_INTERSECT for every row Fetched --
5289: -- after checking to see if rows already exist for that Expenditure Item Id --
5290: --dbms_output.put_line('Before GMS_EVENT_INTERSECT');
5291: INSERT_GMS_EVENT_INTERSECT(X_Project_Id,
5292: X_Raw_Cost,

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

5286:
5287:
5288: -- Inserting a row into GMS_EVENT_INTERSECT for every row Fetched --
5289: -- after checking to see if rows already exist for that Expenditure Item Id --
5290: --dbms_output.put_line('Before GMS_EVENT_INTERSECT');
5291: INSERT_GMS_EVENT_INTERSECT(X_Project_Id,
5292: X_Raw_Cost,
5293: X_Expenditure_Item_Id,
5294: X_Adl_Line_Num,

Line 5291: INSERT_GMS_EVENT_INTERSECT(X_Project_Id,

5287:
5288: -- Inserting a row into GMS_EVENT_INTERSECT for every row Fetched --
5289: -- after checking to see if rows already exist for that Expenditure Item Id --
5290: --dbms_output.put_line('Before GMS_EVENT_INTERSECT');
5291: INSERT_GMS_EVENT_INTERSECT(X_Project_Id,
5292: X_Raw_Cost,
5293: X_Expenditure_Item_Id,
5294: X_Adl_Line_Num,
5295: X_Request_id,

Line 5301: X_Err_Stg); -- Insert into GMS_EVENT_INTERSECT

5297: x_calling_process,
5298: X_Billable_Flag,
5299: X_Bill_Hold_Flag,
5300: X_Err_Nbr,
5301: X_Err_Stg); -- Insert into GMS_EVENT_INTERSECT
5302: If X_Err_Nbr <> 0 then
5303: --dbms_output.put_line('After GMS EVENT INTERSECT '||to_char(X_Err_Nbr)||X_Err_Stg);
5304: RETURN;
5305: End If;

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

5299: X_Bill_Hold_Flag,
5300: X_Err_Nbr,
5301: X_Err_Stg); -- Insert into GMS_EVENT_INTERSECT
5302: If X_Err_Nbr <> 0 then
5303: --dbms_output.put_line('After GMS EVENT INTERSECT '||to_char(X_Err_Nbr)||X_Err_Stg);
5304: RETURN;
5305: End If;
5306:
5307: /* bug 5242484 - start */

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

5371: Else -- Else for 'Cursor_Rows_Check_If'
5372: --dbms_output.put_line('For last Row or If no rows present');
5373: -- This is for the Last Row being processed --
5374: --This procedure builds the Event Description, Creates the Event and Updates the --
5375: -- GMS_EVENT_INTERSECT table with the corresponding Event Number --
5376:
5377: -- Following IF .. End if statement commented for NULL Events logic ..
5378: -- zero $ amount logic shifted to DO_EVENT_PROCESSING
5379:

Line 6102: INSERT_GMS_EVENT_INTERSECT(X_Project_Id,

6098: End If;
6099:
6100: End If;
6101: ---------------------------------------------------
6102: INSERT_GMS_EVENT_INTERSECT(X_Project_Id,
6103: X_Rev_Expenditure_Cost,
6104: X_Rev_Expenditure_Item_Id,
6105: X_Rev_Adl_Line_Num,
6106: X_Request_id,

Line 6112: X_Err_Stg); -- Insert into GMS_EVENT_INTERSECT

6108: X_Calling_process,
6109: X_Rev_Billable_Flag,
6110: X_Rev_Bill_Hold_Flag,
6111: X_Err_Nbr,
6112: X_Err_Stg); -- Insert into GMS_EVENT_INTERSECT
6113: If X_Err_Nbr <> 0 then
6114: RETURN;
6115: End If;
6116: