DBA Data[Home] [Help]

APPS.AP_ACCTG_PREPAY_DIST_PKG dependencies on AP_INVOICE_DISTRIBUTIONS_ALL

Line 123: AP_Invoice_Distributions_All AID

119: AID.Accounting_Date,
120: -- 6718967
121: DECODE(NVL(AID.Parent_Reversal_ID,-99), -99, 1, 2) Group_Number
122: FROM AP_Invoice_Lines_ALL AIL,
123: AP_Invoice_Distributions_All AID
124: WHERE AIL.Invoice_ID = p_invoice_id
125: AND AIL.Line_Type_Lookup_Code = 'PREPAY'
126: AND AIL.Invoice_ID = AID.Invoice_ID
127: AND AIL.Line_Number = AID.Invoice_Line_Number

Line 319: FROM ap_invoice_distributions_all aid,

315: l_dist_count_per_event NUMBER;
316:
317: CURSOR c_sum_per_event(p_acct_event_id NUMBER) IS
318: SELECT SUM(amount), count(1)
319: FROM ap_invoice_distributions_all aid,
320: xla_events evnt,
321: xla_ae_headers xah,
322: ap_system_parameters_all asp
323: WHERE aid.accounting_event_id = p_acct_event_id

Line 701: FROM AP_Invoice_Distributions_All AID,

697: AID.Amount_Variance,
698: AID.Base_Amount_Variance,
699: AID.Historical_Flag, -- bug fix 6674279
700: AID.Accounting_Event_Id -- bug fix 6674279
701: FROM AP_Invoice_Distributions_All AID,
702: AP_Prepay_App_Dists APAD,
703: Financials_System_Params_All FSP
704: WHERE AID.Invoice_ID = P_Invoice_ID
705: AND NVL(AID.Reversal_Flag,'N') <> 'Y'

Line 728: FROM AP_Invoice_Distributions_All AID

724: AID.Accounting_Event_ID,
725: AID.Prepay_Distribution_ID,
726: AID.Prepay_Tax_Diff_Amount,
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

Line 732: AP_Invoice_Distributions_All AID1

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
736: AND AID1.Invoice_Line_Number = APH.Prepay_Line_Num)

Line 747: FROM AP_Invoice_Distributions_All AID

743: AID.Accounting_Event_ID,
744: AID.Prepay_Distribution_ID,
745: AID.Prepay_Tax_Diff_Amount,
746: AID.Parent_Reversal_ID
747: FROM AP_Invoice_Distributions_All AID
748: WHERE Line_Type_Lookup_Code IN ( 'NONREC_TAX','REC_TAX')
749: AND Accounting_Event_ID = P_Event_ID
750: AND Charge_Applicable_To_Dist_ID IN
751: (SELECT AID1.Invoice_Distribution_ID

Line 752: FROM AP_Invoice_Distributions_All AID1

748: WHERE Line_Type_Lookup_Code IN ( 'NONREC_TAX','REC_TAX')
749: AND Accounting_Event_ID = P_Event_ID
750: AND Charge_Applicable_To_Dist_ID IN
751: (SELECT AID1.Invoice_Distribution_ID
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,

Line 757: AP_Invoice_Distributions_All AID2

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
761: AND AID2.Invoice_Line_Number = APH.Prepay_Line_Num)));

Line 954: FROM AP_Invoice_Distributions_All AID

950:
951:
952: SELECT SUM(AID.Amount)
953: INTO l_inv_adj_amount
954: FROM AP_Invoice_Distributions_All AID
955: WHERE AID.Accounting_Event_ID = l_prepay_hist_rec.invoice_adjustment_event_id;
956:
957: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
958: l_log_msg := 'l_inv_adj_amount = ' ||l_inv_adj_amount;

Line 1011: -- joined with ap_invoice_distributions_all for the performance issue 7235352

1007: CLOSE Inv_Adj_Dists;
1008: END IF;
1009:
1010:
1011: -- joined with ap_invoice_distributions_all for the performance issue 7235352
1012: SELECT /*+ leading(aid) */ SUM(DECODE(APAD.Prepay_Dist_Lookup_Code, 'PREPAY APPL', APAD.Amount,
1013: 'PREPAY APPL REC TAX', APAD.Amount,
1014: 'PREPAY APPL NONREC TAX', APAD.Amount, 0)),
1015: SUM(DECODE(APAD.Prepay_Dist_Lookup_Code, 'TAX DIFF', APAD.Amount, 0))

Line 1019: ap_invoice_distributions_all aid

1015: SUM(DECODE(APAD.Prepay_Dist_Lookup_Code, 'TAX DIFF', APAD.Amount, 0))
1016: INTO l_sum_prepaid_amount,
1017: l_sum_tax_diff_amount
1018: FROM AP_Prepay_App_Dists APAD,
1019: ap_invoice_distributions_all aid
1020: WHERE APAD.Prepay_App_Distribution_ID = l_prepay_dist_rec.invoice_distribution_id
1021: AND apad.invoice_distribution_id = aid.invoice_distribution_id
1022: AND aid.invoice_id = l_prepay_dist_rec.invoice_id;
1023:

Line 1202: FROM AP_Invoice_Distributions_All AID

1198:
1199:
1200: SELECT SUM(NVL(AID.Amount,0))
1201: INTO l_total_dist_amount
1202: FROM AP_Invoice_Distributions_All AID
1203: WHERE AID.Invoice_ID = p_inv_rec.invoice_id
1204: AND AID.Line_Type_Lookup_Code <> 'PREPAY'
1205: AND AID.Prepay_Distribution_ID IS NULL
1206: AND AID.Prepay_Tax_Parent_ID IS NULL -- For tax dists created in R11.5

Line 2338: -- and not exists(select 1 from ap_invoice_distributions_all aid

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
2338: -- and not exists(select 1 from ap_invoice_distributions_all aid
2339: -- where aid.invoice_distribution_id=
2340: -- apad1.prepay_app_distribution_id
2341: -- and nvl(aid.encumbered_flag,'N')='Y'));
2342:

Line 2356: and not exists(select 1 from ap_invoice_distributions_all aid

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
2355: and aph.invoice_id=p_invoice_id
2356: and not exists(select 1 from ap_invoice_distributions_all aid
2357: -- Bug fix 5634515
2358: -- replace invoice_distribution_id with prepay_app_distribution_id
2359: -- since the original one can only derive other invoice lines except
2360: -- prepayment application line.

Line 2374: -- ap_invoice_distributions_all aid

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,
2374: -- ap_invoice_distributions_all aid
2375: -- where aid.invoice_distribution_id=
2376: -- apad.invoice_distribution_id
2377: -- and aph.prepay_history_id=apad.prepay_history_id
2378: -- and nvl(encumbered_flag,'N')='Y');

Line 2386: ap_invoice_distributions_all aid

2382: AND (bc_event_id is null or
2383: (bc_event_id is not null
2384: AND Invoice_id = p_invoice_id
2385: AND not exists(select 1 from AP_Prepay_App_Dists apad,
2386: ap_invoice_distributions_all aid
2387: -- Bug fix 5634515
2388: -- replace invoice_distribution_id with prepay_app_distribution_id
2389: -- since the original one can only derive other invoice lines except
2390: -- prepayment application line.