DBA Data[Home] [Help]

APPS.AP_AUTOMATIC_PROPAGATION_PKG dependencies on AP_INVOICES_ALL

Line 18: FROM ap_invoices_all ai, ap_payment_schedules_all aps

14: --Address + OU level checking
15: IF (P_party_Site_Id IS NOT NULL and P_org_Id IS NOT NULL) THEN
16: SELECT COUNT(DISTINCT ai.invoice_id)
17: INTO l_affected_invoices
18: FROM ap_invoices_all ai, ap_payment_schedules_all aps
19: WHERE aps.external_bank_account_id = p_external_bank_account_id
20: AND ai.invoice_id = aps.invoice_id
21: -- AND ai.payment_status_flag IN ('N','P') /* Bug 11783234 Exclude 'partial paid payment schedules' status */
22: AND ai.payment_status_flag = 'N'

Line 40: FROM ap_invoices_all ai, ap_payment_schedules_all aps

36: --Address level checking
37: ELSIF (P_party_Site_Id IS NOT NULL) THEN
38: SELECT COUNT(DISTINCT ai.invoice_id)
39: INTO l_affected_invoices
40: FROM ap_invoices_all ai, ap_payment_schedules_all aps
41: WHERE aps.external_bank_account_id = p_external_bank_account_id
42: AND ai.invoice_id = aps.invoice_id
43: -- AND ai.payment_status_flag IN ('N','P') /* Bug 11783234 Exclude 'partial paid payment schedules' status */
44: AND ai.payment_status_flag = 'N'

Line 61: FROM ap_invoices_all ai, ap_payment_schedules_all aps

57: --Supplier Site level checking
58: ELSIF p_vendor_site_id IS NOT NULL THEN
59: SELECT COUNT(DISTINCT ai.invoice_id)
60: INTO l_affected_invoices
61: FROM ap_invoices_all ai, ap_payment_schedules_all aps
62: WHERE aps.external_bank_account_id = p_external_bank_account_id
63: AND ai.invoice_id = aps.invoice_id
64: -- AND ai.payment_status_flag IN ('N','P') /* Bug 11783234 Exclude 'partial paid payment schedules' status */
65: AND ai.payment_status_flag = 'N'

Line 74: FROM ap_invoices_all ai, ap_payment_schedules_all aps

70: --Supplier level checking
71: ELSE
72: SELECT COUNT(DISTINCT ai.invoice_id)
73: INTO l_affected_invoices
74: FROM ap_invoices_all ai, ap_payment_schedules_all aps
75: WHERE aps.external_bank_account_id = p_external_bank_account_id
76: AND ai.invoice_id = aps.invoice_id
77: -- AND ai.payment_status_flag IN ('N','P') /* Bug 11783234 Exclude 'partial paid payment schedules' status */
78: AND ai.payment_status_flag = 'N'

Line 136: FROM ap_invoices_all ai, ap_payment_schedules_all aps

132: --Address + OU level checking
133: IF (P_party_Site_Id IS NOT NULL and P_org_Id IS NOT NULL) THEN
134: SELECT COUNT(DISTINCT ai.invoice_id)
135: INTO l_affected_invoices
136: FROM ap_invoices_all ai, ap_payment_schedules_all aps
137: WHERE aps.external_bank_account_id = p_external_bank_account_id
138: AND ai.invoice_id = aps.invoice_id
139: AND ai.payment_status_flag IN ('N','P')
140: AND ai.cancelled_date IS NULL

Line 157: FROM ap_invoices_all ai, ap_payment_schedules_all aps

153: --Address level checking
154: ELSIF (P_party_Site_Id IS NOT NULL) THEN
155: SELECT COUNT(DISTINCT ai.invoice_id)
156: INTO l_affected_invoices
157: FROM ap_invoices_all ai, ap_payment_schedules_all aps
158: WHERE aps.external_bank_account_id = p_external_bank_account_id
159: AND ai.invoice_id = aps.invoice_id
160: AND ai.payment_status_flag IN ('N','P')
161: AND ai.cancelled_date IS NULL

Line 177: FROM ap_invoices_all ai, ap_payment_schedules_all aps

173: --Supplier Site level checking
174: ELSIF p_vendor_site_id IS NOT NULL THEN
175: SELECT COUNT(DISTINCT ai.invoice_id)
176: INTO l_affected_invoices
177: FROM ap_invoices_all ai, ap_payment_schedules_all aps
178: WHERE aps.external_bank_account_id = p_external_bank_account_id
179: AND ai.invoice_id = aps.invoice_id
180: AND ai.payment_status_flag IN ('N','P')
181: AND ai.cancelled_date IS NULL

Line 189: FROM ap_invoices_all ai, ap_payment_schedules_all aps

185: --Supplier level checking
186: ELSE
187: SELECT COUNT(DISTINCT ai.invoice_id)
188: INTO l_affected_invoices
189: FROM ap_invoices_all ai, ap_payment_schedules_all aps
190: WHERE aps.external_bank_account_id = p_external_bank_account_id
191: AND ai.invoice_id = aps.invoice_id
192: AND ai.payment_status_flag IN ('N','P')
193: AND ai.cancelled_date IS NULL

Line 273: FROM ap_payment_schedules_all aps,ap_invoices_all ai

269:
270: IF (P_party_Site_Id IS NOT NULL and P_org_Id IS NOT NULL) THEN
271: -- Added For Loop/IBY Call for bug 9410719
272: FOR x IN (SELECT aps.invoice_id, aps.payment_num, ai.payment_currency_code, ai.vendor_site_id
273: FROM ap_payment_schedules_all aps,ap_invoices_all ai
274: WHERE aps.invoice_id = ai.invoice_id
275: AND aps.external_bank_account_id = p_from_bank_account_id
276: -- Added the below two condition for the bug 10401158
277: AND aps.checkrun_id is NULL

Line 321: UPDATE ap_invoices_all ai

317: AND aps.payment_num = x.payment_num;
318:
319: --Bug10065192: Update the bank at invoice header level, so recalculation of
320: --payment schedules does not reinstate the inactive bank
321: UPDATE ap_invoices_all ai
322: SET ai.external_bank_account_id = l_to_bank_account_id,
323: ai.last_update_date = SYSDATE,
324: ai.last_updated_by = FND_GLOBAL.user_id,
325: ai.last_update_login = FND_GLOBAL.login_id

Line 330: FROM ap_invoices_all ai, ap_payment_schedules_all aps

326: WHERE ai.invoice_id = x.invoice_id;
327:
328: /* WHERE aps.invoice_id IN
329: (SELECT DISTINCT ai.invoice_id
330: FROM ap_invoices_all ai, ap_payment_schedules_all aps
331: WHERE aps.external_bank_account_id = p_from_bank_account_id
332: AND ai.invoice_id = aps.invoice_id
333: AND ai.payment_status_flag IN ('N','P')
334: AND ai.cancelled_date IS NULL

Line 360: FROM ap_payment_schedules_all aps,ap_invoices_all ai

356:
357: ELSIF (P_party_Site_Id IS NOT NULL) THEN
358: -- Added For Loop/IBY Call for bug 9410719
359: FOR x IN (SELECT aps.invoice_id, aps.payment_num, ai.payment_currency_code, ai.vendor_site_id, ai.org_id
360: FROM ap_payment_schedules_all aps,ap_invoices_all ai
361: WHERE aps.invoice_id = ai.invoice_id
362: AND aps.external_bank_account_id = p_from_bank_account_id
363: -- Added the below two condition for the bug 10401158
364: AND aps.checkrun_id is NULL

Line 406: UPDATE ap_invoices_all ai

402: AND aps.payment_num = x.payment_num;
403:
404: --Bug10065192: Update the bank at invoice header level, so recalculation of
405: --payment schedules does not reinstate the inactive bank
406: UPDATE ap_invoices_all ai
407: SET ai.external_bank_account_id = l_to_bank_account_id,
408: ai.last_update_date = SYSDATE,
409: ai.last_updated_by = FND_GLOBAL.user_id,
410: ai.last_update_login = FND_GLOBAL.login_id

Line 415: FROM ap_invoices_all ai, ap_payment_schedules_all aps

411: WHERE ai.invoice_id = x.invoice_id;
412:
413: /* WHERE aps.invoice_id IN
414: (SELECT DISTINCT ai.invoice_id
415: FROM ap_invoices_all ai, ap_payment_schedules_all aps
416: WHERE aps.external_bank_account_id = p_from_bank_account_id
417: AND ai.invoice_id = aps.invoice_id
418: AND ai.payment_status_flag IN ('N','P')
419: AND ai.cancelled_date IS NULL

Line 444: FROM ap_payment_schedules_all aps,ap_invoices_all ai

440:
441: ELSIF (p_vendor_site_id IS NOT NULL) THEN
442: -- Added For Loop/IBY Call for bug 9410719
443: FOR x in (SELECT aps.invoice_id, aps.payment_num, ai.payment_currency_code, ai.party_site_id, ai.org_id
444: FROM ap_payment_schedules_all aps,ap_invoices_all ai
445: WHERE aps.invoice_id = ai.invoice_id
446: AND aps.external_bank_account_id = p_from_bank_account_id
447: -- Added the below two condition for the bug 10401158
448: AND aps.checkrun_id is NULL

Line 483: UPDATE ap_invoices_all ai

479: AND aps.payment_num = x.payment_num;
480:
481: --Bug10065192: Update the bank at invoice header level, so recalculation of
482: --payment schedules does not reinstate the inactive bank
483: UPDATE ap_invoices_all ai
484: SET ai.external_bank_account_id = l_to_bank_account_id,
485: ai.last_update_date = SYSDATE,
486: ai.last_updated_by = FND_GLOBAL.user_id,
487: ai.last_update_login = FND_GLOBAL.login_id

Line 492: FROM ap_invoices_all ai, ap_payment_schedules_all aps

488: WHERE ai.invoice_id = x.invoice_id;
489:
490: /* WHERE aps.invoice_id IN
491: (SELECT DISTINCT ai.invoice_id
492: FROM ap_invoices_all ai, ap_payment_schedules_all aps
493: WHERE aps.external_bank_account_id = p_from_bank_account_id
494: AND ai.invoice_id = aps.invoice_id
495: AND ai.payment_status_flag IN ('N','P')
496: AND ai.cancelled_date IS NULL

Line 513: FROM ap_payment_schedules_all aps,ap_invoices_all ai

509:
510: ELSE
511: -- Added For Loop/IBY Call for bug 9410719
512: FOR x in (SELECT aps.invoice_id, aps.payment_num, ai.payment_currency_code, ai.party_site_id, ai.org_id, ai.vendor_site_id
513: FROM ap_payment_schedules_all aps,ap_invoices_all ai
514: WHERE aps.invoice_id = ai.invoice_id
515: AND aps.external_bank_account_id = p_from_bank_account_id
516: -- Added the below two condition for the bug 10401158
517: AND aps.checkrun_id is NULL

Line 552: UPDATE ap_invoices_all ai

548: AND aps.payment_num = x.payment_num;
549:
550: --Bug10065192: Update the bank at invoice header level, so recalculation of
551: --payment schedules does not reinstate the inactive bank
552: UPDATE ap_invoices_all ai
553: SET ai.external_bank_account_id = l_to_bank_account_id,
554: ai.last_update_date = SYSDATE,
555: ai.last_updated_by = FND_GLOBAL.user_id,
556: ai.last_update_login = FND_GLOBAL.login_id

Line 561: FROM ap_invoices_all ai, ap_payment_schedules_all aps

557: WHERE ai.invoice_id = x.invoice_id;
558:
559: /* WHERE aps.invoice_id IN
560: (SELECT DISTINCT ai.invoice_id
561: FROM ap_invoices_all ai, ap_payment_schedules_all aps
562: WHERE aps.external_bank_account_id = p_from_bank_account_id
563: AND ai.invoice_id = aps.invoice_id
564: AND ai.payment_status_flag IN ('N','P')
565: AND ai.cancelled_date IS NULL