DBA Data[Home] [Help]

APPS.FUN_NET_ARAP_PKG dependencies on AP_INVOICES

Line 33: (invoice_id ap_invoices_all.invoice_id%TYPE,

29: g_idx BINARY_INTEGER;
30:
31: -- TYPE txnCurType IS REF CURSOR;
32: TYPE pymt_sch_rec IS RECORD
33: (invoice_id ap_invoices_all.invoice_id%TYPE,
34: min_payment_num ap_payment_schedules_all.payment_num%TYPE,
35: max_payment_num ap_payment_schedules_all.payment_num%TYPE);
36:
37: TYPE pymt_sch_tab IS TABLE OF pymt_sch_rec INDEX BY BINARY_INTEGER;

Line 531: -- Select all ap_invoices based on the batch id

527: fun_net_util.Log_String(g_proc_level,l_path,'Preparing AP Transactions');
528:
529: /* Build the select clause */
530: l_inv_select_clause :=
531: -- Select all ap_invoices based on the batch id
532: 'SELECT
533: api.invoice_id,
534: api.invoice_amount AS transaction_amount,
535: SUM(aps.amount_remaining) AS open_amount,

Line 542: ' FROM ap_invoices_all api,

538: fun_net_util.Log_String(g_state_level,l_path,'SELECT : '||l_inv_select_clause);
539:
540: /* Build the from clause */
541: l_inv_from_clause :=
542: ' FROM ap_invoices_all api,
543: fun_net_suppliers_all fns,
544: ap_payment_schedules_all aps';
545: fun_net_util.Log_String(g_state_level,l_path,'FROM : '||l_inv_from_clause);
546:

Line 559: AND ap_invoices_pkg.get_approval_status(api.invoice_id,

555: l_inv_where_clause :=
556: ' WHERE api.invoice_id = aps.invoice_id
557: AND aps.hold_flag = ''N''
558: AND aps.payment_status_flag <> ''Y''
559: AND ap_invoices_pkg.get_approval_status(api.invoice_id,
560: api.invoice_amount,
561: api.payment_status_flag,
562: api.invoice_type_lookup_code) = ''APPROVED''
563: AND fns.agreement_id = :v_agreement_id1

Line 590: D - "Disregard"- All AP invoices selected for Netting; no filtering, therefore will select everything, as if the profile is "Off"

586:
587: /* Check Shikyu rule code on the Agreement
588: Y - "Yes" - Only invoices lines that were matched to PO lines with the OSA flag checked are selected for Netting
589: N - "No" -Only invoices lines that were matched to PO lines with the OSA flag not checked are selected for Netting
590: D - "Disregard"- All AP invoices selected for Netting; no filtering, therefore will select everything, as if the profile is "Off"
591: null value - if that scenario is met should be the same as disregard */
592:
593: IF g_shikyu_rule = 'Y' THEN
594: l_inv_where_clause := l_inv_where_clause || ' AND JMF_SHIKYU_GRP.Is_AP_Inv_Shikyu_Nettable_func(api.invoice_id) = ''Y'' ';

Line 789: TYPE exchange_rate IS TABLE OF ap_invoices_all.exchange_rate%TYPE INDEX BY BINARY_INTEGER;

785: TYPE amt_type IS TABLE OF fun_net_batches_all.total_netted_amt%TYPE INDEX BY BINARY_INTEGER;
786: TYPE trx_type IS TABLE OF fun_net_ar_txns_all.customer_trx_id%TYPE INDEX BY BINARY_INTEGER;
787: TYPE payment_num IS TABLE OF ap_payment_schedules_all.payment_num%TYPE INDEX BY BINARY_INTEGER;
788: TYPE inv_rank IS TABLE OF fun_net_ap_invs_all.ap_txn_rank%TYPE INDEX BY BINARY_INTEGER;
789: TYPE exchange_rate IS TABLE OF ap_invoices_all.exchange_rate%TYPE INDEX BY BINARY_INTEGER;
790: TYPE precision_tab IS TABLE OF fnd_currencies.precision%TYPE INDEX BY BINARY_INTEGER;
791: --l_invoice_id fun_net_ap_invs_all.invoice_id%TYPE;
792: --l_invoice_amt fun_net_ap_invs_all.invoice_amt%TYPE;
793: --l_open_amt fun_net_ap_invs_all.open_amt%TYPE;

Line 869: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices');

865: fun_net_util.Log_String(g_state_level,l_path,'Inserting invoices into Netting tables');
866: l_rank := 0;
867:
868: IF p_appln = 'AP' AND g_net_currency_rule IN ('SINGLE_CURRENCY', 'WITHIN_CURRENCY') THEN
869: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices');
870: OPEN inv_rec FOR p_inv_cur USING g_agreement_id,
871: g_agreement_id,
872: g_batch_details.transaction_due_date,
873: g_agr_start_date,

Line 936: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP Invoices');

932: --END LOOP;
933: CLOSE inv_rec;
934:
935: ELSIF p_appln = 'AP' AND g_net_currency_rule IN ('ACCOUNTING_CURRENCY') THEN
936: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP Invoices');
937: OPEN inv_rec FOR p_inv_cur USING
938: p_currency_code,
939: g_batch_details.SETTLEMENT_DATE,
940: g_batch_details.exchange_rate_type,

Line 1397: FROM ap_invoices_all api, fun_net_ap_invs_all fnapi

1393: PROCEDURE validate_exch_rate (p_status_flag OUT NOCOPY VARCHAR2) IS
1394:
1395: CURSOR trx_curr_cur IS
1396: SELECT INVOICE_CURRENCY_CODE
1397: FROM ap_invoices_all api, fun_net_ap_invs_all fnapi
1398: WHERE api.invoice_id = fnapi.invoice_id
1399: AND fnapi.batch_id = g_batch_id
1400: UNION
1401: SELECT INVOICE_CURRENCY_CODE

Line 1531: FROM ap_invoices_all api, fnd_currencies fc

1527:
1528:
1529: SELECT fc.currency_code,fc.precision
1530: INTO l_inv_currency,l_precision
1531: FROM ap_invoices_all api, fnd_currencies fc
1532: WHERE api.invoice_id = l_trx_id(i)
1533: AND api.invoice_currency_code = fc.currency_code;
1534:
1535: l_exc_rate := Derive_Net_Exchg_Rate(g_func_currency,l_inv_currency);

Line 2579: l_old_invoice ap_invoices.invoice_id%TYPE;

2575: IS
2576: l_vendor_name po_vendors.vendor_name%TYPE;
2577: l_vendor_site_code po_vendor_sites_all.vendor_site_code%TYPE;
2578: l_check_id ap_checks.check_id%TYPE;
2579: l_old_invoice ap_invoices.invoice_id%TYPE;
2580: amt_remaining ap_payment_schedules.amount_remaining%TYPE;
2581: l_bank_num ce_banks_v.bank_number%TYPE;
2582: l_return_status VARCHAR2(1);
2583: m integer;

Line 2591: TYPE ap_invoice_type IS TABLE OF ap_invoices.invoice_id%TYPE INDEX BY BINARY_INTEGER;

2587: TYPE vendor_type IS TABLE OF po_vendors.vendor_id%TYPE INDEX BY BINARY_INTEGER;
2588: TYPE vendor_site_type IS TABLE OF po_vendor_sites_all.vendor_site_id%TYPE INDEX BY BINARY_INTEGER;
2589: TYPE currency_type IS TABLE OF fnd_currencies.currency_code%TYPE INDEX BY BINARY_INTEGER;
2590: TYPE ap_check_amt_type IS TABLE OF ap_checks.amount%TYPE INDEX BY BINARY_INTEGER;
2591: TYPE ap_invoice_type IS TABLE OF ap_invoices.invoice_id%TYPE INDEX BY BINARY_INTEGER;
2592: TYPE party_type IS TABLE OF ap_invoices_all.party_id%TYPE INDEX BY BINARY_INTEGER;
2593: TYPE party_site_type IS TABLE OF ap_invoices_all.party_site_id%TYPE INDEX BY BINARY_INTEGER;
2594:
2595: ap_check_amt_list ap_check_amt_type;

Line 2592: TYPE party_type IS TABLE OF ap_invoices_all.party_id%TYPE INDEX BY BINARY_INTEGER;

2588: TYPE vendor_site_type IS TABLE OF po_vendor_sites_all.vendor_site_id%TYPE INDEX BY BINARY_INTEGER;
2589: TYPE currency_type IS TABLE OF fnd_currencies.currency_code%TYPE INDEX BY BINARY_INTEGER;
2590: TYPE ap_check_amt_type IS TABLE OF ap_checks.amount%TYPE INDEX BY BINARY_INTEGER;
2591: TYPE ap_invoice_type IS TABLE OF ap_invoices.invoice_id%TYPE INDEX BY BINARY_INTEGER;
2592: TYPE party_type IS TABLE OF ap_invoices_all.party_id%TYPE INDEX BY BINARY_INTEGER;
2593: TYPE party_site_type IS TABLE OF ap_invoices_all.party_site_id%TYPE INDEX BY BINARY_INTEGER;
2594:
2595: ap_check_amt_list ap_check_amt_type;
2596: ap_check_base_amt_list ap_check_amt_type;

Line 2593: TYPE party_site_type IS TABLE OF ap_invoices_all.party_site_id%TYPE INDEX BY BINARY_INTEGER;

2589: TYPE currency_type IS TABLE OF fnd_currencies.currency_code%TYPE INDEX BY BINARY_INTEGER;
2590: TYPE ap_check_amt_type IS TABLE OF ap_checks.amount%TYPE INDEX BY BINARY_INTEGER;
2591: TYPE ap_invoice_type IS TABLE OF ap_invoices.invoice_id%TYPE INDEX BY BINARY_INTEGER;
2592: TYPE party_type IS TABLE OF ap_invoices_all.party_id%TYPE INDEX BY BINARY_INTEGER;
2593: TYPE party_site_type IS TABLE OF ap_invoices_all.party_site_id%TYPE INDEX BY BINARY_INTEGER;
2594:
2595: ap_check_amt_list ap_check_amt_type;
2596: ap_check_base_amt_list ap_check_amt_type;
2597: vendor_list vendor_type;

Line 2616: fun_net_util.Log_String(g_event_level,l_path,'Group AP Invoices');

2612: x_return_status := FND_API.G_TRUE;
2613:
2614: BEGIN
2615: l_path := g_path || 'Settle AP Transactions';
2616: fun_net_util.Log_String(g_event_level,l_path,'Group AP Invoices');
2617: SELECT
2618: sum(finv.inv_curr_net_amt) AS pymt_amt,
2619: -- sum(finv.netted_amt) AS base_pymt_amt,
2620: inv.vendor_id,

Line 2633: ap_invoices inv

2629: party_list,
2630: party_site_list,
2631: currency_list
2632: FROM fun_net_ap_invs finv,
2633: ap_invoices inv
2634: WHERE inv.invoice_id = finv.invoice_id
2635: AND finv.batch_id = g_batch_details.batch_id
2636: AND finv.inv_curr_net_amt <> 0
2637: GROUP BY vendor_id,

Line 2754: ap_invoices inv,

2750: --Amt in Payment Currency = Invoice Currency
2751: BULK COLLECT INTO
2752: ap_payment_info_tab
2753: FROM
2754: ap_invoices inv,
2755: fun_net_ap_invs finv,
2756: ap_payment_schedules apps
2757: WHERE finv.invoice_id = inv.invoice_id
2758: AND apps.invoice_id = inv.invoice_id

Line 2781: ap_invoices inv

2777: /* Calculate the Amount to be netted per Payment Schedule */
2778: SELECT amount_remaining
2779: BULK COLLECT INTO amtDueTab
2780: FROM ap_payment_schedules apps,
2781: ap_invoices inv
2782: WHERE apps.invoice_id = inv.invoice_id
2783: AND apps.checkrun_id = g_batch_details.checkrun_id
2784: AND inv.vendor_id = vendor_list(i)
2785: AND inv.vendor_site_id = vendor_site_list(i)

Line 4162: 'Error in Settling AP Invoices');

4158:
4159: IF l_return_status = FND_API.G_FALSE THEN
4160:
4161: fun_net_util.Log_String(g_event_level,l_path,
4162: 'Error in Settling AP Invoices');
4163: -- FND_MESSAGE.SET_NAME('FUN','FUN_NET_AP_SETTLE_FAIL');
4164: RAISE FND_API.G_EXC_ERROR;
4165: END IF;
4166: