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 208: FROM ap_invoice_payments_all aip,

204:
205: -- bug9441420
206: CURSOR Prepay_Appl IS
207: SELECT DISTINCT aid.invoice_id
208: FROM ap_invoice_payments_all aip,
209: ap_invoice_distributions_all aid_prepay,
210: ap_invoices_all ai_prepay,
211: ap_invoice_distributions_all aid
212: WHERE aip.check_id = P_Check_ID

Line 298: FROM ap_invoice_payments

294:
295:
296: SELECT set_of_books_id,org_id
297: INTO l_set_of_books_id,l_ou_id
298: FROM ap_invoice_payments
299: WHERE check_id = P_check_id
300: AND ROWNUM < 2;
301:
302: l_debug_info := 'Get patch set level';

Line 525: ap_invoice_payments_all aip

521: aps.last_update_date = SYSDATE,
522: aps.amount_remaining = 0
523: WHERE aps.invoice_id IN (SELECT related_invoice_id
524: FROM ap_invoice_relationships air,
525: ap_invoice_payments_all aip
526: WHERE aip.check_id = P_Check_Id
527: AND air.related_invoice_id = aip.invoice_id
528: AND nvl(aip.reversal_flag, 'N') <> 'Y')
529: RETURNING aps.invoice_id

Line 558: ap_invoice_payments_all AIP

554: AI.pay_curr_invoice_amount = 0 --bug5631957
555: WHERE AI.invoice_id IN
556: (SELECT AIR.related_invoice_id
557: FROM ap_invoice_relationships AIR,
558: ap_invoice_payments_all AIP
559: WHERE AIP.invoice_id = AIR.related_invoice_id
560: AND AIP.check_id = P_Check_Id
561: AND NVL(aip.reversal_flag, 'N') <> 'Y')
562: RETURNING invoice_id

Line 588: ap_invoice_payments_all AIP

584: AIL.base_amount = 0
585: WHERE AIL.invoice_id IN
586: (SELECT AIR.related_invoice_id
587: FROM ap_invoice_relationships AIR,
588: ap_invoice_payments_all AIP
589: WHERE AIP.invoice_id = AIR.related_invoice_id
590: AND AIP.check_id = P_Check_Id
591: AND NVL(aip.reversal_flag, 'N') <> 'Y');
592:

Line 602: ap_invoice_payments aip,

598: SELECT MAX(aid.distribution_line_number)
599: INTO l_max_dist_line_num
600: FROM ap_invoice_distributions aid,
601: gl_code_combinations gl,
602: ap_invoice_payments aip,
603: ap_invoice_relationships air,
604: ap_lookup_codes alc
605: WHERE air.related_invoice_id = aid.invoice_id
606: AND gl.code_combination_id = aid.dist_code_combination_id

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

807: -- Events Project - 4 -----------------------------------------------
808: -- For the case where we reissue an unaccounted check that has a
809: -- Payment Event, we do not want to create a Payment Cancellation Event.
810: -- Instead, we will stamp the accounting_event_id of the Payment Event
811: -- on the rows in AP_INVOICE_PAYMENTS pertaining to the Payment void.
812: -- This will happen after the new rows are inserted into
813: -- AP_INVOICE_PAYMENTS below.
814: -- -----------------------------------------------------------
815:

Line 813: -- AP_INVOICE_PAYMENTS below.

809: -- Payment Event, we do not want to create a Payment Cancellation Event.
810: -- Instead, we will stamp the accounting_event_id of the Payment Event
811: -- on the rows in AP_INVOICE_PAYMENTS pertaining to the Payment void.
812: -- This will happen after the new rows are inserted into
813: -- AP_INVOICE_PAYMENTS below.
814: -- -----------------------------------------------------------
815:
816: BEGIN
817:

Line 820: FROM AP_INVOICE_PAYMENTS AIP

816: BEGIN
817:
818: SELECT max(accounting_event_id)
819: INTO l_old_accounting_event_id
820: FROM AP_INVOICE_PAYMENTS AIP
821: WHERE check_id = P_check_id
822: AND posted_flag = 'N';
823:
824: EXCEPTION when no_data_found then

Line 932: FROM ap_invoice_payments AIP

928:
929: --Bug 4539462 collecting invoice_ids first
930: SELECT DISTINCT AIP.invoice_id
931: BULK COLLECT INTO l_dbi_key_value_list3
932: FROM ap_invoice_payments AIP
933: WHERE AIP.check_id = P_check_id
934: AND nvl(AIP.reversal_flag, 'N') <> 'Y'
935: AND NOT EXISTS
936: (SELECT 'Invoice already has this hold'

Line 1188: UPDATE ap_invoice_payments

1184: -- flag value.
1185: -- If the old was: U, N, or Y then set the new to U.
1186: -- Otherwise keep it as NULL.
1187: if rec_new_payments.assets_addition_flag is not null then
1188: UPDATE ap_invoice_payments
1189: SET assets_addition_flag = 'U'
1190: WHERE invoice_payment_id =
1191: rec_new_payments.new_invoice_payment_id;
1192: end if;