DBA Data[Home] [Help]

APPS.AP_ACCTG_PREPAY_DIST_PKG dependencies on AP_PREPAY_HISTORY_ALL

Line 52: UPDATE AP_Prepay_History_All APH

48: l_log_msg := 'Begin of procedure '|| l_procedure_name;
49: FND_LOG.STRING(G_LEVEL_PROCEDURE, G_MODULE_NAME||l_procedure_name||'.begin', l_log_msg);
50: END IF;
51:
52: UPDATE AP_Prepay_History_All APH
53: SET Gain_Loss_Indicator =
54: (SELECT DECODE(APH.Transaction_Type, 'PREPAYMENT APPLIED',
55: DECODE(SIGN(SUM(APAD.Base_Amount - APAD.Base_Amt_At_Prepay_XRate)),
56: -1, 'G', 1, 'L', NULL),

Line 219: INSERT INTO AP_PREPAY_HISTORY_ALL

215: l_transaction_type := 'PREPAYMENT UNAPPLIED';
216: END IF;
217:
218:
219: INSERT INTO AP_PREPAY_HISTORY_ALL
220: (PREPAY_HISTORY_ID
221: ,PREPAY_INVOICE_ID
222: ,PREPAY_LINE_NUM
223: ,ACCOUNTING_EVENT_ID

Line 678: FROM AP_Prepay_History_All APH

674: APH.Transaction_Type,
675: APH.Accounting_Date,
676: APH.Invoice_Adjustment_Event_ID,
677: APH.Related_Prepay_App_Event_ID
678: FROM AP_Prepay_History_All APH
679: WHERE APH.Invoice_ID = P_Invoice_ID
680: AND APH.Accounting_Event_ID = P_Event_ID;
681:
682: CURSOR Inv_Adj_Dists

Line 731: FROM AP_Prepay_History_All APH,

727: AID.Parent_Reversal_ID
728: FROM AP_Invoice_Distributions_All AID
729: WHERE Accounting_Event_ID = P_Event_ID
730: AND EXISTS (SELECT 'Prepay History'
731: FROM AP_Prepay_History_All APH,
732: AP_Invoice_Distributions_All AID1
733: WHERE APH.Prepay_History_ID = P_Prepay_History_ID
734: AND AID1.Invoice_Distribution_ID = AID.Prepay_Distribution_ID
735: AND AID1.Invoice_ID = APH.Prepay_Invoice_ID

Line 756: FROM AP_Prepay_History_All APH,

752: FROM AP_Invoice_Distributions_All AID1
753: WHERE Line_Type_Lookup_Code = 'PREPAY'
754: AND Accounting_Event_ID = P_Event_ID
755: AND EXISTS (SELECT 'Prepay History'
756: FROM AP_Prepay_History_All APH,
757: AP_Invoice_Distributions_All AID2
758: WHERE APH.Prepay_History_ID = P_Prepay_History_ID
759: AND AID2.Invoice_Distribution_ID = AID1.Prepay_Distribution_ID
760: AND AID2.Invoice_ID = APH.Prepay_Invoice_ID

Line 2333: -- from ap_prepay_history_all aph,ap_prepay_app_dists apad1

2329: -- rewrite the query to delete the correct prepay application dist record.
2330: --DELETE FROM AP_Prepay_App_Dists apad
2331: --WHERE prepay_history_id in (
2332: -- select aph.prepay_history_id
2333: -- from ap_prepay_history_all aph,ap_prepay_app_dists apad1
2334: -- where aph.prepay_history_id=apad1.prepay_history_id
2335: -- and aph.accounting_event_id is null
2336: -- and aph.bc_event_id is not null
2337: -- and aph.invoice_id=p_invoice_id

Line 2344: --- delete from AP_Prepay_history_all is placed after delete from AP_Prepay_App_Dists

2340: -- apad1.prepay_app_distribution_id
2341: -- and nvl(aid.encumbered_flag,'N')='Y'));
2342:
2343:
2344: --- delete from AP_Prepay_history_all is placed after delete from AP_Prepay_App_Dists
2345: --- due to bug 7264479
2346:
2347: DELETE FROM AP_Prepay_App_Dists apad
2348: WHERE prepay_history_id in (

Line 2350: from ap_prepay_history_all aph,ap_prepay_app_dists apad1

2346:
2347: DELETE FROM AP_Prepay_App_Dists apad
2348: WHERE prepay_history_id in (
2349: select aph.prepay_history_id
2350: from ap_prepay_history_all aph,ap_prepay_app_dists apad1
2351: where aph.prepay_history_id=apad1.prepay_history_id
2352: and aph.accounting_event_id is null
2353: and (aph.bc_event_id is null or
2354: (aph.bc_event_id is not null

Line 2369: --DELETE FROM AP_Prepay_history_all aph

2365:
2366:
2367: -- Bug fix 5634515
2368: -- rewrite the query to delete the correct prepay history record.
2369: --DELETE FROM AP_Prepay_history_all aph
2370: --WHERE Accounting_Event_ID is null
2371: -- AND bc_event_id is not null
2372: -- AND Invoice_id =p_invoice_id
2373: -- AND not exists(select 1 from AP_Prepay_App_Dists apad,

Line 2380: DELETE FROM AP_Prepay_history_all aph

2376: -- apad.invoice_distribution_id
2377: -- and aph.prepay_history_id=apad.prepay_history_id
2378: -- and nvl(encumbered_flag,'N')='Y');
2379:
2380: DELETE FROM AP_Prepay_history_all aph
2381: WHERE Accounting_Event_ID is null
2382: AND (bc_event_id is null or
2383: (bc_event_id is not null
2384: AND Invoice_id = p_invoice_id