DBA Data[Home] [Help]

APPS.JAI_AP_TDS_GENERATION_PKG dependencies on AP_INVOICES_ALL

Line 554: lv_tds_invoice_num ap_invoices_all.invoice_num%type;

550: ln_threshold_slab_id_after number;
551: ln_threshold_slab_id_single number;
552: lv_generate_all_invoices varchar2(1);
553: ln_threshold_trx_id number;
554: lv_tds_invoice_num ap_invoices_all.invoice_num%type;
555: lv_tds_cm_num ap_invoices_all.invoice_num%type;
556:
557: lv_pan_no JAI_AP_TDS_VENDOR_HDRS.pan_no%type;
558: lv_tan_no jai_ap_tds_org_tan_v.org_tan_num %type; --rchandan for bug#4323338

Line 555: lv_tds_cm_num ap_invoices_all.invoice_num%type;

551: ln_threshold_slab_id_single number;
552: lv_generate_all_invoices varchar2(1);
553: ln_threshold_trx_id number;
554: lv_tds_invoice_num ap_invoices_all.invoice_num%type;
555: lv_tds_cm_num ap_invoices_all.invoice_num%type;
556:
557: lv_pan_no JAI_AP_TDS_VENDOR_HDRS.pan_no%type;
558: lv_tan_no jai_ap_tds_org_tan_v.org_tan_num %type; --rchandan for bug#4323338
559: ln_exchange_rate number;

Line 1216: cursor c_ap_invoices_all(cp_invoice_id number) is

1212: p_process_message out nocopy varchar2
1213: )
1214: is
1215:
1216: cursor c_ap_invoices_all(cp_invoice_id number) is
1217: select invoice_num,
1218: vendor_id,
1219: vendor_site_id,
1220: invoice_currency_code,

Line 1233: from ap_invoices_all

1229: org_id,
1230: nvl(exchange_rate, 1) exchange_rate,
1231: set_of_books_id,
1232: payment_method_code -- Bug 7109056
1233: from ap_invoices_all
1234: where invoice_id = cp_invoice_id;
1235:
1236: cursor c_po_vendor_sites_all(cp_vendor_id number, cp_vendor_site_id number) is
1237: select terms_id,

Line 1278: r_ap_invoices_all c_ap_invoices_all%rowtype;

1274: select payment_priority
1275: from ap_payment_schedules_all
1276: where invoice_id = p_invoice_id;
1277:
1278: r_ap_invoices_all c_ap_invoices_all%rowtype;
1279: r_ja_in_tax_codes c_ja_in_tax_codes%rowtype;
1280: r_po_vendor_sites_all c_po_vendor_sites_all%rowtype;
1281: r_po_vendors c_po_vendors%rowtype;
1282: r_gl_sets_of_books c_gl_sets_of_books%rowtype;

Line 1288: lv_invoice_to_tds_num ap_invoices_all.invoice_num%type;

1284:
1285:
1286: lv_source varchar2(30); --File.Sql.35 Cbabu := 'TDS';
1287:
1288: lv_invoice_to_tds_num ap_invoices_all.invoice_num%type;
1289: lv_invoice_to_vendor_num ap_invoices_all.invoice_num%type;
1290:
1291: lv_invoice_to_tds_type ap_invoices_all.invoice_type_lookup_code%type;
1292: lv_invoice_to_vendor_type ap_invoices_all.invoice_type_lookup_code%type;

Line 1289: lv_invoice_to_vendor_num ap_invoices_all.invoice_num%type;

1285:
1286: lv_source varchar2(30); --File.Sql.35 Cbabu := 'TDS';
1287:
1288: lv_invoice_to_tds_num ap_invoices_all.invoice_num%type;
1289: lv_invoice_to_vendor_num ap_invoices_all.invoice_num%type;
1290:
1291: lv_invoice_to_tds_type ap_invoices_all.invoice_type_lookup_code%type;
1292: lv_invoice_to_vendor_type ap_invoices_all.invoice_type_lookup_code%type;
1293:

Line 1291: lv_invoice_to_tds_type ap_invoices_all.invoice_type_lookup_code%type;

1287:
1288: lv_invoice_to_tds_num ap_invoices_all.invoice_num%type;
1289: lv_invoice_to_vendor_num ap_invoices_all.invoice_num%type;
1290:
1291: lv_invoice_to_tds_type ap_invoices_all.invoice_type_lookup_code%type;
1292: lv_invoice_to_vendor_type ap_invoices_all.invoice_type_lookup_code%type;
1293:
1294: ln_invoice_to_tds_id ap_invoices_all.invoice_id%type;
1295: ln_invoice_to_vendor_id ap_invoices_all.invoice_id%type;

Line 1292: lv_invoice_to_vendor_type ap_invoices_all.invoice_type_lookup_code%type;

1288: lv_invoice_to_tds_num ap_invoices_all.invoice_num%type;
1289: lv_invoice_to_vendor_num ap_invoices_all.invoice_num%type;
1290:
1291: lv_invoice_to_tds_type ap_invoices_all.invoice_type_lookup_code%type;
1292: lv_invoice_to_vendor_type ap_invoices_all.invoice_type_lookup_code%type;
1293:
1294: ln_invoice_to_tds_id ap_invoices_all.invoice_id%type;
1295: ln_invoice_to_vendor_id ap_invoices_all.invoice_id%type;
1296:

Line 1294: ln_invoice_to_tds_id ap_invoices_all.invoice_id%type;

1290:
1291: lv_invoice_to_tds_type ap_invoices_all.invoice_type_lookup_code%type;
1292: lv_invoice_to_vendor_type ap_invoices_all.invoice_type_lookup_code%type;
1293:
1294: ln_invoice_to_tds_id ap_invoices_all.invoice_id%type;
1295: ln_invoice_to_vendor_id ap_invoices_all.invoice_id%type;
1296:
1297: ln_invoice_to_tds_line_id ap_invoice_lines_interface.invoice_line_id%type;
1298: ln_invoice_to_vendor_line_id ap_invoice_lines_interface.invoice_line_id%type;

Line 1295: ln_invoice_to_vendor_id ap_invoices_all.invoice_id%type;

1291: lv_invoice_to_tds_type ap_invoices_all.invoice_type_lookup_code%type;
1292: lv_invoice_to_vendor_type ap_invoices_all.invoice_type_lookup_code%type;
1293:
1294: ln_invoice_to_tds_id ap_invoices_all.invoice_id%type;
1295: ln_invoice_to_vendor_id ap_invoices_all.invoice_id%type;
1296:
1297: ln_invoice_to_tds_line_id ap_invoice_lines_interface.invoice_line_id%type;
1298: ln_invoice_to_vendor_line_id ap_invoice_lines_interface.invoice_line_id%type;
1299:

Line 1318: lv_invoice_num ap_invoices_all.invoice_num%type;

1314: ld_accounting_date date;
1315: lv_open_period ap_invoice_distributions_all.period_name%type;
1316: ln_tax_amount number;
1317:
1318: lv_invoice_num ap_invoices_all.invoice_num%type;
1319: lv_source_attribute jai_ap_tds_invoices.source_attribute%TYPE ; --rchandan for bug#4428980
1320:
1321: ln_invoice_amount ap_invoices_all.invoice_amount%TYPE; --Added by Ramananda for Bug#4562801
1322:

Line 1321: ln_invoice_amount ap_invoices_all.invoice_amount%TYPE; --Added by Ramananda for Bug#4562801

1317:
1318: lv_invoice_num ap_invoices_all.invoice_num%type;
1319: lv_source_attribute jai_ap_tds_invoices.source_attribute%TYPE ; --rchandan for bug#4428980
1320:
1321: ln_invoice_amount ap_invoices_all.invoice_amount%TYPE; --Added by Ramananda for Bug#4562801
1322:
1323: lv_group_id VARCHAR2(80); --Added by Sanjikum for Bug#5131075(4722011)
1324:
1325: /* Bug 5722028. Added by Lakshmi Gopalsami

Line 1361: open c_ap_invoices_all(pn_invoice_id);

1357: p_process_message := 'TDS amount must be greater than 0 ';
1358: goto exit_from_procedure;
1359: end if;
1360:
1361: open c_ap_invoices_all(pn_invoice_id);
1362: fetch c_ap_invoices_all into r_ap_invoices_all;
1363: close c_ap_invoices_all;
1364:
1365: /*

Line 1362: fetch c_ap_invoices_all into r_ap_invoices_all;

1358: goto exit_from_procedure;
1359: end if;
1360:
1361: open c_ap_invoices_all(pn_invoice_id);
1362: fetch c_ap_invoices_all into r_ap_invoices_all;
1363: close c_ap_invoices_all;
1364:
1365: /*
1366: || moved this up from the under the cursor - c_po_vendor_sites_all by Ramananda for Bug#4562793

Line 1363: close c_ap_invoices_all;

1359: end if;
1360:
1361: open c_ap_invoices_all(pn_invoice_id);
1362: fetch c_ap_invoices_all into r_ap_invoices_all;
1363: close c_ap_invoices_all;
1364:
1365: /*
1366: || moved this up from the under the cursor - c_po_vendor_sites_all by Ramananda for Bug#4562793
1367: */

Line 1373: || open c_po_vendors(r_ap_invoices_all.vendor_id);

1369: fetch c_ja_in_tax_codes into r_ja_in_tax_codes;
1370: close c_ja_in_tax_codes;
1371:
1372: /*
1373: || open c_po_vendors(r_ap_invoices_all.vendor_id);
1374: || Commented the above and added the below by Ramananda for Bug#4562793
1375: */
1376: open c_po_vendors(r_ja_in_tax_codes.vendor_id);
1377: fetch c_po_vendors into r_po_vendors;

Line 1381: || open c_po_vendor_sites_all(r_ap_invoices_all.vendor_id, r_ap_invoices_all.vendor_site_id);

1377: fetch c_po_vendors into r_po_vendors;
1378: close c_po_vendors;
1379:
1380: /*
1381: || open c_po_vendor_sites_all(r_ap_invoices_all.vendor_id, r_ap_invoices_all.vendor_site_id);
1382: || Commented the above and added the below by sanjikum for Bug#4562793
1383: */
1384: open c_po_vendor_sites_all(r_ja_in_tax_codes.vendor_id, r_ja_in_tax_codes.vendor_site_id);
1385: fetch c_po_vendor_sites_all into r_po_vendor_sites_all;

Line 1388: open c_gl_sets_of_books(r_ap_invoices_all.set_of_books_id);

1384: open c_po_vendor_sites_all(r_ja_in_tax_codes.vendor_id, r_ja_in_tax_codes.vendor_site_id);
1385: fetch c_po_vendor_sites_all into r_po_vendor_sites_all;
1386: close c_po_vendor_sites_all;
1387:
1388: open c_gl_sets_of_books(r_ap_invoices_all.set_of_books_id);
1389: fetch c_gl_sets_of_books into r_gl_sets_of_books;
1390: close c_gl_sets_of_books;
1391:
1392:

Line 1419: lv_invoice_num := substr(r_ap_invoices_all.invoice_num, 1, 30);

1415: open c_get_ja_in_ap_inv_id;
1416: fetch c_get_ja_in_ap_inv_id into lv_ja_in_ap_inv_id;
1417: close c_get_ja_in_ap_inv_id;
1418:
1419: lv_invoice_num := substr(r_ap_invoices_all.invoice_num, 1, 30);
1420:
1421: /* Invoice Numbers, type for the invoice pair that is being created */
1422: if ( (pv_tds_event = 'INVOICE VALIDATE') or (pv_tds_event like 'THRESHOLD TRANSITION%') ) then
1423:

Line 1503: r_ap_invoices_all.org_id

1499: Added org_id to ap_utilities_pkg
1500: */
1501: lv_open_period:= ap_utilities_pkg.get_current_gl_date
1502: (pd_accounting_date,
1503: r_ap_invoices_all.org_id
1504: );
1505:
1506: /* Bug 4559756. Added by Lakshmi Gopalsami
1507: Added org_id to ap_utilities_pkg

Line 1517: r_ap_invoices_all.org_id

1513: (
1514: pd_accounting_date,
1515: lv_open_period,
1516: ld_accounting_date,
1517: r_ap_invoices_all.org_id
1518: );
1519:
1520: if lv_open_period is null then
1521: p_process_flag := 'E';

Line 1599: p_org_id => r_ap_invoices_all.org_id,

1595: p_voucher_num => lv_invoice_to_tds_num,
1596: --p_payment_method_lookup_code => lv_payment_method_lookup_code,
1597: --commented by Sanjikum for Bug#4482462
1598: p_pay_group_lookup_code => lv_pay_group_lookup_code,
1599: p_org_id => r_ap_invoices_all.org_id,
1600: p_attribute_category => 'India Original Invoice for TDS',
1601: p_attribute1 => pn_invoice_id,
1602: --added the below by Sanjikum for Bug#5131075(4722011)
1603: p_group_id => lv_group_id -- Bug# 6119216, changed to lv_group_id instead of to_char(p_invoice_id)

Line 1641: if r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code then

1637: */
1638: IF pv_tds_event NOT IN
1639: -- Bug 7280925. Commented by Lakshmi Gopalsami ('INVOICE CANCEL',
1640: ('PREPAYMENT UNAPPLICATION') THEN
1641: if r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code then
1642: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);
1643: ELSE
1644: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount, g_inr_currency_rounding);
1645: end if;

Line 1642: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);

1638: IF pv_tds_event NOT IN
1639: -- Bug 7280925. Commented by Lakshmi Gopalsami ('INVOICE CANCEL',
1640: ('PREPAYMENT UNAPPLICATION') THEN
1641: if r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code then
1642: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);
1643: ELSE
1644: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount, g_inr_currency_rounding);
1645: end if;
1646: fnd_file.put_line(FND_FILE.LOG, ' Bug 7280925 - value before round '||ln_invoice_to_vendor_amount);

Line 1660: if upper(r_ap_invoices_all.exchange_rate_type) = 'USER' then

1656: fnd_file.put_line(FND_FILE.LOG, ' Bug 7280925 - value after round per setup - vendor invoice'||ln_invoice_to_vendor_amount);
1657: END IF;
1658: END IF;
1659:
1660: if upper(r_ap_invoices_all.exchange_rate_type) = 'USER' then
1661: ln_exchange_rate := r_ap_invoices_all.exchange_rate;
1662: else
1663: ln_exchange_rate := null;
1664: end if;

Line 1661: ln_exchange_rate := r_ap_invoices_all.exchange_rate;

1657: END IF;
1658: END IF;
1659:
1660: if upper(r_ap_invoices_all.exchange_rate_type) = 'USER' then
1661: ln_exchange_rate := r_ap_invoices_all.exchange_rate;
1662: else
1663: ln_exchange_rate := null;
1664: end if;
1665:

Line 1676: p_invoice_date => r_ap_invoices_all.invoice_date,

1672: p_jai_source => lv_this_procedure,
1673: p_invoice_id => ln_invoice_to_vendor_id,
1674: p_invoice_num => lv_invoice_to_vendor_num,
1675: p_invoice_type_lookup_code => lv_invoice_to_vendor_type,
1676: p_invoice_date => r_ap_invoices_all.invoice_date,
1677: p_gl_date => ld_accounting_date,
1678: p_vendor_id => r_ap_invoices_all.vendor_id,
1679: p_vendor_site_id => r_ap_invoices_all.vendor_site_id,
1680: p_invoice_amount => ln_invoice_to_vendor_amount,

Line 1678: p_vendor_id => r_ap_invoices_all.vendor_id,

1674: p_invoice_num => lv_invoice_to_vendor_num,
1675: p_invoice_type_lookup_code => lv_invoice_to_vendor_type,
1676: p_invoice_date => r_ap_invoices_all.invoice_date,
1677: p_gl_date => ld_accounting_date,
1678: p_vendor_id => r_ap_invoices_all.vendor_id,
1679: p_vendor_site_id => r_ap_invoices_all.vendor_site_id,
1680: p_invoice_amount => ln_invoice_to_vendor_amount,
1681: p_invoice_currency_code => r_ap_invoices_all.invoice_currency_code,
1682: p_exchange_rate => ln_exchange_rate,

Line 1679: p_vendor_site_id => r_ap_invoices_all.vendor_site_id,

1675: p_invoice_type_lookup_code => lv_invoice_to_vendor_type,
1676: p_invoice_date => r_ap_invoices_all.invoice_date,
1677: p_gl_date => ld_accounting_date,
1678: p_vendor_id => r_ap_invoices_all.vendor_id,
1679: p_vendor_site_id => r_ap_invoices_all.vendor_site_id,
1680: p_invoice_amount => ln_invoice_to_vendor_amount,
1681: p_invoice_currency_code => r_ap_invoices_all.invoice_currency_code,
1682: p_exchange_rate => ln_exchange_rate,
1683: p_exchange_rate_type => r_ap_invoices_all.exchange_rate_type,

Line 1681: p_invoice_currency_code => r_ap_invoices_all.invoice_currency_code,

1677: p_gl_date => ld_accounting_date,
1678: p_vendor_id => r_ap_invoices_all.vendor_id,
1679: p_vendor_site_id => r_ap_invoices_all.vendor_site_id,
1680: p_invoice_amount => ln_invoice_to_vendor_amount,
1681: p_invoice_currency_code => r_ap_invoices_all.invoice_currency_code,
1682: p_exchange_rate => ln_exchange_rate,
1683: p_exchange_rate_type => r_ap_invoices_all.exchange_rate_type,
1684: p_exchange_date => r_ap_invoices_all.exchange_date,
1685: p_terms_id => r_ap_invoices_all.terms_id,

Line 1683: p_exchange_rate_type => r_ap_invoices_all.exchange_rate_type,

1679: p_vendor_site_id => r_ap_invoices_all.vendor_site_id,
1680: p_invoice_amount => ln_invoice_to_vendor_amount,
1681: p_invoice_currency_code => r_ap_invoices_all.invoice_currency_code,
1682: p_exchange_rate => ln_exchange_rate,
1683: p_exchange_rate_type => r_ap_invoices_all.exchange_rate_type,
1684: p_exchange_date => r_ap_invoices_all.exchange_date,
1685: p_terms_id => r_ap_invoices_all.terms_id,
1686: p_description => lv_invoice_to_vendor_num,
1687: p_last_update_date => sysdate,

Line 1684: p_exchange_date => r_ap_invoices_all.exchange_date,

1680: p_invoice_amount => ln_invoice_to_vendor_amount,
1681: p_invoice_currency_code => r_ap_invoices_all.invoice_currency_code,
1682: p_exchange_rate => ln_exchange_rate,
1683: p_exchange_rate_type => r_ap_invoices_all.exchange_rate_type,
1684: p_exchange_date => r_ap_invoices_all.exchange_date,
1685: p_terms_id => r_ap_invoices_all.terms_id,
1686: p_description => lv_invoice_to_vendor_num,
1687: p_last_update_date => sysdate,
1688: p_last_updated_by => fnd_global.user_id,

Line 1685: p_terms_id => r_ap_invoices_all.terms_id,

1681: p_invoice_currency_code => r_ap_invoices_all.invoice_currency_code,
1682: p_exchange_rate => ln_exchange_rate,
1683: p_exchange_rate_type => r_ap_invoices_all.exchange_rate_type,
1684: p_exchange_date => r_ap_invoices_all.exchange_date,
1685: p_terms_id => r_ap_invoices_all.terms_id,
1686: p_description => lv_invoice_to_vendor_num,
1687: p_last_update_date => sysdate,
1688: p_last_updated_by => fnd_global.user_id,
1689: p_last_update_login => fnd_global.login_id,

Line 1695: p_payment_method_code => r_ap_invoices_all.payment_method_code,

1691: p_created_by => fnd_global.user_id,
1692: p_source => lv_source,
1693: p_voucher_num => lv_invoice_to_vendor_num,
1694: -- Bug 7109056. Added by Lakshmi Gopalsami
1695: p_payment_method_code => r_ap_invoices_all.payment_method_code,
1696: --commented by Sanjikum for Bug#4482462
1697: p_pay_group_lookup_code => r_ap_invoices_all.pay_group_lookup_code,
1698: p_goods_received_date => r_ap_invoices_all.goods_received_date,
1699: p_invoice_received_date => r_ap_invoices_all.invoice_received_date,

Line 1697: p_pay_group_lookup_code => r_ap_invoices_all.pay_group_lookup_code,

1693: p_voucher_num => lv_invoice_to_vendor_num,
1694: -- Bug 7109056. Added by Lakshmi Gopalsami
1695: p_payment_method_code => r_ap_invoices_all.payment_method_code,
1696: --commented by Sanjikum for Bug#4482462
1697: p_pay_group_lookup_code => r_ap_invoices_all.pay_group_lookup_code,
1698: p_goods_received_date => r_ap_invoices_all.goods_received_date,
1699: p_invoice_received_date => r_ap_invoices_all.invoice_received_date,
1700: p_org_id => r_ap_invoices_all.org_id,
1701: p_attribute_category => 'India Original Invoice for TDS',

Line 1698: p_goods_received_date => r_ap_invoices_all.goods_received_date,

1694: -- Bug 7109056. Added by Lakshmi Gopalsami
1695: p_payment_method_code => r_ap_invoices_all.payment_method_code,
1696: --commented by Sanjikum for Bug#4482462
1697: p_pay_group_lookup_code => r_ap_invoices_all.pay_group_lookup_code,
1698: p_goods_received_date => r_ap_invoices_all.goods_received_date,
1699: p_invoice_received_date => r_ap_invoices_all.invoice_received_date,
1700: p_org_id => r_ap_invoices_all.org_id,
1701: p_attribute_category => 'India Original Invoice for TDS',
1702: p_attribute1 => pn_invoice_id,

Line 1699: p_invoice_received_date => r_ap_invoices_all.invoice_received_date,

1695: p_payment_method_code => r_ap_invoices_all.payment_method_code,
1696: --commented by Sanjikum for Bug#4482462
1697: p_pay_group_lookup_code => r_ap_invoices_all.pay_group_lookup_code,
1698: p_goods_received_date => r_ap_invoices_all.goods_received_date,
1699: p_invoice_received_date => r_ap_invoices_all.invoice_received_date,
1700: p_org_id => r_ap_invoices_all.org_id,
1701: p_attribute_category => 'India Original Invoice for TDS',
1702: p_attribute1 => pn_invoice_id,
1703: --commented the above and added the below by Sanjikum for Bug#5131075(4722011)

Line 1700: p_org_id => r_ap_invoices_all.org_id,

1696: --commented by Sanjikum for Bug#4482462
1697: p_pay_group_lookup_code => r_ap_invoices_all.pay_group_lookup_code,
1698: p_goods_received_date => r_ap_invoices_all.goods_received_date,
1699: p_invoice_received_date => r_ap_invoices_all.invoice_received_date,
1700: p_org_id => r_ap_invoices_all.org_id,
1701: p_attribute_category => 'India Original Invoice for TDS',
1702: p_attribute1 => pn_invoice_id,
1703: --commented the above and added the below by Sanjikum for Bug#5131075(4722011)
1704: p_group_id => lv_group_id

Line 1764: fnd_file.put_line(FND_FILE.LOG, 'org id '|| r_ap_invoices_all.org_id);

1760: fnd_file.put_line(FND_FILE.LOG, 'tax rate'|| r_ja_in_tax_codes.tax_rate);
1761: fnd_file.put_line(FND_FILE.LOG, 'tds amt'||ln_invoice_to_tds_amount);
1762: fnd_file.put_line(FND_FILE.LOG, 'sec code '||r_ja_in_tax_codes.section_code);
1763: fnd_file.put_line(FND_FILE.LOG, 'stformtype '||r_ja_in_tax_codes.stform_type);
1764: fnd_file.put_line(FND_FILE.LOG, 'org id '|| r_ap_invoices_all.org_id);
1765: fnd_file.put_line(FND_FILE.LOG, 'src att'||lv_source_attribute);
1766:
1767: IF NVL(ln_invoice_amount,0) <> 0 THEN --Added the condition by bgowrava for Bug#4549019
1768: insert into JAI_AP_TDS_INVOICES

Line 1802: --r_ap_invoices_all.org_id,

1798: r_ja_in_tax_codes.tax_rate,
1799: ln_invoice_to_tds_amount,
1800: r_ja_in_tax_codes.section_code,
1801: r_ja_in_tax_codes.stform_type,
1802: --r_ap_invoices_all.org_id,
1803: r_ap_invoices_all.org_id,
1804: lv_source_attribute, --rchandan for bug#4428980
1805: /* Ramananda for bug#4560109 during R12 Sanity Testing. Added the WHO columns */
1806: fnd_global.user_id ,

Line 1803: r_ap_invoices_all.org_id,

1799: ln_invoice_to_tds_amount,
1800: r_ja_in_tax_codes.section_code,
1801: r_ja_in_tax_codes.stform_type,
1802: --r_ap_invoices_all.org_id,
1803: r_ap_invoices_all.org_id,
1804: lv_source_attribute, --rchandan for bug#4428980
1805: /* Ramananda for bug#4560109 during R12 Sanity Testing. Added the WHO columns */
1806: fnd_global.user_id ,
1807: sysdate ,

Line 1821: IF r_ap_invoices_all.invoice_currency_code = r_gl_sets_of_books.currency_code THEN

1817: ln_tds_rnded_amt := pn_tax_amount;
1818: IF pv_tds_event NOT IN
1819: -- Bug 7280925. commented by Lakshmi Gopalsami ('INVOICE CANCEL',
1820: ('PREPAYMENT UNAPPLICATION') THEN
1821: IF r_ap_invoices_all.invoice_currency_code = r_gl_sets_of_books.currency_code THEN
1822: ln_tds_rnded_amt := ROUND(pn_tax_amount , g_inr_currency_rounding);
1823: ELSE
1824: ln_tds_rnded_amt := ROUND(pn_tax_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);
1825: END IF ;

Line 1824: ln_tds_rnded_amt := ROUND(pn_tax_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);

1820: ('PREPAYMENT UNAPPLICATION') THEN
1821: IF r_ap_invoices_all.invoice_currency_code = r_gl_sets_of_books.currency_code THEN
1822: ln_tds_rnded_amt := ROUND(pn_tax_amount , g_inr_currency_rounding);
1823: ELSE
1824: ln_tds_rnded_amt := ROUND(pn_tax_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);
1825: END IF ;
1826: fnd_file.put_line(FND_FILE.LOG, ' Bug 7280925 - value before round '||ln_tds_rnded_amt);
1827: IF (trunc(pd_creation_date) >=
1828: trunc(jai_ap_tds_generation_pkg.gd_tds_rounding_effective_date)

Line 1896: r_ap_invoices_all.vendor_id ,

1892: lv_invoice_to_tds_num ,
1893: lv_invoice_to_tds_type ,
1894: r_gl_sets_of_books.currency_code ,
1895: ln_invoice_to_tds_amount ,
1896: r_ap_invoices_all.vendor_id ,
1897: r_ap_invoices_all.vendor_site_id ,
1898: lv_invoice_to_vendor_num ,
1899: lv_invoice_to_vendor_type ,
1900: r_ap_invoices_all.invoice_currency_code ,

Line 1897: r_ap_invoices_all.vendor_site_id ,

1893: lv_invoice_to_tds_type ,
1894: r_gl_sets_of_books.currency_code ,
1895: ln_invoice_to_tds_amount ,
1896: r_ap_invoices_all.vendor_id ,
1897: r_ap_invoices_all.vendor_site_id ,
1898: lv_invoice_to_vendor_num ,
1899: lv_invoice_to_vendor_type ,
1900: r_ap_invoices_all.invoice_currency_code ,
1901: ln_invoice_to_vendor_amount ,

Line 1900: r_ap_invoices_all.invoice_currency_code ,

1896: r_ap_invoices_all.vendor_id ,
1897: r_ap_invoices_all.vendor_site_id ,
1898: lv_invoice_to_vendor_num ,
1899: lv_invoice_to_vendor_type ,
1900: r_ap_invoices_all.invoice_currency_code ,
1901: ln_invoice_to_vendor_amount ,
1902: r_ap_payment_schedules_all.payment_priority ,
1903: r_ap_invoices_all.exchange_rate ,
1904: fnd_global.user_id ,

Line 1903: r_ap_invoices_all.exchange_rate ,

1899: lv_invoice_to_vendor_type ,
1900: r_ap_invoices_all.invoice_currency_code ,
1901: ln_invoice_to_vendor_amount ,
1902: r_ap_payment_schedules_all.payment_priority ,
1903: r_ap_invoices_all.exchange_rate ,
1904: fnd_global.user_id ,
1905: sysdate ,
1906: fnd_global.user_id ,
1907: sysdate ,

Line 1984: lv_tds_invoice_num ap_invoices_all.invoice_num%type;

1980: r_jai_ap_tds_thhold_grps c_jai_ap_tds_thhold_grps%rowtype;
1981: r_ja_in_tax_codes c_ja_in_tax_codes%rowtype;
1982:
1983: ln_thhold_transition_tax_amt number;
1984: lv_tds_invoice_num ap_invoices_all.invoice_num%type;
1985: lv_tds_cm_num ap_invoices_all.invoice_num%type;
1986: ln_threshold_trx_id number;
1987: ln_threshold_grp_audit_id number;
1988: ln_threshold_grp_id number;

Line 1985: lv_tds_cm_num ap_invoices_all.invoice_num%type;

1981: r_ja_in_tax_codes c_ja_in_tax_codes%rowtype;
1982:
1983: ln_thhold_transition_tax_amt number;
1984: lv_tds_invoice_num ap_invoices_all.invoice_num%type;
1985: lv_tds_cm_num ap_invoices_all.invoice_num%type;
1986: ln_threshold_trx_id number;
1987: ln_threshold_grp_audit_id number;
1988: ln_threshold_grp_id number;
1989:

Line 2091: cursor c_ap_invoices_all(p_invoice_id number) is

2087: p_process_message out nocopy varchar2
2088: )
2089: is
2090:
2091: cursor c_ap_invoices_all(p_invoice_id number) is
2092: select vendor_id,
2093: vendor_site_id
2094: from ap_invoices_all
2095: where invoice_id = p_invoice_id;

Line 2094: from ap_invoices_all

2090:
2091: cursor c_ap_invoices_all(p_invoice_id number) is
2092: select vendor_id,
2093: vendor_site_id
2094: from ap_invoices_all
2095: where invoice_id = p_invoice_id;
2096:
2097: cursor c_ja_in_po_vendor_sites(p_vendor_id number, p_vendor_site_id number) is
2098: select nvl( approved_invoice_flag, 'N' ) approved_invoice_flag

Line 2104: r_ap_invoices_all c_ap_invoices_all%rowtype;

2100: where vendor_id = p_vendor_id
2101: and vendor_site_id = p_vendor_site_id;
2102:
2103:
2104: r_ap_invoices_all c_ap_invoices_all%rowtype;
2105:
2106: lb_result boolean;
2107: ln_import_request_id number;
2108: ln_approve_request_id number;

Line 2162: open c_ap_invoices_all(p_invoice_id);

2158: fnd_global.login_id
2159: );
2160:
2161: /* Get vendor and site for the invoice */
2162: open c_ap_invoices_all(p_invoice_id);
2163: fetch c_ap_invoices_all into r_ap_invoices_all;
2164: close c_ap_invoices_all;
2165:
2166: /* Check if Pre-approved TDS invoices setup has been set for the vendor */

Line 2163: fetch c_ap_invoices_all into r_ap_invoices_all;

2159: );
2160:
2161: /* Get vendor and site for the invoice */
2162: open c_ap_invoices_all(p_invoice_id);
2163: fetch c_ap_invoices_all into r_ap_invoices_all;
2164: close c_ap_invoices_all;
2165:
2166: /* Check if Pre-approved TDS invoices setup has been set for the vendor */
2167:

Line 2164: close c_ap_invoices_all;

2160:
2161: /* Get vendor and site for the invoice */
2162: open c_ap_invoices_all(p_invoice_id);
2163: fetch c_ap_invoices_all into r_ap_invoices_all;
2164: close c_ap_invoices_all;
2165:
2166: /* Check if Pre-approved TDS invoices setup has been set for the vendor */
2167:
2168: /* Check for vendor and site */

Line 2169: open c_ja_in_po_vendor_sites(r_ap_invoices_all.vendor_id, r_ap_invoices_all.vendor_site_id);

2165:
2166: /* Check if Pre-approved TDS invoices setup has been set for the vendor */
2167:
2168: /* Check for vendor and site */
2169: open c_ja_in_po_vendor_sites(r_ap_invoices_all.vendor_id, r_ap_invoices_all.vendor_site_id);
2170: fetch c_ja_in_po_vendor_sites into lv_approved_invoice_flag;
2171: close c_ja_in_po_vendor_sites;
2172:
2173: if nvl(lv_approved_invoice_flag, 'N') <> 'Y' then

Line 2175: open c_ja_in_po_vendor_sites(r_ap_invoices_all.vendor_id, 0);

2171: close c_ja_in_po_vendor_sites;
2172:
2173: if nvl(lv_approved_invoice_flag, 'N') <> 'Y' then
2174: /* Pre-approved TDS invoice is not set for vendor and site, Check for vendor and null site */
2175: open c_ja_in_po_vendor_sites(r_ap_invoices_all.vendor_id, 0);
2176: fetch c_ja_in_po_vendor_sites into lv_approved_invoice_flag;
2177: close c_ja_in_po_vendor_sites;
2178: end if;
2179:

Line 2200: r_ap_invoices_all.vendor_id,

2196: sysdate,
2197: false,
2198: ln_import_request_id,
2199: p_invoice_id,
2200: r_ap_invoices_all.vendor_id,
2201: r_ap_invoices_all.vendor_site_id,
2202: p_start_thhold_trx_id
2203: );
2204:

Line 2201: r_ap_invoices_all.vendor_site_id,

2197: false,
2198: ln_import_request_id,
2199: p_invoice_id,
2200: r_ap_invoices_all.vendor_id,
2201: r_ap_invoices_all.vendor_site_id,
2202: p_start_thhold_trx_id
2203: );
2204:
2205:

Line 2246: FROM ap_invoices_all

2242:
2243: CURSOR c_jai_chk_tds_inv (p_invoice_id number) IS
2244: SELECT invoice_id, org_id,
2245: set_of_books_id -- bug 6819855. Added by Lakshmi Gopalsami
2246: FROM ap_invoices_all
2247: WHERE invoice_id = p_invoice_id;
2248:
2249: lb_request_status boolean;
2250: lv_phase varchar2(100);

Line 2525: ln_invoice_id ap_invoices_all.invoice_id%type;

2521: and vendor_site_id = p_vendor_site_id
2522: and invoice_to_vendor_id is null;
2523:
2524: ln_threshold_trx_id jai_ap_tds_thhold_trxs.threshold_trx_id%type;
2525: ln_invoice_id ap_invoices_all.invoice_id%type;
2526:
2527:
2528: begin
2529:

Line 3091: from ap_invoices_all

3087:
3088: -- Bug 5722028. Added by Lakshmi Gopalsami
3089: cursor get_creation_date is
3090: select creation_date
3091: from ap_invoices_all
3092: where invoice_id = p_invoice_id;
3093: ld_creation_date DATE;
3094: -- End for bug 5722028.
3095:

Line 3189: ap_invoices_all b

3185: b.invoice_currency_code,
3186: b.exchange_rate,
3187: b.set_of_books_id
3188: FROM ap_invoice_distributions_all a,
3189: ap_invoices_all b
3190: WHERE a.invoice_id = b.invoice_id
3191: AND b.invoice_id = p_invoice_id
3192: AND a.line_type_lookup_code = 'PREPAY'
3193: AND b.source <> 'TDS'

Line 3499: lv_tds_invoice_num ap_invoices_all.invoice_num%type;

3495: r_threshold_grp c_threshold_grp%ROWTYPE;
3496: v_si_flag VARCHAR2(1);
3497: v_pp_flag VARCHAR2(1);
3498: lv_tds_event jai_ap_tds_thhold_trxs.tds_event%TYPE;
3499: lv_tds_invoice_num ap_invoices_all.invoice_num%type;
3500: lv_tds_cm_num ap_invoices_all.invoice_num%type;
3501: ln_threshold_trx_id jai_ap_tds_thhold_trxs.threshold_trx_id%TYPE;
3502: ln_threshold_grp_audit_id jai_ap_tds_thgrp_audits.threshold_grp_audit_id%TYPE;
3503: ln_threshold_grp_id jai_ap_tds_thhold_grps.threshold_grp_id%TYPE;

Line 3500: lv_tds_cm_num ap_invoices_all.invoice_num%type;

3496: v_si_flag VARCHAR2(1);
3497: v_pp_flag VARCHAR2(1);
3498: lv_tds_event jai_ap_tds_thhold_trxs.tds_event%TYPE;
3499: lv_tds_invoice_num ap_invoices_all.invoice_num%type;
3500: lv_tds_cm_num ap_invoices_all.invoice_num%type;
3501: ln_threshold_trx_id jai_ap_tds_thhold_trxs.threshold_trx_id%TYPE;
3502: ln_threshold_grp_audit_id jai_ap_tds_thgrp_audits.threshold_grp_audit_id%TYPE;
3503: ln_threshold_grp_id jai_ap_tds_thhold_grps.threshold_grp_id%TYPE;
3504: