2: /* $Header: appredis.pls 120.25 2010/10/14 04:22:45 rseeta ship $ */
3:
4:
5: TYPE r_prepay_hist_info IS RECORD
6: (Prepay_History_ID AP_Prepay_History.Prepay_History_ID%TYPE
7: ,Prepay_Invoice_ID AP_Prepay_History.Prepay_Invoice_ID%TYPE
8: ,Invoice_ID AP_Prepay_History.Invoice_ID%TYPE
9: ,Invoice_Line_Number AP_Prepay_History.Invoice_Line_Number%TYPE
10: ,Transaction_Type AP_Prepay_History.Transaction_Type%TYPE
3:
4:
5: TYPE r_prepay_hist_info IS RECORD
6: (Prepay_History_ID AP_Prepay_History.Prepay_History_ID%TYPE
7: ,Prepay_Invoice_ID AP_Prepay_History.Prepay_Invoice_ID%TYPE
8: ,Invoice_ID AP_Prepay_History.Invoice_ID%TYPE
9: ,Invoice_Line_Number AP_Prepay_History.Invoice_Line_Number%TYPE
10: ,Transaction_Type AP_Prepay_History.Transaction_Type%TYPE
11: ,Accounting_Date AP_Prepay_History.Accounting_Date%TYPE
4:
5: TYPE r_prepay_hist_info IS RECORD
6: (Prepay_History_ID AP_Prepay_History.Prepay_History_ID%TYPE
7: ,Prepay_Invoice_ID AP_Prepay_History.Prepay_Invoice_ID%TYPE
8: ,Invoice_ID AP_Prepay_History.Invoice_ID%TYPE
9: ,Invoice_Line_Number AP_Prepay_History.Invoice_Line_Number%TYPE
10: ,Transaction_Type AP_Prepay_History.Transaction_Type%TYPE
11: ,Accounting_Date AP_Prepay_History.Accounting_Date%TYPE
12: ,Invoice_Adjustment_Event_ID AP_Prepay_History.Invoice_Adjustment_Event_ID%TYPE
5: TYPE r_prepay_hist_info IS RECORD
6: (Prepay_History_ID AP_Prepay_History.Prepay_History_ID%TYPE
7: ,Prepay_Invoice_ID AP_Prepay_History.Prepay_Invoice_ID%TYPE
8: ,Invoice_ID AP_Prepay_History.Invoice_ID%TYPE
9: ,Invoice_Line_Number AP_Prepay_History.Invoice_Line_Number%TYPE
10: ,Transaction_Type AP_Prepay_History.Transaction_Type%TYPE
11: ,Accounting_Date AP_Prepay_History.Accounting_Date%TYPE
12: ,Invoice_Adjustment_Event_ID AP_Prepay_History.Invoice_Adjustment_Event_ID%TYPE
13: ,Related_Prepay_App_Event_ID AP_Prepay_History.Related_Prepay_App_Event_ID%TYPE
6: (Prepay_History_ID AP_Prepay_History.Prepay_History_ID%TYPE
7: ,Prepay_Invoice_ID AP_Prepay_History.Prepay_Invoice_ID%TYPE
8: ,Invoice_ID AP_Prepay_History.Invoice_ID%TYPE
9: ,Invoice_Line_Number AP_Prepay_History.Invoice_Line_Number%TYPE
10: ,Transaction_Type AP_Prepay_History.Transaction_Type%TYPE
11: ,Accounting_Date AP_Prepay_History.Accounting_Date%TYPE
12: ,Invoice_Adjustment_Event_ID AP_Prepay_History.Invoice_Adjustment_Event_ID%TYPE
13: ,Related_Prepay_App_Event_ID AP_Prepay_History.Related_Prepay_App_Event_ID%TYPE
14: );
7: ,Prepay_Invoice_ID AP_Prepay_History.Prepay_Invoice_ID%TYPE
8: ,Invoice_ID AP_Prepay_History.Invoice_ID%TYPE
9: ,Invoice_Line_Number AP_Prepay_History.Invoice_Line_Number%TYPE
10: ,Transaction_Type AP_Prepay_History.Transaction_Type%TYPE
11: ,Accounting_Date AP_Prepay_History.Accounting_Date%TYPE
12: ,Invoice_Adjustment_Event_ID AP_Prepay_History.Invoice_Adjustment_Event_ID%TYPE
13: ,Related_Prepay_App_Event_ID AP_Prepay_History.Related_Prepay_App_Event_ID%TYPE
14: );
15:
8: ,Invoice_ID AP_Prepay_History.Invoice_ID%TYPE
9: ,Invoice_Line_Number AP_Prepay_History.Invoice_Line_Number%TYPE
10: ,Transaction_Type AP_Prepay_History.Transaction_Type%TYPE
11: ,Accounting_Date AP_Prepay_History.Accounting_Date%TYPE
12: ,Invoice_Adjustment_Event_ID AP_Prepay_History.Invoice_Adjustment_Event_ID%TYPE
13: ,Related_Prepay_App_Event_ID AP_Prepay_History.Related_Prepay_App_Event_ID%TYPE
14: );
15:
16:
9: ,Invoice_Line_Number AP_Prepay_History.Invoice_Line_Number%TYPE
10: ,Transaction_Type AP_Prepay_History.Transaction_Type%TYPE
11: ,Accounting_Date AP_Prepay_History.Accounting_Date%TYPE
12: ,Invoice_Adjustment_Event_ID AP_Prepay_History.Invoice_Adjustment_Event_ID%TYPE
13: ,Related_Prepay_App_Event_ID AP_Prepay_History.Related_Prepay_App_Event_ID%TYPE
14: );
15:
16:
17: TYPE r_prepay_dist_info IS RECORD
47: APH.Transaction_Type,
48: APH.Accounting_Date,
49: APH.Invoice_Adjustment_Event_ID,
50: APH.Related_Prepay_App_Event_ID
51: FROM AP_Prepay_History_All APH,
52: XLA_Events XE
53: WHERE APH.Invoice_ID = P_Invoice_ID
54: --AND APH.Accounting_Event_ID IS NULL
55: AND nvl(APH.Posted_flag, 'N') <> 'Y'
89: --AND Accounting_Event_ID IS NULL
90: AND nvl(AID.Posted_flag, 'N') <> 'Y'
91: AND nvl(AID.Encumbered_flag, 'N') <> 'Y'
92: AND EXISTS (SELECT 'Prepay History'
93: FROM AP_Prepay_History_All APH,
94: AP_Invoice_Distributions_All AID1
95: WHERE APH.Prepay_History_ID = P_Prepay_History_ID
96: AND AID1.Invoice_Distribution_ID = AID.Prepay_Distribution_ID
97: AND AID1.Invoice_ID = APH.Prepay_Invoice_ID
123: AND Line_Type_Lookup_Code = 'PREPAY'
124: AND Accounting_Date = P_Accounting_Date
125: --AND Accounting_Event_ID IS NULL Bug 10184420
126: AND EXISTS (SELECT 'Prepay History'
127: FROM AP_Prepay_History_All APH,
128: AP_Invoice_Distributions_All AID2
129: WHERE APH.Prepay_History_ID = P_Prepay_History_ID
130: AND AID2.Invoice_Distribution_ID = AID1.Prepay_Distribution_ID
131: AND AID2.Invoice_ID = APH.Prepay_Invoice_ID