DBA Data[Home] [Help]

APPS.FUN_NET_ARAP_PKG dependencies on AP_INVOICES

Line 24: (invoice_id ap_invoices_all.invoice_id%TYPE,

20: g_batch_list batch_table;
21: g_idx BINARY_INTEGER;
22: -- TYPE txnCurType IS REF CURSOR;
23: TYPE pymt_sch_rec IS RECORD
24: (invoice_id ap_invoices_all.invoice_id%TYPE,
25: min_payment_num ap_payment_schedules_all.payment_num%TYPE,
26: max_payment_num ap_payment_schedules_all.payment_num%TYPE);
27: TYPE pymt_sch_tab IS TABLE OF pymt_sch_rec INDEX BY BINARY_INTEGER;
28: TYPE txnRecType IS RECORD

Line 115: FROM ap_invoices_all api, fnd_currencies fc

111: l_path := g_path || 'Derive Converted Amount';
112: IF ap_ar='AP' THEN
113: SELECT fc.currency_code,fc.precision
114: INTO l_inv_currency,l_precision
115: FROM ap_invoices_all api, fnd_currencies fc
116: WHERE api.invoice_id = p_trx_id
117: AND api.invoice_currency_code = fc.currency_code;
118: ELSE
119: SELECT fc.currency_code,fc.precision

Line 174: l_invoice_currency_code AP_INVOICES_ALL.INVOICE_CURRENCY_CODE%TYPE;

170: l_settlement_date DATE;
171: l_current_discount NUMBER;
172: l_currency_code fun_net_batches.batch_currency%TYPE;
173: l_exchange_rate_type fun_net_batches.exchange_rate_type%TYPE;
174: l_invoice_currency_code AP_INVOICES_ALL.INVOICE_CURRENCY_CODE%TYPE;
175: l_path VARCHAR2(100);
176: BEGIN
177: l_path := g_path||'get_ap_discount';
178: l_sql_stmt:='select PAYMENT_NUM,AMOUNT_REMAINING FROM ap_payment_schedules_all WHERE invoice_id=:v_invoice_id ';

Line 214: from AP_INVOICES_ALL

210: fun_net_util.Log_String(g_state_level,l_path,'l_applieddisc :'|| l_applieddisc);
211: IF(l_net_currency_rule_code = 'ACCOUNTING_CURRENCY' and l_applieddisc > 0) THEN
212: select INVOICE_CURRENCY_CODE
213: into l_invoice_currency_code
214: from AP_INVOICES_ALL
215: where INVOICE_ID = p_invoice_id;
216: l_applieddisc := gl_currency_api.convert_amount_sql(l_invoice_currency_code,
217: l_currency_code,
218: trunc(l_settlement_date),

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

716: SELECT ALLOW_DISC_FLAG into l_allow_disc_flag FROM FUN_NET_AGREEMENTS_all WHERE Agreement_id=g_agreement_id;
717: IF l_allow_disc_flag='N' THEN -- FOR NON ESD AGREEMENTS
718: /* Build the select clause */
719: l_inv_select_clause :=
720: -- Select all ap_invoices based on the batch id
721: 'SELECT
722: api.invoice_id,
723: api.invoice_amount AS transaction_amount,
724: SUM(aps.amount_remaining) AS open_amount,

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

725: min(aps.payment_num),
726: max(aps.payment_num) ';
727: ELSE -- FOR ESD ENABLED AGREEMENTS, Calculating OPEN_AMOUNT_AFTERDISC for ESD enabled Agreements
728: l_inv_select_clause :=
729: -- Select all ap_invoices based on the batch id
730: 'SELECT
731: api.invoice_id,
732: api.invoice_amount AS transaction_amount,
733: SUM(aps.amount_remaining) AS open_amount,

Line 741: ' FROM ap_invoices_all api,

737: END IF;
738: fun_net_util.Log_String(g_state_level,l_path,'SELECT : '||l_inv_select_clause);
739: /* Build the from clause */
740: l_inv_from_clause :=
741: ' FROM ap_invoices_all api,
742: fun_net_suppliers_all fns,
743: ap_payment_schedules_all aps';
744: fun_net_util.Log_String(g_state_level,l_path,'FROM : '||l_inv_from_clause);
745: /* Build where clause */

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

754: ' WHERE api.invoice_id = aps.invoice_id
755: AND aps.hold_flag = ''N''
756: AND aps.checkrun_id is NULL
757: AND aps.payment_status_flag <> ''Y''
758: AND ap_invoices_pkg.get_approval_status(api.invoice_id,
759: api.invoice_amount,
760: api.payment_status_flag,
761: api.invoice_type_lookup_code) = ''APPROVED''
762: AND (AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id) = ''NOT REQUIRED'' OR

Line 762: AND (AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id) = ''NOT REQUIRED'' OR

758: AND ap_invoices_pkg.get_approval_status(api.invoice_id,
759: api.invoice_amount,
760: api.payment_status_flag,
761: api.invoice_type_lookup_code) = ''APPROVED''
762: AND (AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id) = ''NOT REQUIRED'' OR
763: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''APPROVED'' OR
764: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''MANUALLY APPROVED'' OR
765: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''WFAPPROVED'')
766: AND fns.agreement_id = :v_agreement_id1

Line 763: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''APPROVED'' OR

759: api.invoice_amount,
760: api.payment_status_flag,
761: api.invoice_type_lookup_code) = ''APPROVED''
762: AND (AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id) = ''NOT REQUIRED'' OR
763: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''APPROVED'' OR
764: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''MANUALLY APPROVED'' OR
765: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''WFAPPROVED'')
766: AND fns.agreement_id = :v_agreement_id1
767: AND fns.supplier_id = api.vendor_id

Line 764: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''MANUALLY APPROVED'' OR

760: api.payment_status_flag,
761: api.invoice_type_lookup_code) = ''APPROVED''
762: AND (AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id) = ''NOT REQUIRED'' OR
763: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''APPROVED'' OR
764: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''MANUALLY APPROVED'' OR
765: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''WFAPPROVED'')
766: AND fns.agreement_id = :v_agreement_id1
767: AND fns.supplier_id = api.vendor_id
768: AND NVL(fns.supplier_site_id, api.vendor_site_id)= api.vendor_site_id

Line 765: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''WFAPPROVED'')

761: api.invoice_type_lookup_code) = ''APPROVED''
762: AND (AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id) = ''NOT REQUIRED'' OR
763: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''APPROVED'' OR
764: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''MANUALLY APPROVED'' OR
765: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''WFAPPROVED'')
766: AND fns.agreement_id = :v_agreement_id1
767: AND fns.supplier_id = api.vendor_id
768: AND NVL(fns.supplier_site_id, api.vendor_site_id)= api.vendor_site_id
769: AND EXISTS

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

791: ' WHERE api.invoice_id = aps.invoice_id
792: AND aps.hold_flag = ''N''
793: AND aps.checkrun_id is NULL
794: AND aps.payment_status_flag <> ''Y''
795: AND ap_invoices_pkg.get_approval_status(api.invoice_id,
796: api.invoice_amount,
797: api.payment_status_flag,
798: api.invoice_type_lookup_code) = ''APPROVED''
799: AND (AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id) = ''NOT REQUIRED'' OR

Line 799: AND (AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id) = ''NOT REQUIRED'' OR

795: AND ap_invoices_pkg.get_approval_status(api.invoice_id,
796: api.invoice_amount,
797: api.payment_status_flag,
798: api.invoice_type_lookup_code) = ''APPROVED''
799: AND (AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id) = ''NOT REQUIRED'' OR
800: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''APPROVED'' OR
801: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''MANUALLY APPROVED'' OR
802: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''WFAPPROVED'')
803: AND fns.agreement_id = :v_agreement_id1

Line 800: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''APPROVED'' OR

796: api.invoice_amount,
797: api.payment_status_flag,
798: api.invoice_type_lookup_code) = ''APPROVED''
799: AND (AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id) = ''NOT REQUIRED'' OR
800: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''APPROVED'' OR
801: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''MANUALLY APPROVED'' OR
802: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''WFAPPROVED'')
803: AND fns.agreement_id = :v_agreement_id1
804: AND fns.supplier_id = api.vendor_id

Line 801: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''MANUALLY APPROVED'' OR

797: api.payment_status_flag,
798: api.invoice_type_lookup_code) = ''APPROVED''
799: AND (AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id) = ''NOT REQUIRED'' OR
800: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''APPROVED'' OR
801: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''MANUALLY APPROVED'' OR
802: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''WFAPPROVED'')
803: AND fns.agreement_id = :v_agreement_id1
804: AND fns.supplier_id = api.vendor_id
805: AND NVL(fns.supplier_site_id, api.vendor_site_id)= api.vendor_site_id

Line 802: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''WFAPPROVED'')

798: api.invoice_type_lookup_code) = ''APPROVED''
799: AND (AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id) = ''NOT REQUIRED'' OR
800: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''APPROVED'' OR
801: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''MANUALLY APPROVED'' OR
802: AP_INVOICES_PKG.Get_WFapproval_Status(api.invoice_id,api.org_id)=''WFAPPROVED'')
803: AND fns.agreement_id = :v_agreement_id1
804: AND fns.supplier_id = api.vendor_id
805: AND NVL(fns.supplier_site_id, api.vendor_site_id)= api.vendor_site_id
806: AND EXISTS

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

827: END IF;
828: /* Check Shikyu rule code on the Agreement
829: Y - "Yes" - Only invoices lines that were matched to PO lines with the OSA flag checked are selected for Netting
830: N - "No" -Only invoices lines that were matched to PO lines with the OSA flag not checked are selected for Netting
831: D - "Disregard"- All AP invoices selected for Netting; no filtering, therefore will select everything, as if the profile is "Off"
832: null value - if that scenario is met should be the same as disregard */
833: IF g_shikyu_rule = 'Y' THEN
834: l_inv_where_clause := l_inv_where_clause || ' AND JMF_SHIKYU_GRP.Is_AP_Inv_Shikyu_Nettable_func(api.invoice_id) = ''Y'' ';
835: ElSIF g_shikyu_rule = 'N' THEN

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

1036: TYPE amt_type IS TABLE OF fun_net_batches_all.total_netted_amt%TYPE INDEX BY BINARY_INTEGER;
1037: TYPE trx_type IS TABLE OF fun_net_ar_txns_all.customer_trx_id%TYPE INDEX BY BINARY_INTEGER;
1038: TYPE payment_num IS TABLE OF ap_payment_schedules_all.payment_num%TYPE INDEX BY BINARY_INTEGER;
1039: TYPE inv_rank IS TABLE OF fun_net_ap_invs_all.ap_txn_rank%TYPE INDEX BY BINARY_INTEGER;
1040: TYPE exchange_rate IS TABLE OF ap_invoices_all.exchange_rate%TYPE INDEX BY BINARY_INTEGER;
1041: TYPE precision_tab IS TABLE OF fnd_currencies.precision%TYPE INDEX BY BINARY_INTEGER;
1042: --l_invoice_id fun_net_ap_invs_all.invoice_id%TYPE;
1043: --l_invoice_amt fun_net_ap_invs_all.invoice_amt%TYPE;
1044: --l_open_amt fun_net_ap_invs_all.open_amt%TYPE;

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

1109: END IF;
1110: fun_net_util.Log_String(g_state_level,l_path,'Inserting invoices into Netting tables');
1111: l_rank := 0;
1112: IF p_appln = 'AP' AND g_net_currency_rule IN ('SINGLE_CURRENCY', 'WITHIN_CURRENCY') THEN
1113: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices');
1114: IF l_allow_disc_flag='Y' THEN -- FOR ESD Enabled Agreements
1115: OPEN inv_rec FOR p_inv_cur USING g_batch_details.SETTLEMENT_DATE,
1116: g_agreement_id,
1117: g_agreement_id,

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

1122: g_agr_start_date,
1123: g_agr_end_date,
1124: g_batch_details.org_id,
1125: p_currency_code;
1126: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices 1');
1127: FETCH inv_rec BULK COLLECT INTO l_invoice_id, l_invoice_amt, l_open_amt, l_min_payment_num,l_max_payment_num,l_OPEN_AMOUNT_AFTERDISC;
1128: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices 2');
1129: ELSE -- FOR NON ESD Agreements
1130: OPEN inv_rec FOR p_inv_cur USING g_agreement_id,

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

1124: g_batch_details.org_id,
1125: p_currency_code;
1126: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices 1');
1127: FETCH inv_rec BULK COLLECT INTO l_invoice_id, l_invoice_amt, l_open_amt, l_min_payment_num,l_max_payment_num,l_OPEN_AMOUNT_AFTERDISC;
1128: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices 2');
1129: ELSE -- FOR NON ESD Agreements
1130: OPEN inv_rec FOR p_inv_cur USING g_agreement_id,
1131: g_agreement_id,
1132: g_batch_details.transaction_due_date,

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

1133: g_agr_start_date,
1134: g_agr_end_date,
1135: g_batch_details.org_id,
1136: p_currency_code;
1137: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices 1');
1138: FETCH inv_rec BULK COLLECT INTO l_invoice_id, l_invoice_amt, l_open_amt, l_min_payment_num,l_max_payment_num;
1139: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices 2');
1140: END IF;
1141: FOR i IN 1..l_invoice_id.COUNT

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

1135: g_batch_details.org_id,
1136: p_currency_code;
1137: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices 1');
1138: FETCH inv_rec BULK COLLECT INTO l_invoice_id, l_invoice_amt, l_open_amt, l_min_payment_num,l_max_payment_num;
1139: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices 2');
1140: END IF;
1141: FOR i IN 1..l_invoice_id.COUNT
1142: LOOP
1143: fun_net_util.Log_String(g_state_level,l_path,'Fetching.........' || i);

Line 1165: --fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices batch _id=');

1161: -- l_open_amt;
1162: --EXIT WHEN inv_rec%NOTFOUND;
1163: --l_inv_rank(i) := i;
1164: --fun_net_util.Log_String(g_state_level,l_path,'Invoice ID:'||l_invoice_id);
1165: --fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP invoices batch _id=');
1166: INSERT INTO fun_net_ap_invs_all
1167: (batch_id,
1168: invoice_id,
1169: object_version_number,

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

1229: CLOSE inv_rec;
1230: END IF;
1231: --END LOOP;
1232: ELSIF p_appln = 'AP' AND g_net_currency_rule IN ('ACCOUNTING_CURRENCY') THEN
1233: fun_net_util.Log_String(g_state_level,l_path,'Fetching the AP Invoices');
1234: IF l_allow_disc_flag='Y' THEN -- FOR ESD Enabled Agreements
1235: fun_net_util.Log_String(g_state_level,l_path,'Inside IF');
1236: fun_net_util.Log_String(g_state_level,l_path,'jst b4 cursor');
1237: OPEN inv_rec FOR p_inv_cur USING

Line 1680: -- FROM ap_invoices_all api, fnd_currencies fc

1676: fun_net_util.Log_String(g_state_level,l_path,'Inside IF condition');
1677: --IF g_net_currency_rule = 'ACCOUNTING_CURRENCY' THEN
1678: -- SELECT fc.currency_code,fc.precision
1679: -- INTO l_inv_currency,l_precision
1680: -- FROM ap_invoices_all api, fnd_currencies fc
1681: -- WHERE api.invoice_id = l_trx_id(i)
1682: -- AND api.invoice_currency_code = fc.currency_code;
1683: --l_net_amt_cur := l_open_amt_afterdisc(i) * Derive_Net_Exchg_Rate(g_func_currency,l_inv_currency);
1684: --l_net_amt_cur := ROUND(l_net_amt_cur,l_precision);

Line 1707: FROM ap_invoices_all api, fnd_currencies fc

1703: IF g_net_currency_rule = 'ACCOUNTING_CURRENCY' THEN
1704: IF p_appln = 'AP' THEN
1705: SELECT fc.currency_code,fc.precision
1706: INTO l_inv_currency,l_precision
1707: FROM ap_invoices_all api, fnd_currencies fc
1708: WHERE api.invoice_id = l_trx_id(i)
1709: AND api.invoice_currency_code = fc.currency_code;
1710: ELSE
1711: SELECT fc.currency_code,fc.precision

Line 1776: FROM ap_invoices_all api, fnd_currencies fc

1772: IF g_net_currency_rule = 'ACCOUNTING_CURRENCY' THEN
1773: IF p_appln = 'AP' THEN
1774: SELECT fc.currency_code,fc.precision
1775: INTO l_inv_currency,l_precision
1776: FROM ap_invoices_all api, fnd_currencies fc
1777: WHERE api.invoice_id = l_trx_id(i)
1778: AND api.invoice_currency_code = fc.currency_code;
1779: ELSE
1780: SELECT fc.currency_code,fc.precision

Line 1793: FROM ap_invoices_all api, fnd_currencies fc

1789: /*IF g_net_currency_rule = 'ACCOUNTING_CURRENCY' THEN
1790: IF p_appln = 'AP' THEN
1791: SELECT fc.currency_code,fc.precision
1792: INTO l_inv_currency,l_precision
1793: FROM ap_invoices_all api, fnd_currencies fc
1794: WHERE api.invoice_id = l_trx_id(i)
1795: AND api.invoice_currency_code = fc.currency_code;
1796: l_exc_rate := Derive_Net_Exchg_Rate(g_func_currency,l_inv_currency);
1797: fun_net_util.Log_String(g_state_level,l_path,'l_exc_rate:'||l_exc_rate);

Line 2165: FROM ap_invoices_all api, fun_net_ap_invs_all fnapi

2161: END batch_exists;
2162: PROCEDURE validate_exch_rate (p_status_flag OUT NOCOPY VARCHAR2) IS
2163: CURSOR trx_curr_cur IS
2164: SELECT INVOICE_CURRENCY_CODE
2165: FROM ap_invoices_all api, fun_net_ap_invs_all fnapi
2166: WHERE api.invoice_id = fnapi.invoice_id
2167: AND fnapi.batch_id = g_batch_id
2168: UNION
2169: SELECT INVOICE_CURRENCY_CODE

Line 2264: FROM ap_invoices_all api, fnd_currencies fc

2260: IF g_net_currency_rule = 'ACCOUNTING_CURRENCY' THEN
2261: IF p_appln = 'AP' THEN
2262: SELECT fc.currency_code,fc.precision
2263: INTO l_inv_currency,l_precision
2264: FROM ap_invoices_all api, fnd_currencies fc
2265: WHERE api.invoice_id = l_trx_id(i)
2266: AND api.invoice_currency_code = fc.currency_code;
2267: l_exc_rate := Derive_Net_Exchg_Rate(g_func_currency,l_inv_currency);
2268: fun_net_util.Log_String(g_state_level,l_path,'l_exc_rate:'||l_exc_rate);

Line 3261: l_old_invoice ap_invoices.invoice_id%TYPE;

3257: IS
3258: l_vendor_name po_vendors.vendor_name%TYPE;
3259: l_vendor_site_code po_vendor_sites_all.vendor_site_code%TYPE;
3260: l_check_id ap_checks.check_id%TYPE;
3261: l_old_invoice ap_invoices.invoice_id%TYPE;
3262: amt_remaining ap_payment_schedules.amount_remaining%TYPE;
3263: l_bank_num ce_banks_v.bank_number%TYPE;
3264: -- Bug: 8537760
3265: l_amt_to_net fun_net_ap_invs.netted_amt%TYPE;

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

3271: TYPE vendor_type IS TABLE OF po_vendors.vendor_id%TYPE INDEX BY BINARY_INTEGER;
3272: TYPE vendor_site_type IS TABLE OF po_vendor_sites_all.vendor_site_id%TYPE INDEX BY BINARY_INTEGER;
3273: TYPE currency_type IS TABLE OF fnd_currencies.currency_code%TYPE INDEX BY BINARY_INTEGER;
3274: TYPE ap_check_amt_type IS TABLE OF ap_checks.amount%TYPE INDEX BY BINARY_INTEGER;
3275: TYPE ap_invoice_type IS TABLE OF ap_invoices.invoice_id%TYPE INDEX BY BINARY_INTEGER;
3276: TYPE party_type IS TABLE OF ap_invoices_all.party_id%TYPE INDEX BY BINARY_INTEGER;
3277: TYPE party_site_type IS TABLE OF ap_invoices_all.party_site_id%TYPE INDEX BY BINARY_INTEGER;
3278: ap_check_amt_list ap_check_amt_type;
3279: ap_check_base_amt_list ap_check_amt_type;

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

3272: TYPE vendor_site_type IS TABLE OF po_vendor_sites_all.vendor_site_id%TYPE INDEX BY BINARY_INTEGER;
3273: TYPE currency_type IS TABLE OF fnd_currencies.currency_code%TYPE INDEX BY BINARY_INTEGER;
3274: TYPE ap_check_amt_type IS TABLE OF ap_checks.amount%TYPE INDEX BY BINARY_INTEGER;
3275: TYPE ap_invoice_type IS TABLE OF ap_invoices.invoice_id%TYPE INDEX BY BINARY_INTEGER;
3276: TYPE party_type IS TABLE OF ap_invoices_all.party_id%TYPE INDEX BY BINARY_INTEGER;
3277: TYPE party_site_type IS TABLE OF ap_invoices_all.party_site_id%TYPE INDEX BY BINARY_INTEGER;
3278: ap_check_amt_list ap_check_amt_type;
3279: ap_check_base_amt_list ap_check_amt_type;
3280: vendor_list vendor_type;

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

3273: TYPE currency_type IS TABLE OF fnd_currencies.currency_code%TYPE INDEX BY BINARY_INTEGER;
3274: TYPE ap_check_amt_type IS TABLE OF ap_checks.amount%TYPE INDEX BY BINARY_INTEGER;
3275: TYPE ap_invoice_type IS TABLE OF ap_invoices.invoice_id%TYPE INDEX BY BINARY_INTEGER;
3276: TYPE party_type IS TABLE OF ap_invoices_all.party_id%TYPE INDEX BY BINARY_INTEGER;
3277: TYPE party_site_type IS TABLE OF ap_invoices_all.party_site_id%TYPE INDEX BY BINARY_INTEGER;
3278: ap_check_amt_list ap_check_amt_type;
3279: ap_check_base_amt_list ap_check_amt_type;
3280: vendor_list vendor_type;
3281: vendor_site_list vendor_site_type;

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

3291: -- Group Invoices by Vendor , Vendor Site and Payment Currency .
3292: x_return_status := FND_API.G_TRUE;
3293: BEGIN
3294: l_path := g_path || 'Settle AP Transactions';
3295: fun_net_util.Log_String(g_event_level,l_path,'Group AP Invoices');
3296: SELECT
3297: sum(finv.inv_curr_net_amt) AS pymt_amt,
3298: -- sum(finv.netted_amt) AS base_pymt_amt,
3299: inv.vendor_id,

Line 3312: ap_invoices inv

3308: party_list,
3309: party_site_list,
3310: currency_list
3311: FROM fun_net_ap_invs finv,
3312: ap_invoices inv
3313: WHERE inv.invoice_id = finv.invoice_id
3314: AND finv.batch_id = g_batch_details.batch_id
3315: AND finv.inv_curr_net_amt <> 0
3316: GROUP BY vendor_id,

Line 3407: ap_invoices inv,

3403: --Amt in Payment Currency = Invoice Currency
3404: BULK COLLECT INTO
3405: ap_payment_info_tab
3406: FROM
3407: ap_invoices inv,
3408: fun_net_ap_invs finv,
3409: ap_payment_schedules apps
3410: WHERE finv.invoice_id = inv.invoice_id
3411: AND apps.invoice_id = inv.invoice_id

Line 3433: ap_invoices inv,

3429: --Bug: 8359081
3430: SELECT amount_remaining
3431: BULK COLLECT INTO amtDueTab
3432: FROM
3433: ap_invoices inv,
3434: fun_net_ap_invs finv,
3435: ap_payment_schedules apps
3436: WHERE finv.invoice_id = inv.invoice_id
3437: AND apps.invoice_id = inv.invoice_id

Line 4791: fun_net_util.Log_String(g_event_level,l_path,'Before Settling ap invoices');

4787: END IF;
4788: --------------------------------------------------------------------
4789: /******************** Settle AP Transactions ***********************/
4790: --------------------------------------------------------------------
4791: fun_net_util.Log_String(g_event_level,l_path,'Before Settling ap invoices');
4792: settle_ap_invs(p_bank_acct_use_id => l_bank_acct_use_id,
4793: p_bank_acct_name => l_bank_acct_name,
4794: p_bank_acct_num => l_bank_acct_num,
4795: p_le_id => l_le_id,

Line 4798: fun_net_util.Log_String(g_event_level,l_path,'AP invoices settled successfully');

4794: p_bank_acct_num => l_bank_acct_num,
4795: p_le_id => l_le_id,
4796: p_bank_num => l_bank_num,
4797: x_return_status => l_return_status);
4798: fun_net_util.Log_String(g_event_level,l_path,'AP invoices settled successfully');
4799: IF l_return_status = FND_API.G_FALSE THEN
4800: fun_net_util.Log_String(g_event_level,l_path,
4801: 'Error in Settling AP Invoices');
4802: -- FND_MESSAGE.SET_NAME('FUN','FUN_NET_AP_SETTLE_FAIL');

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

4797: x_return_status => l_return_status);
4798: fun_net_util.Log_String(g_event_level,l_path,'AP invoices settled successfully');
4799: IF l_return_status = FND_API.G_FALSE THEN
4800: fun_net_util.Log_String(g_event_level,l_path,
4801: 'Error in Settling AP Invoices');
4802: -- FND_MESSAGE.SET_NAME('FUN','FUN_NET_AP_SETTLE_FAIL');
4803: RAISE FND_API.G_EXC_ERROR;
4804: END IF;
4805: /* -----------------------------------------------------------------*/