DBA Data[Home] [Help]

APPS.GMS_AP_API2 dependencies on AP_INVOICE_DISTRIBUTIONS_ALL

Line 157: from ap_invoice_distributions_all A,

153: A.last_updated_by LAST_UPDATED_BY,
154: A.created_by CREATED_BY,
155: NVL(A.last_update_login,0) LAST_UPDATE_LOGIN,
156: inv.invoice_num invoice_num
157: from ap_invoice_distributions_all A,
158: pa_projects_all p,
159: gms_project_types gpt,
160: ap_invoices_all inv
161: where a.invoice_id = p_invoice_id

Line 197: from ap_invoice_distributions_all A,

193: l_adl_rec c_adl%ROWTYPE ;
194:
195: cursor c2 is
196: SELECT 1
197: from ap_invoice_distributions_all A,
198: pa_projects_all p,
199: gms_project_types gpt
200: where a.invoice_id = p_invoice_id
201: and a.project_id = p.project_id

Line 247: FROM ap_invoice_distributions_all A,

243: A.last_updated_by LAST_UPDATED_BY,
244: A.created_by CREATED_BY,
245: NVL(A.last_update_login,0) LAST_UPDATE_LOGIN,
246: gms_awards_dist_pkg.get_award_set_id NEW_AWARD_SET_ID
247: FROM ap_invoice_distributions_all A,
248: GMS_AWARD_DISTRIBUTIONS ADL
249: WHERE a.invoice_id = p_invoice_id
250: AND adl.award_set_id = a.award_id
251: AND adl.adl_line_num = 1

Line 279: AP_INVOICE_DISTRIBUTIONS_ALL APD

275: cursor C4(p_invoice_id in number)
276: IS
277: select adl2.award_set_id
278: from gms_award_distributions adl2,
279: AP_INVOICE_DISTRIBUTIONS_ALL APD
280: where apd.invoice_id = p_invoice_id
281: and apd.award_id is not null
282: and adl2.award_set_id = apd.award_id
283: and adl2.invoice_id = apd.invoice_id

Line 306: AP_INVOICE_DISTRIBUTIONS_ALL APD

302: cursor C5(p_invoice_id in number)
303: IS
304: select adl2.award_set_id
305: from gms_award_distributions adl2,
306: AP_INVOICE_DISTRIBUTIONS_ALL APD
307: where apd.invoice_id = p_invoice_id
308: and APD.AWARD_ID is not null
309: and adl2.award_set_id <> apd.award_id
310: and adl2.invoice_id = apd.invoice_id

Line 331: from ap_invoice_distributions_all A,

327:
328: cursor C6(p_invoice_id in number)
329: IS
330: select a.invoice_distribution_id
331: from ap_invoice_distributions_all A,
332: pa_projects_all p,
333: gms_project_types gpt
334: where a.invoice_id = p_invoice_id
335: and a.project_id = p.project_id

Line 395: from ap_invoice_distributions_all A,

391: l_last_updated_by ,
392: l_created_by ,
393: l_last_update_login ,
394: l_new_award_set_id
395: from ap_invoice_distributions_all A,
396: gms_award_distributions adl
397: where a.invoice_id = p_invoice_id
398: and adl.award_set_id = a.award_id
399: and adl.adl_line_num = 1

Line 444: ap_invoice_distributions_all apd

440: /* BUG 14216205 : Commented the below code : Starts */
441: /*select adl2.award_set_id
442: bulk collect into l_dummy_tab
443: from gms_award_distributions adl2,
444: ap_invoice_distributions_all apd
445: where apd.invoice_id = p_invoice_id
446: and apd.award_id is not null
447: and adl2.award_set_id = apd.award_id
448: and adl2.invoice_id = apd.invoice_id

Line 490: ap_invoice_distributions_all apd

486: /* BUG 14216205 : Commented the below code : Starts */
487: /*select adl2.award_set_id
488: bulk collect into l_dummy_tab
489: from gms_award_distributions adl2,
490: ap_invoice_distributions_all apd
491: where apd.invoice_id = p_invoice_id
492: and apd.award_id is not null
493: and adl2.award_set_id <> apd.award_id
494: and adl2.invoice_id = apd.invoice_id

Line 540: from ap_invoice_distributions_all A,

536: */
537: /* BUG 14216205 : Commented the below code : Starts */
538: /*select a.invoice_distribution_id
539: bulk collect into l_dummy_tab
540: from ap_invoice_distributions_all A,
541: pa_projects_all p,
542: gms_project_types gpt
543: where a.invoice_id = p_invoice_id
544: and a.project_id = p.project_id

Line 558: UPDATE ap_invoice_distributions_all apd

554: /* BUG 14216205 : Added the following Code for SAT : Ends */
555: IF l_dummy_tab.count > 0 THEN
556:
557: FORALL i in l_dummy_tab.FIRST..l_dummy_tab.LAST
558: UPDATE ap_invoice_distributions_all apd
559: SET award_id = NULL
560: where apd.invoice_id = p_invoice_id
561: and apd.invoice_distribution_id = l_dummy_tab(i) ;
562: /* BUG 14216205 : Added the following Code for SAT : Starts */

Line 636: and award_set_id not in ( select award_id from ap_invoice_distributions_all

632: -- ADLS are in sych so we can delete orphan adls now.
633: delete from gms_award_distributions
634: where invoice_id = p_invoice_id
635: and document_type = 'AP'
636: and award_set_id not in ( select award_id from ap_invoice_distributions_all
637: where invoice_id = p_invoice_id
638: and award_id is not NULL
639: union /* BUG 14216205 : Added the union for SAT */
640: select award_id from AP_SELF_ASSESSED_TAX_DIST_ALL

Line 714: update ap_invoice_distributions_all

710: -- Update AP distribution with the award set id.
711: -- End of comment.
712:
713: FORALL k in l_invoice_distribution_id.FIRST..l_invoice_distribution_id.LAST
714: update ap_invoice_distributions_all
715: set award_id = l_new_award_set_id(k)
716: where invoice_id = l_invoice_id(k)
717: and distribution_line_number = l_distribution_line_number(k)
718: and invoice_distribution_id = l_invoice_distribution_id(k) ;

Line 735: and award_set_id not in ( select award_id from ap_invoice_distributions_all

731: --
732: delete from gms_award_distributions
733: where invoice_id = p_invoice_id
734: and document_type = 'AP'
735: and award_set_id not in ( select award_id from ap_invoice_distributions_all
736: where invoice_id = p_invoice_id
737: and award_id is not NULL
738: union /* BUG 14216205 : Added the union for SAT */
739: select award_id from ap_self_assessed_tax_dist_all