DBA Data[Home] [Help]

APPS.AP_VOID_PKG dependencies on AP_INVOICE_PAYMENTS

Line 57: ap_invoice_payments_s.nextval new_invoice_payment_id,

53: -- the gain/loss account used for the original payment.
54:
55: CURSOR c_new_payments IS
56: SELECT AIP.invoice_payment_id invoice_payment_id,
57: ap_invoice_payments_s.nextval new_invoice_payment_id,
58: AIP.invoice_id invoice_id,
59: AIP.payment_num payment_num,
60: AIP.check_id check_id,
61: 0-NVL(AIP.amount,0) amount,

Line 123: FROM ap_invoice_payments AIP,

119: AIP.global_attribute19,
120: AIP.global_attribute20,
121: AIP.global_attribute_category,
122: AIP.org_id /* Bug 4759178, added org_id */
123: FROM ap_invoice_payments AIP,
124: ap_invoices AI
125: WHERE AIP.check_id = P_Check_Id
126: AND AIP.invoice_id = AI.invoice_id
127: AND nvl(AIP.reversal_flag, 'N') <> 'Y';

Line 135: FROM ap_invoice_payments

131: -------------------------------------------------------------------
132:
133: CURSOR c_invoices IS
134: SELECT invoice_id
135: FROM ap_invoice_payments
136: WHERE check_id = P_Check_Id
137: AND nvl(reversal_flag, 'N') <> 'Y'
138: GROUP BY invoice_id;
139:

Line 147: FROM ap_invoice_payments

143:
144: CURSOR c_payment_schedules IS
145: SELECT invoice_id,
146: payment_num
147: FROM ap_invoice_payments
148: WHERE check_id = P_Check_Id
149: AND nvl(reversal_flag, 'N') <> 'Y'
150: GROUP BY invoice_id, payment_num;
151:

Line 173: ap_invoice_payments aip,

169: aid.type_1099 type_1099,
170: aid.income_tax_region income_tax_region
171: FROM ap_invoice_distributions aid,
172: gl_code_combinations gl,
173: ap_invoice_payments aip,
174: ap_invoice_relationships air,
175: ap_lookup_codes alc
176: WHERE air.related_invoice_id = aid.invoice_id
177: AND gl.code_combination_id = aid.dist_code_combination_id

Line 191: FROM ap_invoice_payments AIP

187: /* bug 5169128 */
188: Cursor C_Hold_Cur IS
189: SELECT DISTINCT AIP.invoice_id
190: , AIP.org_id /* Bug 3700128. MOAC PRoject */
191: FROM ap_invoice_payments AIP
192: WHERE AIP.check_id = P_check_id
193: AND nvl(AIP.reversal_flag, 'N') <> 'Y'
194: AND NOT EXISTS
195: (SELECT 'Invoice already has this hold'

Line 273: FROM ap_invoice_payments

269: l_debug_info := 'Get set of books id';
270:
271: SELECT set_of_books_id
272: INTO l_set_of_books_id
273: FROM ap_invoice_payments
274: WHERE check_id = P_check_id
275: AND ROWNUM < 2;
276:
277: l_debug_info := 'Get Payment Type information';

Line 383: ap_invoice_payments_all aip

379: aps.last_update_date = SYSDATE,
380: aps.amount_remaining = 0
381: WHERE aps.invoice_id IN (SELECT related_invoice_id
382: FROM ap_invoice_relationships air,
383: ap_invoice_payments_all aip
384: WHERE aip.check_id = P_Check_Id
385: AND air.related_invoice_id = aip.invoice_id
386: AND nvl(aip.reversal_flag, 'N') <> 'Y')
387: RETURNING aps.invoice_id

Line 413: ap_invoice_payments_all AIP

409: AI.pay_curr_invoice_amount = 0 --bug5631957
410: WHERE AI.invoice_id IN
411: (SELECT AIR.related_invoice_id
412: FROM ap_invoice_relationships AIR,
413: ap_invoice_payments_all AIP
414: WHERE AIP.invoice_id = AIR.related_invoice_id
415: AND AIP.check_id = P_Check_Id
416: AND NVL(aip.reversal_flag, 'N') <> 'Y')
417: RETURNING invoice_id

Line 440: ap_invoice_payments_all AIP

436: AIL.base_amount = 0
437: WHERE AIL.invoice_id IN
438: (SELECT AIR.related_invoice_id
439: FROM ap_invoice_relationships AIR,
440: ap_invoice_payments_all AIP
441: WHERE AIP.invoice_id = AIR.related_invoice_id
442: AND AIP.check_id = P_Check_Id
443: AND NVL(aip.reversal_flag, 'N') <> 'Y');
444:

Line 451: ap_invoice_payments aip,

447: SELECT MAX(aid.distribution_line_number)
448: INTO l_max_dist_line_num
449: FROM ap_invoice_distributions aid,
450: gl_code_combinations gl,
451: ap_invoice_payments aip,
452: ap_invoice_relationships air,
453: ap_lookup_codes alc
454: WHERE air.related_invoice_id = aid.invoice_id
455: AND gl.code_combination_id = aid.dist_code_combination_id

Line 657: -- on the rows in AP_INVOICE_PAYMENTS pertaining to the Payment void.

653: -- Events Project - 4 -----------------------------------------------
654: -- For the case where we reissue an unaccounted check that has a
655: -- Payment Event, we do not want to create a Payment Cancellation Event.
656: -- Instead, we will stamp the accounting_event_id of the Payment Event
657: -- on the rows in AP_INVOICE_PAYMENTS pertaining to the Payment void.
658: -- This will happen after the new rows are inserted into
659: -- AP_INVOICE_PAYMENTS below.
660: -- -----------------------------------------------------------
661:

Line 659: -- AP_INVOICE_PAYMENTS below.

655: -- Payment Event, we do not want to create a Payment Cancellation Event.
656: -- Instead, we will stamp the accounting_event_id of the Payment Event
657: -- on the rows in AP_INVOICE_PAYMENTS pertaining to the Payment void.
658: -- This will happen after the new rows are inserted into
659: -- AP_INVOICE_PAYMENTS below.
660: -- -----------------------------------------------------------
661:
662: BEGIN
663:

Line 666: FROM AP_INVOICE_PAYMENTS AIP

662: BEGIN
663:
664: SELECT max(accounting_event_id)
665: INTO l_old_accounting_event_id
666: FROM AP_INVOICE_PAYMENTS AIP
667: WHERE check_id = P_check_id
668: AND posted_flag = 'N';
669:
670: EXCEPTION when no_data_found then

Line 778: FROM ap_invoice_payments AIP

774:
775: --Bug 4539462 collecting invoice_ids first
776: SELECT DISTINCT AIP.invoice_id
777: BULK COLLECT INTO l_dbi_key_value_list3
778: FROM ap_invoice_payments AIP
779: WHERE AIP.check_id = P_check_id
780: AND nvl(AIP.reversal_flag, 'N') <> 'Y'
781: AND NOT EXISTS
782: (SELECT 'Invoice already has this hold'

Line 1028: UPDATE ap_invoice_payments

1024: -- flag value.
1025: -- If the old was: U, N, or Y then set the new to U.
1026: -- Otherwise keep it as NULL.
1027: if rec_new_payments.assets_addition_flag is not null then
1028: UPDATE ap_invoice_payments
1029: SET assets_addition_flag = 'U'
1030: WHERE invoice_payment_id =
1031: rec_new_payments.new_invoice_payment_id;
1032: end if;