DBA Data[Home] [Help]

APPS.AP_INTEREST_INVOICE_PKG dependencies on AP_INVOICE_RELATIONSHIPS

Line 160: * Step 3. Create ap_invoice_relationships line

156: /*========================================================================
157: * Main Procedure: Create Interest Invoice and pay it
158: * Step 1. Call ap_int_inv_get_info to get some required fields
159: * Step 2. Create interest ap_invoices line
160: * Step 3. Create ap_invoice_relationships line
161: * Step 4. Create ap_invoice_lines line
162: * Step 5. Create ap_invoice_distributions line
163: * Step 6. Create ap_payment_schedules line
164: * Step 7. Create ap_invoice_payemnts line (Call ap_pay_invoice_pkg.ap_pay_

Line 381: -- Call ap_int_inv_insert_ap_inv_rel : Insert AP_INVOICE_RELATIONSHIPS

377: c_party_site_id, -- 4959918
378: P_invoice_id); --8249618
379: ---------------------------------------------------------------------------
380: -- Step 3: Case for Pay : for Pay interest invoice only
381: -- Call ap_int_inv_insert_ap_inv_rel : Insert AP_INVOICE_RELATIONSHIPS
382: ---------------------------------------------------------------------------
383:
384: AP_INTEREST_INVOICE_PKG.ap_int_inv_insert_ap_inv_rel(
385: P_invoice_id,

Line 977: Insert AP_INVOICE_RELATIONSHIPS

973: END ap_int_inv_insert_ap_invoices;
974:
975:
976: /*==========================================================================
977: Insert AP_INVOICE_RELATIONSHIPS
978: *=====================================================================*/
979:
980: PROCEDURE ap_int_inv_insert_ap_inv_rel(
981: P_invoice_id IN NUMBER,

Line 1003: INSERT INTO AP_INVOICE_RELATIONSHIPS(

999: IF (P_payment_mode = 'PAY') THEN
1000:
1001: debug_info := 'Insert into ap_invoice_relations';
1002:
1003: INSERT INTO AP_INVOICE_RELATIONSHIPS(
1004: ORIGINAL_INVOICE_ID,
1005: RELATED_INVOICE_ID,
1006: CREATED_BY,
1007: CREATION_DATE,

Line 1851: ap_invoice_relationships AIR,

1847: AID.org_id Org_Id
1848: FROM ap_invoice_distributions AID,
1849: gl_code_combinations GL,
1850: ap_invoice_payments AIP,
1851: ap_invoice_relationships AIR,
1852: ap_lookup_codes ALC
1853: WHERE AIR.related_invoice_id = AID.invoice_id
1854: AND GL.code_combination_id = AID.dist_code_combination_id
1855: AND AID.invoice_id = AIP.invoice_id

Line 1910: FROM ap_invoice_relationships AIR,

1906: APS.last_update_date = sysdate,
1907: APS.amount_remaining = 0
1908: WHERE APS.invoice_id IN
1909: (SELECT AIR.related_invoice_id
1910: FROM ap_invoice_relationships AIR,
1911: ap_invoice_payments_all AIP
1912: WHERE AIP.invoice_payment_id = P_Invoice_Payment_Id
1913: AND AIR.related_invoice_id = AIP.invoice_id)
1914: RETURNING APS.invoice_id

Line 1941: FROM ap_invoice_relationships AIR,

1937: AI.amount_paid = 0,
1938: AI.invoice_distribution_total = 0
1939: WHERE AI.invoice_id IN
1940: (SELECT /*+ UNNEST */ AIR.related_invoice_id
1941: FROM ap_invoice_relationships AIR,
1942: ap_invoice_payments_all AIP
1943: WHERE AIP.invoice_payment_id = P_Invoice_Payment_Id
1944: AND AIR.related_invoice_id = AIP.invoice_id)
1945: RETURNING invoice_id

Line 1967: FROM ap_invoice_relationships AIR,

1963: AIL.amount = 0,
1964: AIL.base_amount = 0
1965: WHERE AIL.invoice_id IN
1966: (SELECT /*+ UNNEST */ AIR.related_invoice_id
1967: FROM ap_invoice_relationships AIR,
1968: ap_invoice_payments_all AIP
1969: WHERE AIP.invoice_payment_id = P_Invoice_Payment_Id
1970: AND AIR.related_invoice_id = AIP.invoice_id);
1971:

Line 1984: ap_invoice_relationships air,

1980: INTO l_max_dist_line_num
1981: FROM ap_invoice_distributions aid,
1982: gl_code_combinations gl,
1983: ap_invoice_payments aip,
1984: ap_invoice_relationships air,
1985: ap_lookup_codes alc
1986: WHERE AIR.related_invoice_id = AID.invoice_id
1987: AND GL.code_combination_id = AID.dist_code_combination_id
1988: AND AID.invoice_id = AIP.invoice_id

Line 2218: FROM ap_invoice_relationships

2214: debug_info := 'Get the interest invoice NUM EXT';
2215:
2216: SELECT count(*)
2217: INTO C_int_inv_num_ext
2218: FROM ap_invoice_relationships
2219: WHERE original_invoice_id = P_invoice_id;
2220:
2221: -----------------------------------------------------------
2222: -- Get the int_inv_num_ext2 - Use for interest_invoice_name

Line 2489: 'Count from ap_invoice_relationships for P_reference_invoice_id';

2485: WHEN NO_DATA_FOUND then null;
2486: END;
2487:
2488: debug_info :=
2489: 'Count from ap_invoice_relationships for P_reference_invoice_id';
2490:
2491: BEGIN
2492: SELECT count(*)
2493: INTO C_int_num2

Line 2494: FROM ap_invoice_relationships

2490:
2491: BEGIN
2492: SELECT count(*)
2493: INTO C_int_num2
2494: FROM ap_invoice_relationships
2495: WHERE original_invoice_id = P_reference_invoice_id;
2496:
2497: EXCEPTION
2498: WHEN No_Data_Found THEN NULL;