DBA Data[Home] [Help]

APPS.GMS_AP_API dependencies on AP_INVOICE_DISTRIBUTIONS_ALL

Line 5: P_invoice_id Invoice_id for AP_invoice_distributions_all

1: PACKAGE BODY GMS_AP_API AS
2: -- $Header: gmsapx1b.pls 120.3 2006/05/22 12:31:49 asubrama noship $
3:
4: /* Declare procedure GMS_AP_ER_HEADERS_AUT1
5: P_invoice_id Invoice_id for AP_invoice_distributions_all
6: p_report_header_id Ap_expense_report_headers ID
7: p_reject_code Rejection identifier
8: */
9: -- For Bug 3269365: To check on, whether to print debug messages in log file or not

Line 43: ap_invoice_distributions_all apd,

39: erl.distribution_line_number distribution_line_number,
40: apd.invoice_distribution_id invoice_distribution_id,
41: apd.award_id award_set_id
42: from ap_expense_report_lines_all erl,
43: ap_invoice_distributions_all apd,
44: pa_projects_all p,
45: gms_project_types gpt
46: where report_header_id = X_report_header_id
47: and erl.distribution_line_number= apd.distribution_line_number

Line 104: update ap_invoice_distributions_all

100: END IF ;
101:
102: gms_awards_dist_pkg.create_adls(x_adl_rec) ;
103:
104: update ap_invoice_distributions_all
105: set award_id = X_adl_rec.award_set_id
106: where invoice_id = X_invoice_id
107: and distribution_line_number = X_adl_rec.distribution_line_number
108:

Line 309: from ap_invoice_distributions_all A,

305: A.creation_date CREATION_DATE,
306: A.last_updated_by LAST_UPDATED_BY,
307: A.created_by CREATED_BY,
308: A.last_update_login LAST_UPDATE_LOGIN
309: from ap_invoice_distributions_all A,
310: pa_projects_all B,
311: gms_project_types C
312: where invoice_id = p_invoice_id
313: and distribution_line_number = p_distribution_line_number

Line 345: update ap_invoice_distributions_all

341: l_adl_rec.last_updated_by := loop_ap_rec.last_updated_by ;
342: l_adl_rec.created_by := loop_ap_rec.created_by ;
343: l_adl_rec.last_update_login := loop_ap_rec.last_update_login ;
344: gms_awards_dist_pkg.create_adls( l_adl_rec ) ;
345: update ap_invoice_distributions_all
346: set award_id = l_adl_rec.award_set_id
347: where invoice_id = loop_ap_rec.invoice_id
348: and distribution_line_number = loop_ap_rec.distribution_line_number
349: and invoice_distribution_id = loop_ap_rec.invoice_distribution_id ;

Line 363: update ap_invoice_distributions_all

359: l_adl_rec.invoice_distribution_id := p_invoice_distribution_id ;
360: l_adl_rec.document_type := 'AP' ;
361: l_adl_rec.line_type := 'R' ;
362: gms_awards_dist_pkg.create_adls( l_adl_rec ) ;
363: update ap_invoice_distributions_all
364: set award_id = l_adl_rec.award_set_id
365: where invoice_id = p_invoice_id
366: and distribution_line_number = p_distribution_line_number
367:

Line 503: x_ap_rec ap_invoice_distributions_all%ROWTYPE ;

499: p_invoice_distribution_id IN NUMBER
500: ) is
501: X_award_set_id NUMBER ;
502: x_adl_rec gms_award_distributions%ROWTYPE ;
503: x_ap_rec ap_invoice_distributions_all%ROWTYPE ;
504:
505: x_inv_dist_id NUMBER ;
506: X_amount NUMBER ;
507: Cursor C_get_adl_id is

Line 509: from ap_invoice_distributions_all

505: x_inv_dist_id NUMBER ;
506: X_amount NUMBER ;
507: Cursor C_get_adl_id is
508: select award_id
509: from ap_invoice_distributions_all
510: where Invoice_distribution_id = p_prepay_dist_id ;
511: Cursor C_adl is
512: select *
513: from gms_award_distributions

Line 518: from ap_invoice_distributions_all

514: where award_set_id = X_award_set_id
515: and adl_line_num = 1 ;
516: Cursor c_new_dist_line is
517: select *
518: from ap_invoice_distributions_all
519: where invoice_id = p_invoice_id
520: and distribution_line_number = p_next_dist_line_num
521: and invoice_distribution_id = p_invoice_distribution_id; -- AP Line change: added additional join
522: BEGIN

Line 565: Update ap_invoice_distributions_all

561: UPDATE GMS_AWARD_DISTRIBUTIONS
562: SET BUD_TASK_ID = x_adl_rec.BUD_TASK_ID
563: WHERE AWARD_SET_ID = x_adl_rec.award_set_id
564: AND ADL_STATUS = 'A' ;
565: Update ap_invoice_distributions_all
566: Set award_id = x_adl_rec.award_set_id
567: Where invoice_distribution_id = x_inv_dist_id ;
568:
569: gms_cost_plus_extn.CALC_prepayment_burden( X_AP_REC, x_adl_rec) ;

Line 760: from ap_invoice_distributions_all A,

756: A.last_updated_by LAST_UPDATED_BY,
757: A.created_by CREATED_BY,
758: NVL(A.last_update_login,0) LAST_UPDATE_LOGIN,
759: inv.invoice_num invoice_num
760: from ap_invoice_distributions_all A,
761: pa_projects_all p,
762: gms_project_types gpt,
763: ap_invoices_all inv
764: where a.invoice_id = p_invoice_id

Line 777: from ap_invoice_distributions_all A,

773: l_adl_rec c_adl%ROWTYPE ;
774:
775: cursor c2 is
776: SELECT 1
777: from ap_invoice_distributions_all A,
778: pa_projects_all p,
779: gms_project_types gpt
780: where a.invoice_id = p_invoice_id
781: and a.project_id = p.project_id

Line 839: from ap_invoice_distributions_all A,

835: l_last_updated_by ,
836: l_created_by ,
837: l_last_update_login ,
838: l_new_award_set_id
839: from ap_invoice_distributions_all A,
840: gms_award_distributions adl
841: where a.invoice_id = p_invoice_id
842: and adl.award_set_id = a.award_id
843: and adl.adl_line_num = 1

Line 858: ap_invoice_distributions_all apd

854: where adl.document_type = 'AP'
855: and adl.adl_status = 'I'
856: and adl.award_set_id in ( select adl2.award_set_id
857: from gms_award_distributions adl2,
858: ap_invoice_distributions_all apd
859: where apd.invoice_id = p_invoice_id
860: and apd.award_id is not null
861: and adl2.award_set_id = apd.award_id
862: and adl2.invoice_id = apd.invoice_id

Line 878: ap_invoice_distributions_all apd

874: where adl.document_type = 'AP'
875: and adl.adl_status = 'A'
876: and adl.award_set_id in ( select adl2.award_set_id
877: from gms_award_distributions adl2,
878: ap_invoice_distributions_all apd
879: where apd.invoice_id = p_invoice_id
880: and apd.award_id is not null
881: and adl2.award_set_id <> apd.award_id
882: and adl2.invoice_id = apd.invoice_id

Line 896: -- UPDATE ap_invoice_distributions_all apd

892: -- =================================================
893: -- Bug : 4956860
894: -- R12.PJ:XB2:DEV:GMS: APPSPERF: PACKAGE:GMSAPX1B.PLS
895: --
896: -- UPDATE ap_invoice_distributions_all apd
897: -- SET award_id = NULL
898: -- where apd.invoice_id = p_invoice_id
899: -- and apd.award_id is not NULL
900: -- and apd.invoice_distribution_id in ( select a.invoice_distribution_id

Line 901: -- from ap_invoice_distributions_all A,

897: -- SET award_id = NULL
898: -- where apd.invoice_id = p_invoice_id
899: -- and apd.award_id is not NULL
900: -- and apd.invoice_distribution_id in ( select a.invoice_distribution_id
901: -- from ap_invoice_distributions_all A,
902: -- pa_projects_all p,
903: -- gms_project_types gpt
904: -- where a.invoice_id = p_invoice_id
905: -- and a.project_id = p.project_id

Line 914: from ap_invoice_distributions_all A,

910: ** Update statement was changed to bulk statement to resolve the share memory performance issue.
911: */
912: select a.invoice_distribution_id
913: bulk collect into l_dummy_tab
914: from ap_invoice_distributions_all A,
915: pa_projects_all p,
916: gms_project_types gpt
917: where a.invoice_id = p_invoice_id
918: and a.project_id = p.project_id

Line 926: UPDATE ap_invoice_distributions_all apd

922:
923: IF l_dummy_tab.count > 0 THEN
924:
925: FORALL i in l_dummy_tab.FIRST..l_dummy_tab.LAST
926: UPDATE ap_invoice_distributions_all apd
927: SET award_id = NULL
928: where apd.invoice_id = p_invoice_id
929: and apd.invoice_distribution_id = l_dummy_tab(i) ;
930:

Line 1056: update ap_invoice_distributions_all

1052: -- Update AP distribution with the award set id.
1053: -- End of comment.
1054:
1055: FORALL k in l_invoice_distribution_id.FIRST..l_invoice_distribution_id.LAST
1056: update ap_invoice_distributions_all
1057: set award_id = l_new_award_set_id(k)
1058: where invoice_id = l_invoice_id(k)
1059: and distribution_line_number = l_distribution_line_number(k)
1060: and invoice_distribution_id = l_invoice_distribution_id(k) ;