DBA Data[Home] [Help]

APPS.AP_INVOICE_LINES_UTILITY_PKG dependencies on AP_INVOICES_ALL

Line 62: FROM ap_invoices_all ai,

58: SELECT NVL(fsp.purch_encumbrance_flag,'N'),
59: ai.org_id
60: INTO l_purch_encumbrance_flag,
61: l_org_id
62: FROM ap_invoices_all ai,
63: financials_system_params_all fsp
64: WHERE ai.invoice_id = p_invoice_id
65: AND ai.org_id = fsp.org_id;
66:

Line 194: FROM ap_invoices_all ai,

190: SELECT nvl(sob.sla_ledger_cash_basis_flag, 'N'),
191: asp.org_id
192: INTO l_cash_basis_flag,
193: l_org_id
194: FROM ap_invoices_all ai,
195: ap_system_parameters_all asp,
196: gl_sets_of_books sob
197: WHERE ai.invoice_id = p_invoice_id
198: AND ai.org_id = asp.org_id

Line 295: -- MOAC. Included select from ap_invoices_all to get the org_id from

291: BEGIN
292:
293: ---------------------------------------------------------------------
294: -- Get the encumbrance flag
295: -- MOAC. Included select from ap_invoices_all to get the org_id from
296: -- the invoice_id since it is unique
297:
298: SELECT NVL(fsp.purch_encumbrance_flag,'N'), ai.org_id
299: INTO encumbrance_flag, l_org_id

Line 300: FROM ap_invoices_all ai,

296: -- the invoice_id since it is unique
297:
298: SELECT NVL(fsp.purch_encumbrance_flag,'N'), ai.org_id
299: INTO encumbrance_flag, l_org_id
300: FROM ap_invoices_all ai,
301: financials_system_params_all fsp
302: WHERE ai.invoice_id = p_invoice_id
303: AND ai.org_id = fsp.org_id;
304:

Line 516: l_org_id ap_invoices_all.org_id%type; -- for bug 5936290

512:
513: l_prepay_amount_applied NUMBER := 0;
514: l_enc_enabled VARCHAR2(1); --bug6009101
515: l_po_not_approved VARCHAR2(1); --bug6009101
516: l_org_id ap_invoices_all.org_id%type; -- for bug 5936290
517: CURSOR dist_gl_date_Cur IS
518: SELECT accounting_date
519: FROM ap_invoice_distributions AID
520: WHERE AID.invoice_id = p_line_rec.invoice_id

Line 577: FROM ap_invoices_all

573: -- So now we are passing the org_id also in these two calls.
574:
575: SELECT org_id
576: INTO l_org_id
577: FROM ap_invoices_all
578: WHERE invoice_id = p_line_rec.invoice_id;
579:
580: FOR i in NVL(l_gl_date_list.FIRST,0)..NVL(l_gl_date_list.LAST,-1)
581: LOOP

Line 628: ap_invoices_all AI

624:
625: SELECT NVL(purch_encumbrance_flag,'N')
626: INTO l_enc_enabled
627: FROM financials_system_params_all FSP,
628: ap_invoices_all AI
629: WHERE AI.invoice_id = p_line_rec.invoice_id
630: AND FSP.org_id = AI.org_id;
631:
632: if l_enc_enabled = 'Y' then

Line 1013: FROM ap_invoices_all ai

1009: | is applied. If so, return FALSE (Bug #5114854) |
1010: +-----------------------------------------------------------------*/
1011: SELECT count(*)
1012: INTO l_count
1013: FROM ap_invoices_all ai
1014: WHERE invoice_id = p_line_rec.invoice_id
1015: AND invoice_type_lookup_code = 'PREPAYMENT';
1016:
1017: IF ( l_count > 0 ) THEN

Line 1160: From ap_invoices_all AI

1156: --bug 5475668 Added the if condition
1157: if (p_invoice_id is not null) then
1158: Select 1
1159: Into dummy
1160: From ap_invoices_all AI
1161: Where AI.credited_invoice_id = p_Invoice_Id
1162: AND NVL(AI.quick_credit, 'N') = 'Y'
1163: AND AI.cancelled_date is null
1164: AND Rownum = 1;

Line 1796: l_invoice_id ap_invoices_all.invoice_id%TYPE;

1792: nvl( AID.quantity_invoiced,0 ) ) < 0
1793: OR
1794: NVL(POD.amount_billed, 0) - NVL(AID.amount, 0) < 0 );
1795:
1796: l_invoice_id ap_invoices_all.invoice_id%TYPE;
1797: current_calling_sequence VARCHAR2(4000);
1798: debug_info VARCHAR2(240);
1799: l_po_dist_count NUMBER := 0;
1800: l_return_var BOOLEAN := FALSE;

Line 2195: l_payment_cross_rate ap_invoices_all.payment_cross_rate%TYPE :=0;

2191: ) IS
2192:
2193: l_inv_amt_remaining ap_payment_schedules.amount_remaining%TYPE := 0;
2194: l_gross_amount ap_payment_schedules.gross_amount%TYPE := 0;
2195: l_payment_cross_rate ap_invoices_all.payment_cross_rate%TYPE :=0;
2196: l_payment_currency_code ap_invoices_all.payment_currency_code%TYPE;
2197:
2198: -- Debug variables
2199: l_debug_loc VARCHAR2(30) := 'Manual_Withhold_Tax';

Line 2196: l_payment_currency_code ap_invoices_all.payment_currency_code%TYPE;

2192:
2193: l_inv_amt_remaining ap_payment_schedules.amount_remaining%TYPE := 0;
2194: l_gross_amount ap_payment_schedules.gross_amount%TYPE := 0;
2195: l_payment_cross_rate ap_invoices_all.payment_cross_rate%TYPE :=0;
2196: l_payment_currency_code ap_invoices_all.payment_currency_code%TYPE;
2197:
2198: -- Debug variables
2199: l_debug_loc VARCHAR2(30) := 'Manual_Withhold_Tax';
2200: l_curr_calling_sequence VARCHAR2(2000);

Line 2210: FROM ap_invoices_all

2206: l_curr_calling_sequence := 'AP_INVOICE_LINES_UTILITY_PKG.'||l_debug_loc;
2207:
2208: SELECT nvl(payment_cross_rate,0), payment_currency_code
2209: INTO l_payment_cross_rate, l_payment_currency_code
2210: FROM ap_invoices_all
2211: WHERE invoice_id = p_invoice_id;
2212:
2213: SELECT sum(nvl(amount_remaining,0)), sum(nvl(gross_amount,0))
2214: INTO l_inv_amt_remaining, l_gross_amount