DBA Data[Home] [Help]

APPS.JAI_AP_TDS_OLD_PKG dependencies on AP_INVOICES_INTERFACE

Line 55: Fix : Commented the voucher_num insert into the ap_invoices_interface table

51: Dependencies Due to this bug:-
52: None
53: Bug 4870243, File version 120.5
54: Issue : Invoice Import Program is rejecting the Invoices.
55: Fix : Commented the voucher_num insert into the ap_invoices_interface table
56: 4 23/02/07 bduvarag for bug#4716884,File version 120.7
57: Forward porting the changes done in 11i bug 4629783
58:
59: ------------------------------------------------------------------------------------------------------------------------*/

Line 218: lv_invoice_num ap_invoices_interface.invoice_num%type; --rchandan for bug#4428980

214: v_return_value boolean;
215: ln_invoice_id NUMBER; --4333449
216: ln_prnt_pay_priority ap_payment_schedules_all.payment_priority%TYPE; -- 4333449
217: ln_prnt_exchange_rate ap_invoices_all.exchange_rate%TYPE; --4333449
218: lv_invoice_num ap_invoices_interface.invoice_num%type; --rchandan for bug#4428980
219: lv_description ap_invoices_interface.description%type;--rchandan for bug#4428980
220: lv_lookup_type_code ap_invoices_interface.invoice_type_lookup_code%type;--rchandan for bug#4428980
221: lv_source ap_invoices_interface.source%type;--rchandan for bug#4428980
222: lv_voucher_num ap_invoices_interface.voucher_num%type;--rchandan for bug#4428980

Line 219: lv_description ap_invoices_interface.description%type;--rchandan for bug#4428980

215: ln_invoice_id NUMBER; --4333449
216: ln_prnt_pay_priority ap_payment_schedules_all.payment_priority%TYPE; -- 4333449
217: ln_prnt_exchange_rate ap_invoices_all.exchange_rate%TYPE; --4333449
218: lv_invoice_num ap_invoices_interface.invoice_num%type; --rchandan for bug#4428980
219: lv_description ap_invoices_interface.description%type;--rchandan for bug#4428980
220: lv_lookup_type_code ap_invoices_interface.invoice_type_lookup_code%type;--rchandan for bug#4428980
221: lv_source ap_invoices_interface.source%type;--rchandan for bug#4428980
222: lv_voucher_num ap_invoices_interface.voucher_num%type;--rchandan for bug#4428980
223: -- End for bug#3536079

Line 220: lv_lookup_type_code ap_invoices_interface.invoice_type_lookup_code%type;--rchandan for bug#4428980

216: ln_prnt_pay_priority ap_payment_schedules_all.payment_priority%TYPE; -- 4333449
217: ln_prnt_exchange_rate ap_invoices_all.exchange_rate%TYPE; --4333449
218: lv_invoice_num ap_invoices_interface.invoice_num%type; --rchandan for bug#4428980
219: lv_description ap_invoices_interface.description%type;--rchandan for bug#4428980
220: lv_lookup_type_code ap_invoices_interface.invoice_type_lookup_code%type;--rchandan for bug#4428980
221: lv_source ap_invoices_interface.source%type;--rchandan for bug#4428980
222: lv_voucher_num ap_invoices_interface.voucher_num%type;--rchandan for bug#4428980
223: -- End for bug#3536079
224:

Line 221: lv_source ap_invoices_interface.source%type;--rchandan for bug#4428980

217: ln_prnt_exchange_rate ap_invoices_all.exchange_rate%TYPE; --4333449
218: lv_invoice_num ap_invoices_interface.invoice_num%type; --rchandan for bug#4428980
219: lv_description ap_invoices_interface.description%type;--rchandan for bug#4428980
220: lv_lookup_type_code ap_invoices_interface.invoice_type_lookup_code%type;--rchandan for bug#4428980
221: lv_source ap_invoices_interface.source%type;--rchandan for bug#4428980
222: lv_voucher_num ap_invoices_interface.voucher_num%type;--rchandan for bug#4428980
223: -- End for bug#3536079
224:
225: -- bug#3607133

Line 222: lv_voucher_num ap_invoices_interface.voucher_num%type;--rchandan for bug#4428980

218: lv_invoice_num ap_invoices_interface.invoice_num%type; --rchandan for bug#4428980
219: lv_description ap_invoices_interface.description%type;--rchandan for bug#4428980
220: lv_lookup_type_code ap_invoices_interface.invoice_type_lookup_code%type;--rchandan for bug#4428980
221: lv_source ap_invoices_interface.source%type;--rchandan for bug#4428980
222: lv_voucher_num ap_invoices_interface.voucher_num%type;--rchandan for bug#4428980
223: -- End for bug#3536079
224:
225: -- bug#3607133
226: cursor c_get_cm_status(p_invoice_num in varchar2,

Line 293: as invoice_date into ap_invoices_interface and as accounting_date into

289: Added the check to populate the period name of the current accounting period.
290:
291: 8. 15-oct-2003 kpvs for bug # 3109138, version # 616.2
292: Changed the procedure to insert v_open_gl_date instead of trunc(sysdate)
293: as invoice_date into ap_invoices_interface and as accounting_date into
294: ap_invoice_lines_interface.
295: This is for the invoice_date and GL date of the SI created for
296: supplier on cancellation of the vendor invoice.
297:

Line 683: INSERT INTO ap_invoices_interface

679: );
680: /* ends additions by ssumaith - bug# 4448789*/
681:
682:
683: INSERT INTO ap_invoices_interface
684: (
685: invoice_id,
686: invoice_num,
687: invoice_type_lookup_code,

Line 715: ap_invoices_interface_s.NEXTVAL,

711: group_id /*Bug 4716884 bduvarag*/
712: )
713: VALUES
714: (
715: ap_invoices_interface_s.NEXTVAL,
716: lv_invoice_num,
717: lv_lookup_type_code,
718: v_open_gl_date, -- bug 3109138 TRUNC( SYSDATE ),
719: for_std_invoice_rec.vendor_id,

Line 764: ap_invoices_interface_s.CURRVAL,

760: last_update_login
761: )
762: VALUES
763: (
764: ap_invoices_interface_s.CURRVAL,
765: ap_invoice_lines_interface_s.NEXTVAL,
766: 1, --THERE WILL ALWAYS BE ONLY ONE LINE.
767: lv_lookup_type_code, --rchandan for bug#4428980
768: new_std_invoice_amount,

Line 1183: lv_invoice_num ap_invoices_interface.invoice_num%type; --rchandan for bug#4428980

1179: ln_prnt_exchange_rate ap_invoices_all.exchange_rate%TYPE;
1180: ln_tax_rate JAI_AP_TDS_INVOICES.tds_tax_rate%type;
1181: ln_tax_amount JAI_AP_TDS_INVOICES.tds_amount%type;
1182: ln_taxable_amount JAI_AP_TDS_INVOICES.invoice_amount%type;
1183: lv_invoice_num ap_invoices_interface.invoice_num%type; --rchandan for bug#4428980
1184: lv_description ap_invoices_interface.description%type; --rchandan for bug#4428980
1185: lv_lookup_type_code ap_invoices_interface.invoice_type_lookup_code%TYPE; --rchandan for bug#4428980
1186: lv_source ap_invoices_interface.source%type; --rchandan for bug#4428980
1187: lv_voucher_num ap_invoices_interface.voucher_num%type;--rchandan for bug#4428980

Line 1184: lv_description ap_invoices_interface.description%type; --rchandan for bug#4428980

1180: ln_tax_rate JAI_AP_TDS_INVOICES.tds_tax_rate%type;
1181: ln_tax_amount JAI_AP_TDS_INVOICES.tds_amount%type;
1182: ln_taxable_amount JAI_AP_TDS_INVOICES.invoice_amount%type;
1183: lv_invoice_num ap_invoices_interface.invoice_num%type; --rchandan for bug#4428980
1184: lv_description ap_invoices_interface.description%type; --rchandan for bug#4428980
1185: lv_lookup_type_code ap_invoices_interface.invoice_type_lookup_code%TYPE; --rchandan for bug#4428980
1186: lv_source ap_invoices_interface.source%type; --rchandan for bug#4428980
1187: lv_voucher_num ap_invoices_interface.voucher_num%type;--rchandan for bug#4428980
1188: /* ramanand for SQL BIND Compliance */

Line 1185: lv_lookup_type_code ap_invoices_interface.invoice_type_lookup_code%TYPE; --rchandan for bug#4428980

1181: ln_tax_amount JAI_AP_TDS_INVOICES.tds_amount%type;
1182: ln_taxable_amount JAI_AP_TDS_INVOICES.invoice_amount%type;
1183: lv_invoice_num ap_invoices_interface.invoice_num%type; --rchandan for bug#4428980
1184: lv_description ap_invoices_interface.description%type; --rchandan for bug#4428980
1185: lv_lookup_type_code ap_invoices_interface.invoice_type_lookup_code%TYPE; --rchandan for bug#4428980
1186: lv_source ap_invoices_interface.source%type; --rchandan for bug#4428980
1187: lv_voucher_num ap_invoices_interface.voucher_num%type;--rchandan for bug#4428980
1188: /* ramanand for SQL BIND Compliance */
1189: lv_rtn_tds_inv VARCHAR2(100);

Line 1186: lv_source ap_invoices_interface.source%type; --rchandan for bug#4428980

1182: ln_taxable_amount JAI_AP_TDS_INVOICES.invoice_amount%type;
1183: lv_invoice_num ap_invoices_interface.invoice_num%type; --rchandan for bug#4428980
1184: lv_description ap_invoices_interface.description%type; --rchandan for bug#4428980
1185: lv_lookup_type_code ap_invoices_interface.invoice_type_lookup_code%TYPE; --rchandan for bug#4428980
1186: lv_source ap_invoices_interface.source%type; --rchandan for bug#4428980
1187: lv_voucher_num ap_invoices_interface.voucher_num%type;--rchandan for bug#4428980
1188: /* ramanand for SQL BIND Compliance */
1189: lv_rtn_tds_inv VARCHAR2(100);
1190: lv_rtn_tds_auth VARCHAR2(100);

Line 1187: lv_voucher_num ap_invoices_interface.voucher_num%type;--rchandan for bug#4428980

1183: lv_invoice_num ap_invoices_interface.invoice_num%type; --rchandan for bug#4428980
1184: lv_description ap_invoices_interface.description%type; --rchandan for bug#4428980
1185: lv_lookup_type_code ap_invoices_interface.invoice_type_lookup_code%TYPE; --rchandan for bug#4428980
1186: lv_source ap_invoices_interface.source%type; --rchandan for bug#4428980
1187: lv_voucher_num ap_invoices_interface.voucher_num%type;--rchandan for bug#4428980
1188: /* ramanand for SQL BIND Compliance */
1189: lv_rtn_tds_inv VARCHAR2(100);
1190: lv_rtn_tds_auth VARCHAR2(100);
1191:

Line 1244: This date is inserted as invoice_date into ap_invoices_interface

1240: 7 15/10/2003 kpvs for bug # 3112711, version 616.1
1241: Cursor get_prepay_dist_date incorporated to get the GL date of the distribution line
1242: created in ap_invoice_distributions_all .
1243:
1244: This date is inserted as invoice_date into ap_invoices_interface
1245: and as accounting_date into ap_invoice_lines_interface.
1246: This would ensure that the invoice date and GL date of the TDS invoices
1247: are in sync with the date entered on Apply/Unapply prepayment screen if the
1248: user changes this date.

Line 1463: INSERT INTO ap_invoices_interface

1459: );
1460: /* ends additions by ssumaith - bug# 4448789*/
1461:
1462:
1463: INSERT INTO ap_invoices_interface
1464: (
1465: invoice_id,
1466: invoice_num,
1467: invoice_type_lookup_code,

Line 1495: ap_invoices_interface_s.NEXTVAL,

1491: group_id /*Bug 4716884*/
1492: )
1493: VALUES
1494: (
1495: ap_invoices_interface_s.NEXTVAL,
1496: lv_rtn_tds_inv, --'RTN/'|| v_tds_inv_num ||'/'||TO_CHAR(v_tds_inv_run_num),
1497: 'STANDARD',
1498: v_prepay_dist_date, -- bug 3112711 kpvs TRUNC( SYSDATE ), --for_std_inv_tds_rec.invoice_date,
1499: for_std_inv_tds_rec.vendor_id,

Line 1547: ap_invoices_interface_s.CURRVAL,

1543: last_update_login
1544: )
1545: VALUES
1546: (
1547: ap_invoices_interface_s.CURRVAL,
1548: ap_invoice_lines_interface_s.NEXTVAL,
1549: 1, --THERE WILL ALWAYS BE ONLY ONE LINE.
1550: lv_lookup_type_code,
1551: v_insertion_amount_tds_si , -- insertion_amount, bug#3469847

Line 1600: INSERT INTO ap_invoices_interface

1596: /* ends additions by ssumaith - bug# 4448789*/
1597:
1598:
1599:
1600: INSERT INTO ap_invoices_interface
1601: (
1602: invoice_id,
1603: invoice_num,
1604: invoice_type_lookup_code,

Line 1632: ap_invoices_interface_s.NEXTVAL,

1628: group_id /*Bug 4716884*/
1629: )
1630: VALUES
1631: (
1632: ap_invoices_interface_s.NEXTVAL,
1633: lv_invoice_num, --rchandan for bug#4428980
1634: lv_lookup_type_code, --rchandan for bug#4428980
1635: v_prepay_dist_date, -- bug 3112711 kpvs TRUNC( SYSDATE ),
1636: for_std_inv_rec.vendor_id,

Line 1683: ap_invoices_interface_s.CURRVAL,

1679: last_update_login
1680: )
1681: VALUES
1682: (
1683: ap_invoices_interface_s.CURRVAL,
1684: ap_invoice_lines_interface_s.NEXTVAL,
1685: 1, --THERE WILL ALWAYS BE ONLY ONE LINE.
1686: lv_lookup_type_code, --rchandan for bug#4428980
1687: (-1) * insertion_amount,

Line 2021: v_ja_ap_invoices_interface_no NUMBER; -- added by Aparajita on 14-may-2002 for bug # 2364106.

2017: -- end addition by Aparajita on 20 mar 2002
2018:
2019: v_tds_cm_num VARCHAR2(60); -- Added by Aparajita for bug # 2338345 on 19th April'02
2020:
2021: v_ja_ap_invoices_interface_no NUMBER; -- added by Aparajita on 14-may-2002 for bug # 2364106.
2022: v_ap_invoices_interface_no NUMBER; -- added by Aparajita on 14-may-2002 for bug # 2364106.
2023:
2024: v_Approved_Invoice_Flag CHAR(1); -- := 'N';-- added by Aparajita on 29/07/2002 for bug # 2475416 --Ramananda for File.Sql.35
2025:

Line 2022: v_ap_invoices_interface_no NUMBER; -- added by Aparajita on 14-may-2002 for bug # 2364106.

2018:
2019: v_tds_cm_num VARCHAR2(60); -- Added by Aparajita for bug # 2338345 on 19th April'02
2020:
2021: v_ja_ap_invoices_interface_no NUMBER; -- added by Aparajita on 14-may-2002 for bug # 2364106.
2022: v_ap_invoices_interface_no NUMBER; -- added by Aparajita on 14-may-2002 for bug # 2364106.
2023:
2024: v_Approved_Invoice_Flag CHAR(1); -- := 'N';-- added by Aparajita on 29/07/2002 for bug # 2475416 --Ramananda for File.Sql.35
2025:
2026:

Line 2391: This date is inserted as invoice_date into ap_invoices_interface and as

2387: Cursor get_prepay_dist_date incorporated to get the GL date of the negative
2388: distribution line created in ap_invoice_distributions_all when the prepay invoice
2389: is applied to a standard invoice.
2390:
2391: This date is inserted as invoice_date into ap_invoices_interface and as
2392: accounting_date into ap_invoice_lines_interface. This would ensure that the CM for
2393: TDS authority and SI for the supplier that get created on cancellation of a vendor
2394: invoice, would bear proper invoice date and GL date instead of sysdate.
2395:

Line 2648: v_ja_ap_invoices_interface_no := NULL;

2644: FETCH get_exchange_rate_base_inv INTO get_exchange_rate_base_inv_rec;
2645: CLOSE get_exchange_rate_base_inv;
2646: --end 03-Jan-2002
2647:
2648: v_ja_ap_invoices_interface_no := NULL;
2649: SELECT JAI_AP_TDS_THHOLD_TRXS_S1.nextval--JAI_AP_TDS_INVOICE_NUM_S.NEXTVAL changed by rchandan for bug#4487676
2650: INTO v_ja_ap_invoices_interface_no
2651: FROM dual;
2652:

Line 2650: INTO v_ja_ap_invoices_interface_no

2646: --end 03-Jan-2002
2647:
2648: v_ja_ap_invoices_interface_no := NULL;
2649: SELECT JAI_AP_TDS_THHOLD_TRXS_S1.nextval--JAI_AP_TDS_INVOICE_NUM_S.NEXTVAL changed by rchandan for bug#4487676
2650: INTO v_ja_ap_invoices_interface_no
2651: FROM dual;
2652:
2653: v_ap_invoices_interface_no := NULL;
2654: SELECT ap_invoices_interface_s.NEXTVAL

Line 2653: v_ap_invoices_interface_no := NULL;

2649: SELECT JAI_AP_TDS_THHOLD_TRXS_S1.nextval--JAI_AP_TDS_INVOICE_NUM_S.NEXTVAL changed by rchandan for bug#4487676
2650: INTO v_ja_ap_invoices_interface_no
2651: FROM dual;
2652:
2653: v_ap_invoices_interface_no := NULL;
2654: SELECT ap_invoices_interface_s.NEXTVAL
2655: INTO v_ap_invoices_interface_no
2656: FROM dual;
2657:

Line 2654: SELECT ap_invoices_interface_s.NEXTVAL

2650: INTO v_ja_ap_invoices_interface_no
2651: FROM dual;
2652:
2653: v_ap_invoices_interface_no := NULL;
2654: SELECT ap_invoices_interface_s.NEXTVAL
2655: INTO v_ap_invoices_interface_no
2656: FROM dual;
2657:
2658: Open get_prepay_dist_date; -- bug 3112711 kpvs

Line 2655: INTO v_ap_invoices_interface_no

2651: FROM dual;
2652:
2653: v_ap_invoices_interface_no := NULL;
2654: SELECT ap_invoices_interface_s.NEXTVAL
2655: INTO v_ap_invoices_interface_no
2656: FROM dual;
2657:
2658: Open get_prepay_dist_date; -- bug 3112711 kpvs
2659: fetch get_prepay_dist_date into v_prepay_dist_date;

Line 2663: 'BEFORE INSERTING INTO ap_invoices_interface 1 : CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX');

2659: fetch get_prepay_dist_date into v_prepay_dist_date;
2660: close get_prepay_dist_date;
2661:
2662: Fnd_File.put_line(Fnd_File.LOG,
2663: 'BEFORE INSERTING INTO ap_invoices_interface 1 : CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX');
2664:
2665: v_stage:=7;
2666:
2667: /* Modified by Ramananda for bug# 4407184 ,start */

Line 2670: lv_tds_cm_num := v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no);

2666:
2667: /* Modified by Ramananda for bug# 4407184 ,start */
2668:
2669:
2670: lv_tds_cm_num := v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no);
2671: lv_credit_note_tds := 'CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX '||for_std_invoice_tds_rec.invoice_num||' OR '||TO_CHAR(p_invoice_id) ;
2672: lv_invoice_num_cm := for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no) ;
2673:
2674:

Line 2672: lv_invoice_num_cm := for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no) ;

2668:
2669:
2670: lv_tds_cm_num := v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no);
2671: lv_credit_note_tds := 'CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX '||for_std_invoice_tds_rec.invoice_num||' OR '||TO_CHAR(p_invoice_id) ;
2672: lv_invoice_num_cm := for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no) ;
2673:
2674:
2675: /* start additions by ssumaith - bug# 4448789 */
2676: jai_cmn_utils_pkg.GET_LE_INFO(

Line 2692: INSERT INTO ap_invoices_interface (

2688: );
2689: /* ends additions by ssumaith - bug# 4448789*/
2690:
2691:
2692: INSERT INTO ap_invoices_interface (
2693: invoice_id,
2694: invoice_num,
2695: invoice_type_lookup_code,
2696: invoice_date,

Line 2719: v_ap_invoices_interface_no,

2715: last_update_date,
2716: last_update_login,
2717: group_id /*Bug 4716884*/
2718: ) VALUES (
2719: v_ap_invoices_interface_no,
2720: --for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
2721: -- v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL)
2722: lv_tds_cm_num , --v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
2723: -- the line below is being commented and replaced by line above by Aparajita on 29 apr 2002 for bug 2338345

Line 2720: --for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),

2716: last_update_login,
2717: group_id /*Bug 4716884*/
2718: ) VALUES (
2719: v_ap_invoices_interface_no,
2720: --for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
2721: -- v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL)
2722: lv_tds_cm_num , --v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
2723: -- the line below is being commented and replaced by line above by Aparajita on 29 apr 2002 for bug 2338345
2724: -- var_tds_invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),

Line 2721: -- v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL)

2717: group_id /*Bug 4716884*/
2718: ) VALUES (
2719: v_ap_invoices_interface_no,
2720: --for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
2721: -- v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL)
2722: lv_tds_cm_num , --v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
2723: -- the line below is being commented and replaced by line above by Aparajita on 29 apr 2002 for bug 2338345
2724: -- var_tds_invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
2725: 'CREDIT',

Line 2722: lv_tds_cm_num , --v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),

2718: ) VALUES (
2719: v_ap_invoices_interface_no,
2720: --for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
2721: -- v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL)
2722: lv_tds_cm_num , --v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
2723: -- the line below is being commented and replaced by line above by Aparajita on 29 apr 2002 for bug 2338345
2724: -- var_tds_invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
2725: 'CREDIT',
2726: v_prepay_dist_date,-- bug 3112711 kpvs --TRUNC( SYSDATE ), --for_std_invoice_tds_rec.invoice_date,

Line 2724: -- var_tds_invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),

2720: --for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
2721: -- v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL)
2722: lv_tds_cm_num , --v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
2723: -- the line below is being commented and replaced by line above by Aparajita on 29 apr 2002 for bug 2338345
2724: -- var_tds_invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
2725: 'CREDIT',
2726: v_prepay_dist_date,-- bug 3112711 kpvs --TRUNC( SYSDATE ), --for_std_invoice_tds_rec.invoice_date,
2727: for_std_invoice_tds_rec.vendor_id,
2728: for_std_invoice_tds_rec.vendor_site_id,

Line 2738: -- for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.CURRVAL),

2734: for_std_invoice_tds_rec.exchange_date,
2735: for_std_invoice_tds_rec.terms_id,
2736: lv_credit_note_tds, --'CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX '||for_std_invoice_tds_rec.invoice_num||' OR '||TO_CHAR(p_invoice_id) ,
2737: 'INDIA TDS', /* --'TDS',--Ramanand for bug#4388958 */
2738: -- for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.CURRVAL),
2739: -- lv_invoice_num_cm, --for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no), Harshita for Bug 4870243
2740: for_std_invoice_tds_rec.payment_method_lookup_code,
2741: for_std_invoice_tds_rec.pay_group_lookup_code,
2742: p_org_id,

Line 2739: -- lv_invoice_num_cm, --for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no), Harshita for Bug 4870243

2735: for_std_invoice_tds_rec.terms_id,
2736: lv_credit_note_tds, --'CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX '||for_std_invoice_tds_rec.invoice_num||' OR '||TO_CHAR(p_invoice_id) ,
2737: 'INDIA TDS', /* --'TDS',--Ramanand for bug#4388958 */
2738: -- for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.CURRVAL),
2739: -- lv_invoice_num_cm, --for_std_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no), Harshita for Bug 4870243
2740: for_std_invoice_tds_rec.payment_method_lookup_code,
2741: for_std_invoice_tds_rec.pay_group_lookup_code,
2742: p_org_id,
2743: ln_legal_entity_id,

Line 2755: v_ap_tds_cm_num := v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no);

2751:
2752: /* Modified by Ramananda for bug# 4407184 , end */
2753:
2754: -- following line added by Aparajita for bug # 2439034.
2755: v_ap_tds_cm_num := v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no);
2756:
2757: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoice_lines_interface 1 : CREDIT NOTE FOR TDS TAX AUTHORITY FOR TAX APPLIED');
2758: v_stage:=8;
2759:

Line 2781: v_ap_invoices_interface_no,

2777: last_update_date,
2778: last_update_login
2779:
2780: ) VALUES (
2781: v_ap_invoices_interface_no,
2782: ap_invoice_lines_interface_s.NEXTVAL,
2783: 1, --THERE WILL ALWAYS BE ONLY ONE LINE.
2784: 'ITEM',
2785: --(-1)*insertion_amount,--commented on 13-Dec-2001

Line 2809: v_ja_ap_invoices_interface_no := NULL;

2805: OPEN for_distribution_insertion(p_invoice_id);
2806: FETCH for_distribution_insertion INTO for_dist_insertion_rec;
2807: CLOSE for_distribution_insertion;
2808:
2809: v_ja_ap_invoices_interface_no := NULL;
2810:
2811: SELECT JAI_AP_TDS_THHOLD_TRXS_S1.nextval--JAI_AP_TDS_INVOICE_NUM_S.NEXTVAL changed by rchandan for bug#4487676
2812: INTO v_ja_ap_invoices_interface_no
2813: FROM dual;

Line 2812: INTO v_ja_ap_invoices_interface_no

2808:
2809: v_ja_ap_invoices_interface_no := NULL;
2810:
2811: SELECT JAI_AP_TDS_THHOLD_TRXS_S1.nextval--JAI_AP_TDS_INVOICE_NUM_S.NEXTVAL changed by rchandan for bug#4487676
2812: INTO v_ja_ap_invoices_interface_no
2813: FROM dual;
2814:
2815: v_ap_invoices_interface_no := NULL;
2816:

Line 2815: v_ap_invoices_interface_no := NULL;

2811: SELECT JAI_AP_TDS_THHOLD_TRXS_S1.nextval--JAI_AP_TDS_INVOICE_NUM_S.NEXTVAL changed by rchandan for bug#4487676
2812: INTO v_ja_ap_invoices_interface_no
2813: FROM dual;
2814:
2815: v_ap_invoices_interface_no := NULL;
2816:
2817: SELECT ap_invoices_interface_s.NEXTVAL
2818: INTO v_ap_invoices_interface_no
2819: FROM dual;

Line 2817: SELECT ap_invoices_interface_s.NEXTVAL

2813: FROM dual;
2814:
2815: v_ap_invoices_interface_no := NULL;
2816:
2817: SELECT ap_invoices_interface_s.NEXTVAL
2818: INTO v_ap_invoices_interface_no
2819: FROM dual;
2820:
2821: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoices_interface 2 : STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED');

Line 2818: INTO v_ap_invoices_interface_no

2814:
2815: v_ap_invoices_interface_no := NULL;
2816:
2817: SELECT ap_invoices_interface_s.NEXTVAL
2818: INTO v_ap_invoices_interface_no
2819: FROM dual;
2820:
2821: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoices_interface 2 : STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED');
2822: v_stage:=9;

Line 2821: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoices_interface 2 : STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED');

2817: SELECT ap_invoices_interface_s.NEXTVAL
2818: INTO v_ap_invoices_interface_no
2819: FROM dual;
2820:
2821: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoices_interface 2 : STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED');
2822: v_stage:=9;
2823:
2824: /* Modified by Ramananda for bug# 4407184 ,start */
2825:

Line 2826: lv_rtn_invoice_num := 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no);

2822: v_stage:=9;
2823:
2824: /* Modified by Ramananda for bug# 4407184 ,start */
2825:
2826: lv_rtn_invoice_num := 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no);
2827: lv_standard_invoice_num := 'STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED ON '||for_std_invoice_rec.invoice_num||' OR '||TO_CHAR(p_invoice_id); -- NEW.prepay_id replaced with p_invoice_id
2828:
2829:
2830: /* start additions by ssumaith - bug# 4448789 */

Line 2846: INSERT INTO ap_invoices_interface (

2842: X_LEGAL_ENTITY_NAME => lv_legal_entity_name
2843: );
2844: /* ends additions by ssumaith - bug# 4448789*/
2845:
2846: INSERT INTO ap_invoices_interface (
2847: invoice_id,
2848: invoice_num,
2849: invoice_type_lookup_code,
2850: invoice_date,

Line 2875: v_ap_invoices_interface_no,

2871: goods_received_date,
2872: invoice_received_date, --Added by pavan on 06-Jun-01
2873: group_id /*Bug 4716884*/
2874: ) VALUES (
2875: v_ap_invoices_interface_no,
2876: -- 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
2877: lv_rtn_invoice_num, --'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
2878: 'STANDARD',
2879: v_prepay_dist_date, --bug 3112711 kpvs -- TRUNC(SYSDATE), --for_std_invoice_rec.invoice_date,

Line 2876: -- 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),

2872: invoice_received_date, --Added by pavan on 06-Jun-01
2873: group_id /*Bug 4716884*/
2874: ) VALUES (
2875: v_ap_invoices_interface_no,
2876: -- 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
2877: lv_rtn_invoice_num, --'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
2878: 'STANDARD',
2879: v_prepay_dist_date, --bug 3112711 kpvs -- TRUNC(SYSDATE), --for_std_invoice_rec.invoice_date,
2880: for_std_invoice_rec.vendor_id,

Line 2877: lv_rtn_invoice_num, --'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no),

2873: group_id /*Bug 4716884*/
2874: ) VALUES (
2875: v_ap_invoices_interface_no,
2876: -- 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
2877: lv_rtn_invoice_num, --'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
2878: 'STANDARD',
2879: v_prepay_dist_date, --bug 3112711 kpvs -- TRUNC(SYSDATE), --for_std_invoice_rec.invoice_date,
2880: for_std_invoice_rec.vendor_id,
2881: for_std_invoice_rec.vendor_site_id,

Line 2892: -- 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.CURRVAL),

2888: for_std_invoice_rec.exchange_date,
2889: for_std_invoice_rec.terms_id,
2890: lv_standard_invoice_num , --'STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED ON '||for_std_invoice_rec.invoice_num||' OR '||TO_CHAR(p_invoice_id), -- NEW.prepay_id replaced with p_invoice_id
2891: 'INDIA TDS', /* --'TDS', --Ramanand for bug#4388958 */
2892: -- 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.CURRVAL),
2893: -- lv_rtn_invoice_num , --'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no), Harshita for Bug 4870243
2894: for_std_invoice_rec.payment_method_lookup_code,
2895: for_std_invoice_rec.pay_group_lookup_code,
2896: p_org_id,

Line 2893: -- lv_rtn_invoice_num , --'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no), Harshita for Bug 4870243

2889: for_std_invoice_rec.terms_id,
2890: lv_standard_invoice_num , --'STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED ON '||for_std_invoice_rec.invoice_num||' OR '||TO_CHAR(p_invoice_id), -- NEW.prepay_id replaced with p_invoice_id
2891: 'INDIA TDS', /* --'TDS', --Ramanand for bug#4388958 */
2892: -- 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.CURRVAL),
2893: -- lv_rtn_invoice_num , --'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no), Harshita for Bug 4870243
2894: for_std_invoice_rec.payment_method_lookup_code,
2895: for_std_invoice_rec.pay_group_lookup_code,
2896: p_org_id,
2897: ln_legal_entity_id,

Line 2912: v_ap_sup_inv_num := 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no);

2908: /* Modified by Ramananda for bug# 4407184 , end */
2909:
2910:
2911: -- following line added by Aparajita on 07/07/2002 for bug # 2439034
2912: v_ap_sup_inv_num := 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no);
2913:
2914: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoice_lines_interface 2 : STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED');
2915: v_stage:=10;
2916:

Line 2938: v_ap_invoices_interface_no,

2934: last_update_login
2935: )
2936: VALUES
2937: (
2938: v_ap_invoices_interface_no,
2939: ap_invoice_lines_interface_s.NEXTVAL,
2940: 1, --THERE WILL ALWAYS BE ONLY ONE LINE.
2941: 'ITEM',
2942: insertion_amount,

Line 2966: p_invoice_tds_authority_num => v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),

2962: p_taxable_amount => ln_taxable_amount,
2963: p_tax_amount => ln_tax_amount,
2964: p_tds_authority_vendor_id => for_std_invoice_tds_rec.vendor_id,
2965: p_tds_authority_vendor_site_id => for_std_invoice_tds_rec.vendor_site_id,
2966: p_invoice_tds_authority_num => v_tds_cm_num ||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
2967: p_invoice_tds_authority_type => 'CREDIT',
2968: p_invoice_tds_authority_curr => for_std_invoice_tds_rec.invoice_currency_code,
2969: p_invoice_tds_authority_amt => ((-1)*insertion_amount * NVL(get_exchange_rate_base_inv_rec.exchange_rate,1)),
2970: p_vendor_id => for_std_invoice_rec.vendor_id,

Line 2972: p_invoice_vendor_num => 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no),

2968: p_invoice_tds_authority_curr => for_std_invoice_tds_rec.invoice_currency_code,
2969: p_invoice_tds_authority_amt => ((-1)*insertion_amount * NVL(get_exchange_rate_base_inv_rec.exchange_rate,1)),
2970: p_vendor_id => for_std_invoice_rec.vendor_id,
2971: p_vendor_site_id => for_std_invoice_rec.vendor_site_id,
2972: p_invoice_vendor_num => 'RTN/'||for_std_invoice_rec.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
2973: p_invoice_vendor_type => 'STANDARD',
2974: p_invoice_vendor_curr => for_std_invoice_rec.invoice_currency_code,
2975: p_invoice_vendor_amt => insertion_amount,
2976: p_parent_inv_payment_priority => ln_prnt_pay_priority,

Line 3107: v_ja_ap_invoices_interface_no := NULL;

3103: OPEN for_distribution_insertion(for_payment_status_prepay_rec.invoice_id);
3104: FETCH for_distribution_insertion INTO for_dist_insertion_tds_rec ;
3105: CLOSE for_distribution_insertion ;
3106:
3107: v_ja_ap_invoices_interface_no := NULL;
3108:
3109: SELECT JAI_AP_TDS_THHOLD_TRXS_S1.nextval--JAI_AP_TDS_INVOICE_NUM_S.NEXTVAL changed by rchandan for bug#4487676
3110: INTO v_ja_ap_invoices_interface_no
3111: FROM dual;

Line 3110: INTO v_ja_ap_invoices_interface_no

3106:
3107: v_ja_ap_invoices_interface_no := NULL;
3108:
3109: SELECT JAI_AP_TDS_THHOLD_TRXS_S1.nextval--JAI_AP_TDS_INVOICE_NUM_S.NEXTVAL changed by rchandan for bug#4487676
3110: INTO v_ja_ap_invoices_interface_no
3111: FROM dual;
3112:
3113: v_ap_invoices_interface_no := NULL;
3114: SELECT ap_invoices_interface_s.NEXTVAL

Line 3113: v_ap_invoices_interface_no := NULL;

3109: SELECT JAI_AP_TDS_THHOLD_TRXS_S1.nextval--JAI_AP_TDS_INVOICE_NUM_S.NEXTVAL changed by rchandan for bug#4487676
3110: INTO v_ja_ap_invoices_interface_no
3111: FROM dual;
3112:
3113: v_ap_invoices_interface_no := NULL;
3114: SELECT ap_invoices_interface_s.NEXTVAL
3115: INTO v_ap_invoices_interface_no
3116: FROM dual;
3117:

Line 3114: SELECT ap_invoices_interface_s.NEXTVAL

3110: INTO v_ja_ap_invoices_interface_no
3111: FROM dual;
3112:
3113: v_ap_invoices_interface_no := NULL;
3114: SELECT ap_invoices_interface_s.NEXTVAL
3115: INTO v_ap_invoices_interface_no
3116: FROM dual;
3117:
3118: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoices_interface 3:CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX');

Line 3115: INTO v_ap_invoices_interface_no

3111: FROM dual;
3112:
3113: v_ap_invoices_interface_no := NULL;
3114: SELECT ap_invoices_interface_s.NEXTVAL
3115: INTO v_ap_invoices_interface_no
3116: FROM dual;
3117:
3118: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoices_interface 3:CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX');
3119: v_stage:=14;

Line 3118: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoices_interface 3:CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX');

3114: SELECT ap_invoices_interface_s.NEXTVAL
3115: INTO v_ap_invoices_interface_no
3116: FROM dual;
3117:
3118: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoices_interface 3:CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX');
3119: v_stage:=14;
3120:
3121: /* Modified by Ramananda for bug# 4407184 ,start */
3122:

Line 3123: lv_invoice_num :=for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no);

3119: v_stage:=14;
3120:
3121: /* Modified by Ramananda for bug# 4407184 ,start */
3122:
3123: lv_invoice_num :=for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no);
3124: lv_credit_tds_auth :='CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX '||for_pre_invoice_tds_rec.invoice_num||' OR '||TO_CHAR(p_invoice_id) ;
3125:
3126: /* start additions by ssumaith - bug# 4448789 */
3127: jai_cmn_utils_pkg.GET_LE_INFO(

Line 3142: INSERT INTO ap_invoices_interface (

3138: X_LEGAL_ENTITY_NAME => lv_legal_entity_name
3139: );
3140: /* ends additions by ssumaith - bug# 4448789*/
3141:
3142: INSERT INTO ap_invoices_interface (
3143: invoice_id,
3144: invoice_num,
3145: invoice_type_lookup_code,
3146: invoice_date,

Line 3169: v_ap_invoices_interface_no,

3165: last_update_date,
3166: last_update_login,
3167: group_id /*Bug 4716884*/
3168: ) VALUES (
3169: v_ap_invoices_interface_no,
3170: -- for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
3171: lv_invoice_num, --for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
3172: 'CREDIT',
3173: v_prepay_dist_date, --bug 3112711 kpvs TRUNC( SYSDATE ) --for_std_invoice_tds_rec.invoice_date,

Line 3170: -- for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),

3166: last_update_login,
3167: group_id /*Bug 4716884*/
3168: ) VALUES (
3169: v_ap_invoices_interface_no,
3170: -- for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
3171: lv_invoice_num, --for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
3172: 'CREDIT',
3173: v_prepay_dist_date, --bug 3112711 kpvs TRUNC( SYSDATE ) --for_std_invoice_tds_rec.invoice_date,
3174: for_pre_invoice_tds_rec.vendor_id,

Line 3171: lv_invoice_num, --for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),

3167: group_id /*Bug 4716884*/
3168: ) VALUES (
3169: v_ap_invoices_interface_no,
3170: -- for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
3171: lv_invoice_num, --for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
3172: 'CREDIT',
3173: v_prepay_dist_date, --bug 3112711 kpvs TRUNC( SYSDATE ) --for_std_invoice_tds_rec.invoice_date,
3174: for_pre_invoice_tds_rec.vendor_id,
3175: for_pre_invoice_tds_rec.vendor_site_id,

Line 3185: -- for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.CURRVAL),

3181: for_pre_invoice_tds_rec.exchange_date,
3182: for_pre_invoice_tds_rec.terms_id,
3183: lv_credit_tds_auth, --'CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX '||for_pre_invoice_tds_rec.invoice_num||' OR '||TO_CHAR(p_invoice_id) ,
3184: 'INDIA TDS', /* --'TDS',--Ramanand for bug#4388958*/
3185: -- for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.CURRVAL),
3186: -- lv_invoice_num, --for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no), Harshita for Bug 4870243
3187: for_pre_invoice_tds_rec.payment_method_lookup_code,
3188: for_pre_invoice_tds_rec.pay_group_lookup_code,
3189: p_org_id,

Line 3186: -- lv_invoice_num, --for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no), Harshita for Bug 4870243

3182: for_pre_invoice_tds_rec.terms_id,
3183: lv_credit_tds_auth, --'CREDIT NOTE FOR TDS AUTHORITY FOR APPLIED AMOUNT OF TAX '||for_pre_invoice_tds_rec.invoice_num||' OR '||TO_CHAR(p_invoice_id) ,
3184: 'INDIA TDS', /* --'TDS',--Ramanand for bug#4388958*/
3185: -- for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.CURRVAL),
3186: -- lv_invoice_num, --for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no), Harshita for Bug 4870243
3187: for_pre_invoice_tds_rec.payment_method_lookup_code,
3188: for_pre_invoice_tds_rec.pay_group_lookup_code,
3189: p_org_id,
3190: ln_legal_entity_id,

Line 3202: v_ap_tds_cm_num := for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no);

3198:
3199: /* Modified by Ramananda for bug# 4407184 , end */
3200:
3201: -- following line added by Aparajita for bug # 2439034.
3202: v_ap_tds_cm_num := for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no);
3203:
3204: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoice_lines_interface 3 :CREDIT NOTE FOR TDS TAX AUTHORITY FOR TAX APPLIED' );
3205: v_stage:=14;
3206:

Line 3225: v_ap_invoices_interface_no,

3221: last_updated_by,
3222: last_update_date,
3223: last_update_login
3224: ) VALUES (
3225: v_ap_invoices_interface_no,
3226: ap_invoice_lines_interface_s.NEXTVAL,
3227: 1, --THERE WILL ALWAYS BE ONLY ONE LINE.
3228: 'ITEM',
3229: --(-1)*insertion_amount,--commented on 13-Dec-2001

Line 3251: v_ja_ap_invoices_interface_no := NULL;

3247: OPEN for_distribution_insertion(var_invoice_id);
3248: FETCH for_distribution_insertion INTO for_dist_inst_rec;
3249: CLOSE for_distribution_insertion;
3250:
3251: v_ja_ap_invoices_interface_no := NULL;
3252:
3253: SELECT JAI_AP_TDS_THHOLD_TRXS_S1.nextval--JAI_AP_TDS_INVOICE_NUM_S.NEXTVAL changed by rchandan for bug#4487676
3254: INTO v_ja_ap_invoices_interface_no
3255: FROM dual;

Line 3254: INTO v_ja_ap_invoices_interface_no

3250:
3251: v_ja_ap_invoices_interface_no := NULL;
3252:
3253: SELECT JAI_AP_TDS_THHOLD_TRXS_S1.nextval--JAI_AP_TDS_INVOICE_NUM_S.NEXTVAL changed by rchandan for bug#4487676
3254: INTO v_ja_ap_invoices_interface_no
3255: FROM dual;
3256:
3257: v_ap_invoices_interface_no := NULL;
3258:

Line 3257: v_ap_invoices_interface_no := NULL;

3253: SELECT JAI_AP_TDS_THHOLD_TRXS_S1.nextval--JAI_AP_TDS_INVOICE_NUM_S.NEXTVAL changed by rchandan for bug#4487676
3254: INTO v_ja_ap_invoices_interface_no
3255: FROM dual;
3256:
3257: v_ap_invoices_interface_no := NULL;
3258:
3259: SELECT ap_invoices_interface_s.NEXTVAL
3260: INTO v_ap_invoices_interface_no
3261: FROM dual;

Line 3259: SELECT ap_invoices_interface_s.NEXTVAL

3255: FROM dual;
3256:
3257: v_ap_invoices_interface_no := NULL;
3258:
3259: SELECT ap_invoices_interface_s.NEXTVAL
3260: INTO v_ap_invoices_interface_no
3261: FROM dual;
3262:
3263: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoices_interface 4: STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED');

Line 3260: INTO v_ap_invoices_interface_no

3256:
3257: v_ap_invoices_interface_no := NULL;
3258:
3259: SELECT ap_invoices_interface_s.NEXTVAL
3260: INTO v_ap_invoices_interface_no
3261: FROM dual;
3262:
3263: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoices_interface 4: STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED');
3264: v_stage:=15;

Line 3263: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoices_interface 4: STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED');

3259: SELECT ap_invoices_interface_s.NEXTVAL
3260: INTO v_ap_invoices_interface_no
3261: FROM dual;
3262:
3263: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoices_interface 4: STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED');
3264: v_stage:=15;
3265:
3266: /* Modified by Ramananda for bug# 4407184 ,start */
3267:

Line 3268: lv_rtn_invoice_num := 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no);

3264: v_stage:=15;
3265:
3266: /* Modified by Ramananda for bug# 4407184 ,start */
3267:
3268: lv_rtn_invoice_num := 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no);
3269: lv_standard_return_excess := 'STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED ON '||for_std_inv_rec_r.invoice_num||' OR '||TO_CHAR(p_invoice_id);/**** NEW.prepay_id replaced with p_invoice_id*******/
3270:
3271: /* start additions by ssumaith - bug# 4448789 */
3272: jai_cmn_utils_pkg.GET_LE_INFO(

Line 3287: INSERT INTO ap_invoices_interface (

3283: X_LEGAL_ENTITY_NAME => lv_legal_entity_name
3284: );
3285: /* ends additions by ssumaith - bug# 4448789*/
3286:
3287: INSERT INTO ap_invoices_interface (
3288: invoice_id,
3289: invoice_num,
3290: invoice_type_lookup_code,
3291: invoice_date,

Line 3316: v_ap_invoices_interface_no,

3312: goods_received_date,
3313: invoice_received_date, --Added by pavan on 06-Jun-01
3314: group_id /*Bug 4716884*/
3315: ) VALUES (
3316: v_ap_invoices_interface_no,
3317: -- 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
3318: lv_rtn_invoice_num , --'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
3319: 'STANDARD',
3320: v_prepay_dist_date, --bug 3112711 kpvs TRUNC(SYSDATE), --for_std_invoice_rec.invoice_date,

Line 3317: -- 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),

3313: invoice_received_date, --Added by pavan on 06-Jun-01
3314: group_id /*Bug 4716884*/
3315: ) VALUES (
3316: v_ap_invoices_interface_no,
3317: -- 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
3318: lv_rtn_invoice_num , --'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
3319: 'STANDARD',
3320: v_prepay_dist_date, --bug 3112711 kpvs TRUNC(SYSDATE), --for_std_invoice_rec.invoice_date,
3321: for_std_inv_rec_r.vendor_id,

Line 3318: lv_rtn_invoice_num , --'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no),

3314: group_id /*Bug 4716884*/
3315: ) VALUES (
3316: v_ap_invoices_interface_no,
3317: -- 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.NEXTVAL),
3318: lv_rtn_invoice_num , --'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
3319: 'STANDARD',
3320: v_prepay_dist_date, --bug 3112711 kpvs TRUNC(SYSDATE), --for_std_invoice_rec.invoice_date,
3321: for_std_inv_rec_r.vendor_id,
3322: for_std_inv_rec_r.vendor_site_id,

Line 3333: -- 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.CURRVAL),

3329: for_std_inv_rec_r.exchange_date,
3330: for_std_inv_rec_r.terms_id,
3331: lv_standard_return_excess, --'STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED ON '||for_std_inv_rec_r.invoice_num||' OR '||TO_CHAR(p_invoice_id) ,/**** NEW.prepay_id replaced with p_invoice_id*******/
3332: 'INDIA TDS', /*--'TDS', --Ramanand for bug#4388958*/
3333: -- 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.CURRVAL),
3334: --lv_rtn_invoice_num, --'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no), Harshita for Bug 4870243
3335: for_std_inv_rec_r.payment_method_lookup_code,
3336: for_std_inv_rec_r.pay_group_lookup_code,
3337: p_org_id,

Line 3334: --lv_rtn_invoice_num, --'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no), Harshita for Bug 4870243

3330: for_std_inv_rec_r.terms_id,
3331: lv_standard_return_excess, --'STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED ON '||for_std_inv_rec_r.invoice_num||' OR '||TO_CHAR(p_invoice_id) ,/**** NEW.prepay_id replaced with p_invoice_id*******/
3332: 'INDIA TDS', /*--'TDS', --Ramanand for bug#4388958*/
3333: -- 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(ja_in_ap_invoices_interface_s1.CURRVAL),
3334: --lv_rtn_invoice_num, --'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no), Harshita for Bug 4870243
3335: for_std_inv_rec_r.payment_method_lookup_code,
3336: for_std_inv_rec_r.pay_group_lookup_code,
3337: p_org_id,
3338: ln_legal_entity_id,

Line 3352: v_ap_sup_inv_num := 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no);

3348:
3349: /* Modified by Ramananda for bug# 4407184 , end */
3350:
3351: -- following line added by Aparajita on 07/07/2002 for bug # 2439034
3352: v_ap_sup_inv_num := 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no);
3353:
3354: Fnd_File.put_line(Fnd_File.LOG,'BEFORE INSERTING INTO ap_invoice_lines_interface 4: STANDARD INVOICE FOR RETURNING EXCESS TDS DEDUCTED');
3355: v_stage:=15;
3356:

Line 3375: v_ap_invoices_interface_no,

3371: last_updated_by,
3372: last_update_date,
3373: last_update_login
3374: ) VALUES (
3375: v_ap_invoices_interface_no,
3376: ap_invoice_lines_interface_s.NEXTVAL,
3377: 1, --THERE WILL ALWAYS BE ONLY ONE LINE.
3378: 'ITEM',
3379: insertion_amount,

Line 3404: p_invoice_tds_authority_num => for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),

3400: p_taxable_amount => ln_taxable_amount,
3401: p_tax_amount => ln_tax_amount,
3402: p_tds_authority_vendor_id => for_pre_invoice_tds_rec.vendor_id,
3403: p_tds_authority_vendor_site_id => for_pre_invoice_tds_rec.vendor_site_id,
3404: p_invoice_tds_authority_num => for_pre_invoice_tds_rec.invoice_num||'/'|| 'CM/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
3405: p_invoice_tds_authority_type => 'CREDIT',
3406: p_invoice_tds_authority_curr => for_pre_invoice_tds_rec.invoice_currency_code,
3407: p_invoice_tds_authority_amt => (-1)*insertion_amount * NVL(get_exchange_rate_base_inv_rec.exchange_rate,1),
3408: p_vendor_id => for_std_inv_rec_r.vendor_id,

Line 3410: p_invoice_vendor_num => 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no),

3406: p_invoice_tds_authority_curr => for_pre_invoice_tds_rec.invoice_currency_code,
3407: p_invoice_tds_authority_amt => (-1)*insertion_amount * NVL(get_exchange_rate_base_inv_rec.exchange_rate,1),
3408: p_vendor_id => for_std_inv_rec_r.vendor_id,
3409: p_vendor_site_id => for_std_inv_rec_r.vendor_site_id,
3410: p_invoice_vendor_num => 'RTN/'||for_std_inv_rec_r.invoice_num|| '/' ||TO_CHAR(v_ja_ap_invoices_interface_no),
3411: p_invoice_vendor_type => 'STANDARD',
3412: p_invoice_vendor_curr => for_std_inv_rec_r.invoice_currency_code,
3413: p_invoice_vendor_amt => insertion_amount,
3414: p_parent_inv_payment_priority => ln_prnt_pay_priority,