DBA Data[Home] [Help]

APPS.AP_ACCOUNTING_EVENTS_PKG dependencies on AP_INVOICE_PAYMENTS

Line 1311: FROM ap_invoice_payments AIP

1307:
1308: BEGIN
1309: SELECT MAX(accounting_event_id)
1310: INTO l_pay_accounting_event_id
1311: FROM ap_invoice_payments AIP
1312: WHERE AIP.invoice_id = p_invoice_id
1313: AND AIP.posted_flag = 'Y';
1314: EXCEPTION
1315: WHEN NO_DATA_FOUND THEN

Line 2198: from ap_invoice_payments_all aip,

2194: if (l_count > 0) then
2195: BEGIN
2196: select ac.check_id
2197: into l_check_id
2198: from ap_invoice_payments_all aip,
2199: ap_checks_all ac
2200: where aip.check_id=ac.check_id
2201: and aip.accounting_event_id = l_accounting_event_ids(i)
2202: and aip.invoice_id=l_event_source_info.source_id_int_1;

Line 2305: FROM ap_invoice_payments AIP, ap_payment_history_all APH

2301: -- Payment Adjustment Events.
2302: CURSOR l_invoice_payments_cur IS --bug 7042296
2303: SELECT distinct(AIP.check_id),
2304: APH.accounting_event_id
2305: FROM ap_invoice_payments AIP, ap_payment_history_all APH
2306: WHERE AIP.invoice_id = p_invoice_id
2307: AND AIP.accounting_event_id IS NOT NULL
2308: and AIP.check_id = APH.check_id
2309: and APH.accounting_event_id is not null

Line 2607: FROM ap_invoice_payments AIP,

2603:
2604: CURSOR l_invoice_distributions_cur IS
2605: SELECT distinct(AID.invoice_id),
2606: AID.accounting_event_id
2607: FROM ap_invoice_payments AIP,
2608: ap_invoice_distributions AID
2609: WHERE AIP.invoice_id = AID.invoice_id
2610: AND AIP.check_id = p_check_id
2611: AND AID.accounting_event_id IS NOT NULL

Line 2801: from ap_invoice_payments_all aip,

2797: if (l_count > 0) then
2798: BEGIN
2799: select ac.check_id
2800: into l_check_id
2801: from ap_invoice_payments_all aip,
2802: ap_checks_all ac
2803: where aip.check_id=ac.check_id
2804: and aip.accounting_event_id = l_accounting_event_ids(i)
2805: and aip.invoice_id=l_event_source_info.source_id_int_1;

Line 2901: FROM ap_invoice_payments AIP

2897: DECLARE
2898:
2899: CURSOR l_invoice_payments_cur IS
2900: SELECT distinct(AIP.accounting_event_id)
2901: FROM ap_invoice_payments AIP
2902: WHERE AIP.check_id = p_check_id
2903: AND AIP.accounting_event_id IS NOT NULL;
2904:
2905: l_payment_event_status VARCHAR2(1);

Line 3712: FROM ap_invoice_payments AIP1

3708: SET D.accounting_event_id = p_event_id
3709: WHERE D.accounting_event_id IS NULL
3710: AND D.awt_invoice_payment_id IN
3711: (SELECT AIP1.invoice_payment_id
3712: FROM ap_invoice_payments AIP1
3713: WHERE AIP1.accounting_event_id = p_event_id
3714: AND AIP1.check_id = p_check_id);
3715:
3716: --Stamp the event_id on all invoice dists that belong to interest

Line 3732: FROM ap_invoice_payments_all AIP2,

3728: SET D.accounting_event_id = p_event_id
3729: WHERE D.accounting_event_id IS NULL
3730: AND D.invoice_id IN
3731: (SELECT AI.invoice_id
3732: FROM ap_invoice_payments_all AIP2,
3733: ap_invoices_all AI
3734: WHERE AI.invoice_id = AIP2.invoice_id
3735: AND AIP2.check_id = p_check_id
3736: AND AIP2.accounting_event_id = p_event_id

Line 3796: ap_invoice_payments AIP -- Bug3343314

3792: CURSOR get_payment_info IS
3793: SELECT AC.check_id,
3794: AIP.accounting_event_id -- Bug3343314
3795: FROM ap_checks AC,
3796: ap_invoice_payments AIP -- Bug3343314
3797: WHERE AC.check_id = AIP.check_id -- Bug3343314
3798: AND AC.checkrun_name = p_checkrun_name
3799: AND AC.status_lookup_code NOT IN ('OVERFLOW', 'SET UP')
3800: AND AC.completed_pmts_group_id = p_completed_pmts_group_id

Line 3861: FROM ap_invoice_payments AIP

3857: SET AID.accounting_event_id = l_accounting_event_ids(i)
3858: WHERE AID.accounting_event_id IS NULL
3859: AND AID.awt_invoice_payment_id IN
3860: (SELECT AIP.invoice_payment_id
3861: FROM ap_invoice_payments AIP
3862: WHERE AIP.check_id = l_check_ids(i) AND
3863: AIP.accounting_event_id = l_accounting_event_ids(i));
3864:
3865: /*

Line 3880: FROM ap_invoice_payments_all AIP,

3876: SET AID.accounting_event_id = l_accounting_event_ids(i)
3877: WHERE AID.accounting_event_id IS NULL
3878: AND AID.invoice_id IN
3879: ( SELECT AI.invoice_id
3880: FROM ap_invoice_payments_all AIP,
3881: ap_invoices_all AI
3882: WHERE AIP.invoice_id = AI.invoice_id
3883: AND AIP.accounting_event_id = l_accounting_event_ids(i)
3884: AND AIP.check_id = l_check_ids(i)

Line 4031: FROM ap_invoice_payments

4027: SELECT count(*)
4028: INTO l_count
4029: FROM ap_invoice_distributions AID1
4030: WHERE AID1.invoice_id in (SELECT invoice_id
4031: FROM ap_invoice_payments
4032: WHERE check_id = p_source_id)
4033: AND nvl(AID1.match_status_flag,'N') NOT IN ('T','A');
4034: EXCEPTION
4035: WHEN NO_DATA_FOUND THEN

Line 4045: FROM ap_invoice_payments

4041: SELECT count(*)
4042: INTO l_count
4043: FROM ap_invoice_distributions AID
4044: WHERE AID.invoice_id in (SELECT invoice_id
4045: FROM ap_invoice_payments
4046: WHERE check_id = p_source_id)
4047: AND nvl(AID.match_status_flag,'N') <> 'A' ;
4048: EXCEPTION
4049: WHEN NO_DATA_FOUND THEN

Line 4081: FROM ap_invoice_payments

4077: SELECT count(*)
4078: INTO l_count
4079: FROM ap_holds H, ap_hold_codes C
4080: WHERE H.invoice_id in (SELECT invoice_id
4081: FROM ap_invoice_payments
4082: WHERE check_id = p_source_id)
4083: AND H.hold_lookup_code = C.hold_lookup_code
4084: AND ((H.release_lookup_code IS NULL)
4085: AND (C.postable_flag ='N'

Line 4170: FROM ap_invoice_payments AIP,

4166: l_last_updated_by NUMBER(15);
4167:
4168: CURSOR l_event_cur IS
4169: SELECT distinct(AIP.accounting_event_id)
4170: FROM ap_invoice_payments AIP,
4171: ap_checks AC
4172: WHERE AIP.check_id = p_check_id
4173: AND AIP.check_id = AC.check_id
4174: AND nvl(AIP.posted_flag, 'N') = 'N'

Line 4469: FROM ap_invoice_payments AIP

4465: /* BUG # 7560346 added DISTINCT keyword */
4466: CURSOR l_payments_cur IS
4467: SELECT DISTINCT AIP.check_id,
4468: AIP.accounting_date
4469: FROM ap_invoice_payments AIP
4470: WHERE AIP.invoice_id = p_invoice_id
4471: AND AIP.posted_flag = 'Y'
4472: AND NVL(AIP.reversal_flag, 'N') <> 'Y'
4473: AND AIP.reversal_inv_pmt_id IS NULL

Line 4486: ap_invoice_payments AIP

4482: CURSOR l_payment_clearings_cur IS
4483: SELECT DISTINCT APH.check_id,
4484: APH.accounting_date
4485: FROM ap_payment_history APH,
4486: ap_invoice_payments AIP
4487: WHERE AIP.invoice_id = p_invoice_id
4488: AND AIP.check_id = APH.check_id
4489: AND APH.transaction_type = 'PAYMENT CLEARING'
4490: AND AIP.posted_flag = 'Y'

Line 4507: ap_invoice_payments AIP

4503: CURSOR l_payment_maturities_cur IS
4504: SELECT DISTINCT APH.check_id,
4505: APH.accounting_date
4506: FROM ap_payment_history APH,
4507: ap_invoice_payments AIP
4508: WHERE AIP.invoice_id = p_invoice_id
4509: AND AIP.check_id = APH.check_id
4510: AND APH.transaction_type = 'PAYMENT MATURITY'
4511: AND AIP.posted_flag = 'Y'

Line 5390: FROM ap_invoice_payments

5386:
5387: -- Bug 4748638
5388: CURSOR aip_event_id_count IS
5389: SELECT accounting_event_id
5390: FROM ap_invoice_payments
5391: WHERE check_id = p_check_id
5392: GROUP BY accounting_event_id;
5393:
5394: TYPE event_id_tab_Type IS TABLE OF

Line 5395: ap_invoice_payments.accounting_event_id%TYPE;

5391: WHERE check_id = p_check_id
5392: GROUP BY accounting_event_id;
5393:
5394: TYPE event_id_tab_Type IS TABLE OF
5395: ap_invoice_payments.accounting_event_id%TYPE;
5396: l_event_id_list event_id_tab_Type;
5397:
5398: l_legal_entity_id NUMBER(15);
5399: l_ledger_id NUMBER(15);

Line 5502: FROM ap_invoice_payments

5498: END IF;
5499:
5500: SELECT COUNT(*)
5501: INTO l_processed_events
5502: FROM ap_invoice_payments
5503: WHERE posted_flag = 'Y'
5504: AND check_id = p_check_id;
5505:
5506: IF (l_processed_events = 0) THEN

Line 5788: FROM ap_invoice_payments_all AIP

5784: APH.check_id check_id,
5785: APH.org_id,
5786: AC.legal_entity_id,
5787: ( SELECT AIP.set_of_books_id
5788: FROM ap_invoice_payments_all AIP
5789: WHERE AIP.check_id = APH.check_id
5790: AND ROWNUM = 1
5791: ) ledger_id
5792: FROM

Line 5827: FROM ap_invoice_payments_all AIP

5823: APH.check_id check_id,
5824: APH.org_id,
5825: AC.legal_entity_id,
5826: ( SELECT AIP.set_of_books_id
5827: FROM ap_invoice_payments_all AIP
5828: WHERE AIP.check_id = APH.check_id
5829: AND ROWNUM = 1
5830: ) ledger_id
5831: FROM

Line 6238: FROM ap_invoice_payments_all AIP

6234: APH.check_id,
6235: APH.org_id,
6236: AC.legal_entity_id,
6237: ( SELECT AIP.set_of_books_id
6238: FROM ap_invoice_payments_all AIP
6239: WHERE AIP.check_id = APH.check_id
6240: AND ROWNUM = 1
6241: ) ledger_id
6242: FROM ap_payment_history_all APH,

Line 6257: FROM ap_invoice_payments_all AIP

6253: APH.check_id,
6254: APH.org_id,
6255: AC.legal_entity_id,
6256: ( SELECT AIP.set_of_books_id
6257: FROM ap_invoice_payments_all AIP
6258: WHERE AIP.check_id = APH.check_id
6259: AND ROWNUM = 1
6260: ) ledger_id
6261: FROM ap_payment_history_all APH,