DBA Data[Home] [Help]

APPS.AP_INVOICES_UTILITY_PKG dependencies on AP_INVOICES_ALL

Line 236: FROM ap_invoices_all ai,

232: SELECT nvl(sob.sla_ledger_cash_basis_flag, 'N'),
233: asp.org_id
234: INTO l_cash_basis_flag,
235: l_org_id
236: FROM ap_invoices_all ai,
237: ap_system_parameters_all asp,
238: gl_sets_of_books sob
239: WHERE ai.invoice_id = l_invoice_id
240: AND ai.org_id = asp.org_id

Line 332: from ap_invoices_all

328: debug_info := 'Count for same vendor_id and invoice_num';
329:
330: select count(1)
331: into dummy_a
332: from ap_invoices_all
333: where invoice_num = X_INVOICE_NUM
334: and vendor_id = X_VENDOR_ID
335: and org_id = X_ORG_ID -- Bug 5407785
336: and ((X_ROWID is null) or (rowid <> X_ROWID));

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

501: BEGIN
502:
503: ---------------------------------------------------------------------
504: -- Get the encumbrance flag
505: -- MOAC. Included select from ap_invoices_all to get the org_id from
506: -- the invoice_id since it is unique
507:
508:
509: SELECT NVL(fsp.purch_encumbrance_flag,'N'),

Line 515: FROM ap_invoices_all ai,

511: ai.force_revalidation_flag
512: INTO encumbrance_flag,
513: l_org_id,
514: l_force_revalidation_flag
515: FROM ap_invoices_all ai,
516: financials_system_params_all fsp
517: WHERE ai.invoice_id = l_invoice_id
518: AND ai.set_of_books_id = fsp.set_of_books_id
519: AND ai.org_id = fsp.org_id;

Line 549: FROM ap_invoices_all ai

545: -- If invoice is cancelled, return 'CANCELLED'.
546: --
547: SELECT ai.cancelled_date
548: INTO cancelled_date
549: FROM ap_invoices_all ai
550: WHERE ai.invoice_id = l_invoice_id;
551:
552: IF (cancelled_date IS NOT NULL) THEN
553: RETURN('CANCELLED');

Line 762: FROM ap_invoice_lines_all AIL, ap_invoices_all A

758: BEGIN
759:
760: SELECT 'N'
761: INTO invoice_approval_flag
762: FROM ap_invoice_lines_all AIL, ap_invoices_all A
763: WHERE AIL.invoice_id = A.invoice_id
764: AND AIL.invoice_id = l_invoice_id
765: AND ((AIL.line_type_lookup_code <> 'TAX'
766: and (AIL.line_type_lookup_code NOT IN ('AWT','PREPAY')

Line 1527: FROM ap_invoices_all ai,

1523: BEGIN
1524:
1525: SELECT NVL(fsp.purch_encumbrance_flag,'N'), ai.org_id
1526: INTO l_purch_encumbrance_flag, l_org_id
1527: FROM ap_invoices_all ai,
1528: financials_system_params_all fsp
1529: WHERE ai.invoice_id = l_invoice_id
1530: AND ai.org_id = fsp.org_id;
1531:

Line 2145: FROM ap_invoice_distributions_all aid,ap_invoices_all ai

2141: IS
2142: l_prepay_amount_remaining number:=0;
2143: cursor c_prepay_amount_remaining IS
2144: SELECT SUM(nvl(prepay_amount_remaining,amount))
2145: FROM ap_invoice_distributions_all aid,ap_invoices_all ai
2146: WHERE aid.invoice_id = P_invoice_id
2147: AND aid.line_type_lookup_code IN ('ITEM','TAX')
2148: AND nvl(aid.reversal_flag,'N') <> 'Y'
2149: AND ai.invoice_id = P_invoice_id

Line 2184: FROM ap_invoices_all ai

2180: l_prepayment_type VARCHAR2(9);
2181:
2182: CURSOR c_prepayment_type IS
2183: SELECT decode(AI.EARLIEST_SETTLEMENT_DATE,null,'PERMANENT','TEMPORARY')
2184: FROM ap_invoices_all ai
2185: WHERE ai.invoice_id = P_invoice_id;
2186: BEGIN
2187:
2188: OPEN c_prepayment_type;

Line 2954: FROM ap_invoices_all i

2950:
2951: IS
2952: CURSOR Invoice_Validation IS
2953: SELECT i.invoice_id
2954: FROM ap_invoices_all i
2955: WHERE i.invoice_id = P_Invoice_Id
2956: AND EXISTS
2957: (SELECT il.invoice_id
2958: FROM ap_invoice_lines_all il

Line 2965: l_invoice_id ap_invoices_all.invoice_id%TYPE;

2961: AND NVL(il.cancelled_flag, 'N') <> 'Y'
2962: AND il.match_type IN ('PRICE_CORRECTION',
2963: 'QTY_CORRECTION'));
2964:
2965: l_invoice_id ap_invoices_all.invoice_id%TYPE;
2966: current_calling_sequence VARCHAR2(4000);
2967: debug_info VARCHAR2(240);
2968: l_return_var BOOLEAN := FALSE;
2969:

Line 3042: FROM ap_invoices_all i

3038:
3039: IS
3040: CURSOR Invoice_Validation IS
3041: SELECT i.invoice_id
3042: FROM ap_invoices_all i
3043: WHERE i.invoice_id = P_Invoice_Id
3044: AND EXISTS
3045: (SELECT il.invoice_id
3046: FROM ap_invoice_lines_all il

Line 3052: l_invoice_id ap_invoices_all.invoice_id%TYPE;

3048: AND il.line_type_lookup_code = 'PREPAY'
3049: AND NVL(il.discarded_flag, 'N') <> 'Y'
3050: AND NVL(il.cancelled_flag, 'N') <> 'Y');
3051:
3052: l_invoice_id ap_invoices_all.invoice_id%TYPE;
3053: current_calling_sequence VARCHAR2(4000);
3054: debug_info VARCHAR2(240);
3055: l_return_var BOOLEAN := FALSE;
3056:

Line 3129: FROM ap_invoices_all i

3125:
3126: IS
3127: CURSOR Invoice_Validation IS
3128: SELECT i.invoice_id
3129: FROM ap_invoices_all i
3130: WHERE i.invoice_id = P_Invoice_Id
3131: AND EXISTS
3132: (SELECT il.invoice_id
3133: FROM ap_invoice_lines_all il

Line 3139: l_invoice_id ap_invoices_all.invoice_id%TYPE;

3135: AND il.line_type_lookup_code = 'AWT'
3136: AND NVL(il.discarded_flag, 'N') <> 'Y'
3137: AND NVL(il.cancelled_flag, 'N') <> 'Y');
3138:
3139: l_invoice_id ap_invoices_all.invoice_id%TYPE;
3140: current_calling_sequence VARCHAR2(4000);
3141: debug_info VARCHAR2(240);
3142: l_return_var BOOLEAN := FALSE;
3143:

Line 3215: FROM ap_invoices_all i

3211:
3212: IS
3213: CURSOR Invoice_Validation IS
3214: SELECT i.invoice_id
3215: FROM ap_invoices_all i
3216: WHERE i.invoice_id = P_Invoice_Id
3217: AND EXISTS
3218: (SELECT ail.invoice_id
3219: FROM ap_invoice_lines_all ail,

Line 3226: l_invoice_id ap_invoices_all.invoice_id%TYPE;

3222: AND ail.po_line_location_id = pll.line_location_id
3223: AND ail.org_id = pll.org_id
3224: AND pll.closed_code = 'FINALLY CLOSED');
3225:
3226: l_invoice_id ap_invoices_all.invoice_id%TYPE;
3227: current_calling_sequence VARCHAR2(4000);
3228: debug_info VARCHAR2(240);
3229: l_return_var BOOLEAN := FALSE;
3230:

Line 3535: FROM ap_invoices_all ai

3531: INTO l_cancelled_date,
3532: l_approval_ready_flag,
3533: l_invoice_type_lookup_code,
3534: l_invoice_source
3535: FROM ap_invoices_all ai
3536: WHERE ai.invoice_id = p_invoice_id
3537: AND ai.source = 'ISP';
3538:
3539: -- If cancelled date is not null, return 'CANCELLED'

Line 3546: -- Temporarily approval_ready_flag = 'S' in ap_invoices_all handles the

3542: RETURN('CANCELLED');
3543: END IF;
3544:
3545: -- If invoice is saved for later in ISP, return 'UNSUBMITTED'.
3546: -- Temporarily approval_ready_flag = 'S' in ap_invoices_all handles the
3547: -- the unsubmitted invoices.
3548: IF ( l_approval_ready_flag = 'S' ) THEN
3549: RETURN('UNSUBMITTED');
3550: END IF;