41: (2)Also raised exception if P_TOKEN is not null
42:
43: 5. 23-Aug-2005 Bug4559756. Added by Lakshmi Gopalsami version 120.3
44: (1) Added org_id in cursor c_ap_invoices_all
45: (2) Fetched the same before calling ap_utilities_pkg
46: and passed the same the package call.
47: To get the period name and date.
48:
49: 6. 22-nov-2005 Bug 47541213. Added by Lakshmi Gopalsami
109: Added variable lv_threshold_type_before and passed as input while calling get_tds_threshold_slab and process_threshold_rollback
110:
111: 18. 20-Jun-2012 amandali for bug 14185477
112: Description: India Cancel TDS invoice concurrent erroring out
113: Fix: Modified the variable to capture the p_gl_Date in call ap_utilities_pkg.get_open_gl_date.
114: ---------------------------------------------------------------------------- */
115:
116: /***********************************************************************************************/
117:
146: from JAI_CMN_TAXES_ALL
147: where tax_id = p_tax_id;
148:
149: /* Bug 4559756. Added by Lakshmi Gopalsami
150: Added org_id for passing it to ap_utilities_pkg
151:
152: */
153: cursor c_ap_invoices_all(p_invoice_id number) is
154: select invoice_id,
492: | so that the same will be passed for reversal line which will get
493: | created for cancellation.
494: */
495: --Check if the given date is in current open period
496: lv_open_period:= ap_utilities_pkg.get_current_gl_date
497: (P_Date => ld_accounting_date,
498: P_Org_Id => r_ap_invoices_all.org_id);
499: if lv_open_period is null then
500:
499: if lv_open_period is null then
500:
501: lv_codepath := jai_general_pkg.plot_codepath(1.1, lv_codepath); /* 1.1 */
502:
503: ap_utilities_pkg.get_open_gl_date
504: (
505: p_date => ld_accounting_date, /* In date */
506: p_period_name => lv_open_period, /* out Period */
507: p_gl_date => ld_ret_accounting_date, --ld_accounting_date, /* out date */ /* Modified for bug 14185477 */
660: | so that the same will be passed for reversal line which will get
661: | created for cancellation.
662: */
663: --Check if the given date is in current open period
664: lv_open_period:= ap_utilities_pkg.get_current_gl_date
665: (P_Date => ld_accounting_date,
666: P_Org_Id => r_ap_invoices_all.org_id);
667:
668:
669: if lv_open_period is null then
670:
671: lv_codepath := jai_general_pkg.plot_codepath(1.1, lv_codepath); /* 1.1 */
672:
673: ap_utilities_pkg.get_open_gl_date
674: (
675: p_date => ld_accounting_date, /* In date */
676: p_period_name => lv_open_period, /* out Period */
677: p_gl_date => ld_ret_accounting_date , --ld_accounting_date, /* out date */ /* Modified for bug 14185477 */