DBA Data[Home] [Help]

APPS.JAI_AP_TDS_GENERATION_PKG dependencies on GL_SETS_OF_BOOKS

Line 997: cursor c_gl_sets_of_books(cp_set_of_books_id number) is

993: )
994: and legal_entity_id = p_org_id /* Added the condition for bug 13715894 */
995: and p_accounting_date between start_date and end_date;
996:
997: cursor c_gl_sets_of_books(cp_set_of_books_id number) is
998: select currency_code
999: from gl_sets_of_books
1000: where set_of_books_id = cp_set_of_books_id;
1001:

Line 999: from gl_sets_of_books

995: and p_accounting_date between start_date and end_date;
996:
997: cursor c_gl_sets_of_books(cp_set_of_books_id number) is
998: select currency_code
999: from gl_sets_of_books
1000: where set_of_books_id = cp_set_of_books_id;
1001:
1002: /*Bug 5751783. Selected non-rounded value for calculation*/
1003:

Line 1104: r_gl_sets_of_books c_gl_sets_of_books%rowtype;

1100: --Addec by Jia for FP Bug#7431371, End
1101:
1102: ln_prepayment_app_amt number :=0; --xiao for Bug#6596019
1103: r_jai_ap_tds_thhold_grps c_jai_ap_tds_thhold_grps%rowtype;
1104: r_gl_sets_of_books c_gl_sets_of_books%rowtype;
1105: r_ja_in_tax_codes c_ja_in_tax_codes%rowtype;
1106:
1107: ln_count number:= 0;
1108: ln_cnt_already_processed number:= 0;

Line 1196: open c_gl_sets_of_books(p_set_of_books_id);

1192: and nvl(user_deleted_tax_flag, 'N') = 'Y';
1193:
1194: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
1195:
1196: open c_gl_sets_of_books(p_set_of_books_id);
1197: fetch c_gl_sets_of_books into r_gl_sets_of_books;
1198: close c_gl_sets_of_books;
1199:
1200: if r_gl_sets_of_books.currency_code <> p_invoice_currency_code then

Line 1197: fetch c_gl_sets_of_books into r_gl_sets_of_books;

1193:
1194: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
1195:
1196: open c_gl_sets_of_books(p_set_of_books_id);
1197: fetch c_gl_sets_of_books into r_gl_sets_of_books;
1198: close c_gl_sets_of_books;
1199:
1200: if r_gl_sets_of_books.currency_code <> p_invoice_currency_code then
1201: /* Foreign currency invoice */

Line 1198: close c_gl_sets_of_books;

1194: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
1195:
1196: open c_gl_sets_of_books(p_set_of_books_id);
1197: fetch c_gl_sets_of_books into r_gl_sets_of_books;
1198: close c_gl_sets_of_books;
1199:
1200: if r_gl_sets_of_books.currency_code <> p_invoice_currency_code then
1201: /* Foreign currency invoice */
1202: p_codepath := jai_general_pkg.plot_codepath(6.1, p_codepath); /* 6.1 */

Line 1200: if r_gl_sets_of_books.currency_code <> p_invoice_currency_code then

1196: open c_gl_sets_of_books(p_set_of_books_id);
1197: fetch c_gl_sets_of_books into r_gl_sets_of_books;
1198: close c_gl_sets_of_books;
1199:
1200: if r_gl_sets_of_books.currency_code <> p_invoice_currency_code then
1201: /* Foreign currency invoice */
1202: p_codepath := jai_general_pkg.plot_codepath(6.1, p_codepath); /* 6.1 */
1203: ln_exchange_rate := p_exchange_rate;
1204: end if;

Line 1361: If r_gl_sets_of_books.currency_code = p_invoice_currency_code then

1357: */
1358: /* Bug 7280925. Added by Lakshmi Gopalsami
1359: Commented the following code as this is being handled in
1360: generate_tds_invoicse and maintain_thhold_Grps
1361: If r_gl_sets_of_books.currency_code = p_invoice_currency_code then
1362: ln_tmp_tds_amt := round(ln_tax_amount,g_inr_currency_rounding);
1363: else
1364: ln_tmp_tds_amt := round(ln_tax_amount,g_fcy_currency_rounding);
1365: end if ;

Line 1997: cursor c_gl_sets_of_books(cp_set_of_books_id number) is

1993: from JAI_CMN_TAXES_ALL
1994: where tax_id = pn_tax_id;
1995:
1996:
1997: cursor c_gl_sets_of_books(cp_set_of_books_id number) is
1998: select currency_code
1999: from gl_sets_of_books
2000: where set_of_books_id = cp_set_of_books_id;
2001:

Line 1999: from gl_sets_of_books

1995:
1996:
1997: cursor c_gl_sets_of_books(cp_set_of_books_id number) is
1998: select currency_code
1999: from gl_sets_of_books
2000: where set_of_books_id = cp_set_of_books_id;
2001:
2002: cursor c_get_ja_in_ap_inv_id is
2003: select to_char(JAI_AP_TDS_THHOLD_TRXS_S1.nextval)--to_char(JAI_AP_TDS_INVOICE_NUM_S.nextval)commented by rchandan for bug#4487676

Line 2015: r_gl_sets_of_books c_gl_sets_of_books%rowtype;

2011: r_ap_invoices_all c_ap_invoices_all%rowtype;
2012: r_ja_in_tax_codes c_ja_in_tax_codes%rowtype;
2013: r_po_vendor_sites_all c_po_vendor_sites_all%rowtype;
2014: r_po_vendors c_po_vendors%rowtype;
2015: r_gl_sets_of_books c_gl_sets_of_books%rowtype;
2016: r_ap_payment_schedules_all c_ap_payment_schedules_all%rowtype;
2017:
2018:
2019: lv_source varchar2(30); --File.Sql.35 Cbabu := 'TDS';

Line 2124: open c_gl_sets_of_books(r_ap_invoices_all.set_of_books_id);

2120: open c_po_vendor_sites_all(r_ja_in_tax_codes.vendor_id, r_ja_in_tax_codes.vendor_site_id);
2121: fetch c_po_vendor_sites_all into r_po_vendor_sites_all;
2122: close c_po_vendor_sites_all;
2123:
2124: open c_gl_sets_of_books(r_ap_invoices_all.set_of_books_id);
2125: fetch c_gl_sets_of_books into r_gl_sets_of_books;
2126: close c_gl_sets_of_books;
2127:
2128: /*Bug # 7410219 - Derive the Section Name*/

Line 2125: fetch c_gl_sets_of_books into r_gl_sets_of_books;

2121: fetch c_po_vendor_sites_all into r_po_vendor_sites_all;
2122: close c_po_vendor_sites_all;
2123:
2124: open c_gl_sets_of_books(r_ap_invoices_all.set_of_books_id);
2125: fetch c_gl_sets_of_books into r_gl_sets_of_books;
2126: close c_gl_sets_of_books;
2127:
2128: /*Bug # 7410219 - Derive the Section Name*/
2129: if (r_ja_in_tax_codes.section_type = 'TDS_SECTION') then

Line 2126: close c_gl_sets_of_books;

2122: close c_po_vendor_sites_all;
2123:
2124: open c_gl_sets_of_books(r_ap_invoices_all.set_of_books_id);
2125: fetch c_gl_sets_of_books into r_gl_sets_of_books;
2126: close c_gl_sets_of_books;
2127:
2128: /*Bug # 7410219 - Derive the Section Name*/
2129: if (r_ja_in_tax_codes.section_type = 'TDS_SECTION') then
2130: lv_section_name := 'TDS';

Line 2348: p_invoice_currency_code => r_gl_sets_of_books.currency_code,

2344: p_gl_date => ld_accounting_date, --Added by Bgowrava for Bug#9186263
2345: p_vendor_id => r_ja_in_tax_codes.vendor_id,
2346: p_vendor_site_id => r_ja_in_tax_codes.vendor_site_id,
2347: p_invoice_amount => ln_invoice_to_tds_amount,
2348: p_invoice_currency_code => r_gl_sets_of_books.currency_code,
2349: p_exchange_rate => null,
2350: p_exchange_rate_type => null,
2351: p_exchange_date => null,
2352: p_terms_id => ln_terms_id,

Line 2411: IF r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code THEN --3

2407: /* Bug 12965614. Added by Avanija
2408: * Added the following condition to handle for prepayment unapplication for foreign currency invoices.
2409: */
2410: IF pv_tds_event = 'PREPAYMENT UNAPPLICATION' THEN --2
2411: IF r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code THEN --3
2412: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount, g_inr_currency_rounding);
2413: IF trunc(pd_creation_date) >= trunc(jai_ap_tds_generation_pkg.gd_tds_rounding_effective_date) THEN
2414: ln_invoice_to_vendor_amount := get_rnded_value(ln_invoice_to_vendor_amount);
2415: END IF;

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

2417: END IF; --3
2418:
2419: ELSE --2
2420:
2421: if r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code then
2422: /*START, Bgowrava for Bug#8995604 , Adding below IF statement to round the INR TDS CM invoice to
2423: the TDS rounding factor before converting it to a foreign currency CM*/
2424: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount, g_inr_currency_rounding);
2425: IF trunc(pd_creation_date) >= trunc(jai_ap_tds_generation_pkg.gd_tds_rounding_effective_date)

Line 2634: IF r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code THEN --3

2630: ln_tds_rnding_factor := 0;
2631: ln_tds_rnded_amt := pn_tax_amount;
2632: /* Added the below if condition for bug 12965614 */
2633: IF pv_tds_event = 'PREPAYMENT UNAPPLICATION' THEN --2
2634: IF r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code THEN --3
2635: ln_tds_rnded_amt := ROUND(pn_calc_tax_amount , g_inr_currency_rounding);
2636: IF (trunc(pd_creation_date) >= trunc(jai_ap_tds_generation_pkg.gd_tds_rounding_effective_date)) THEN --4
2637: ln_tds_rnding_factor := jai_ap_tds_generation_pkg.gn_tds_rounding_factor;
2638: ln_tds_rnded_amt := get_rnded_value(ln_tds_rnded_amt);

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

2642: ELSE --2
2643: /*IF pv_tds_event NOT IN
2644: -- Bug 7280925. commented by Lakshmi Gopalsami ('INVOICE CANCEL',
2645: ('PREPAYMENT UNAPPLICATION') THEN */
2646: IF r_ap_invoices_all.invoice_currency_code = r_gl_sets_of_books.currency_code THEN
2647: ln_tds_rnded_amt := ROUND(pn_tax_amount , g_inr_currency_rounding);
2648: --moved this if-endif block from below to here for bug#8995604
2649: ELSE
2650: ln_tds_rnded_amt := ROUND(pn_tax_amount , g_inr_currency_rounding);

Line 2727: r_gl_sets_of_books.currency_code ,

2723: r_ja_in_tax_codes.vendor_id ,
2724: r_ja_in_tax_codes.vendor_site_id ,
2725: lv_invoice_to_tds_num ,
2726: lv_invoice_to_tds_type ,
2727: r_gl_sets_of_books.currency_code ,
2728: ln_invoice_to_tds_amount ,
2729: r_ap_invoices_all.vendor_id ,
2730: r_ap_invoices_all.vendor_site_id ,
2731: lv_invoice_to_vendor_num ,