DBA Data[Home] [Help]

APPS.JAI_AP_TDS_TAX_DEFAULTATION dependencies on JAI_AP_TDS_INV_TAXES

Line 102: lv_default_tds_section_code jai_ap_tds_inv_taxes.default_section_code%type;

98: where set_of_books_id = cp_set_of_books_id;
99:
100: r_gl_sets_of_books c_gl_sets_of_books%rowtype;
101:
102: lv_default_tds_section_code jai_ap_tds_inv_taxes.default_section_code%type;
103: ln_default_tds_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
104: lv_default_from jai_ap_tds_inv_taxes.default_from%type;
105: lv_default_type jai_ap_tds_inv_taxes.default_type%type;
106: ln_exchange_rate ap_invoices_all.exchange_rate%type;

Line 103: ln_default_tds_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;

99:
100: r_gl_sets_of_books c_gl_sets_of_books%rowtype;
101:
102: lv_default_tds_section_code jai_ap_tds_inv_taxes.default_section_code%type;
103: ln_default_tds_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
104: lv_default_from jai_ap_tds_inv_taxes.default_from%type;
105: lv_default_type jai_ap_tds_inv_taxes.default_type%type;
106: ln_exchange_rate ap_invoices_all.exchange_rate%type;
107:

Line 104: lv_default_from jai_ap_tds_inv_taxes.default_from%type;

100: r_gl_sets_of_books c_gl_sets_of_books%rowtype;
101:
102: lv_default_tds_section_code jai_ap_tds_inv_taxes.default_section_code%type;
103: ln_default_tds_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
104: lv_default_from jai_ap_tds_inv_taxes.default_from%type;
105: lv_default_type jai_ap_tds_inv_taxes.default_type%type;
106: ln_exchange_rate ap_invoices_all.exchange_rate%type;
107:
108:

Line 105: lv_default_type jai_ap_tds_inv_taxes.default_type%type;

101:
102: lv_default_tds_section_code jai_ap_tds_inv_taxes.default_section_code%type;
103: ln_default_tds_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
104: lv_default_from jai_ap_tds_inv_taxes.default_from%type;
105: lv_default_type jai_ap_tds_inv_taxes.default_type%type;
106: ln_exchange_rate ap_invoices_all.exchange_rate%type;
107:
108:
109: begin

Line 373: cursor c_check_tds_already_processed(p_invoice_id number,p_process_status jai_ap_tds_inv_taxes.process_status%type) is--rchandan for bug#4428980

369: )
370: is
371:
372:
373: cursor c_check_tds_already_processed(p_invoice_id number,p_process_status jai_ap_tds_inv_taxes.process_status%type) is--rchandan for bug#4428980
374: select 'P'
375: from jai_ap_tds_inv_taxes
376: where invoice_id = p_invoice_id
377: and process_status = p_process_status;

Line 375: from jai_ap_tds_inv_taxes

371:
372:
373: cursor c_check_tds_already_processed(p_invoice_id number,p_process_status jai_ap_tds_inv_taxes.process_status%type) is--rchandan for bug#4428980
374: select 'P'
375: from jai_ap_tds_inv_taxes
376: where invoice_id = p_invoice_id
377: and process_status = p_process_status;
378:
379: cursor c_check_old_tds_processed(p_invoice_id number) is

Line 813: from jai_ap_tds_inv_taxes

809:
810: cursor c_check_if_record_exists
811: (p_invoice_id number, p_invoice_line_number number, p_invoice_distribution_id number) is
812: select tds_inv_tax_id
813: from jai_ap_tds_inv_taxes
814: where invoice_id = p_invoice_id
815: and nvl(invoice_line_number, -9999) = nvl(p_invoice_line_number, -9999)
816: and nvl(invoice_distribution_id, -9999) = nvl(p_invoice_distribution_id, -9999)
817: and section_type = p_section_type;

Line 821: from jai_ap_tds_inv_taxes

817: and section_type = p_section_type;
818: /*Added below cursor for bug#7309921 by JMEENA */
819: cursor c_check_user_deleted_tax_flag(p_tds_inv_tax_id NUMBER) IS
820: select user_deleted_tax_flag
821: from jai_ap_tds_inv_taxes
822: where tds_inv_tax_id = p_tds_inv_tax_id;
823:
824: ln_tds_inv_tax_id jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
825: ln_check_if_tax_is_input number; --File.Sql.35 Cbabu :=0;

Line 824: ln_tds_inv_tax_id jai_ap_tds_inv_taxes.tds_inv_tax_id%type;

820: select user_deleted_tax_flag
821: from jai_ap_tds_inv_taxes
822: where tds_inv_tax_id = p_tds_inv_tax_id;
823:
824: ln_tds_inv_tax_id jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
825: ln_check_if_tax_is_input number; --File.Sql.35 Cbabu :=0;
826: lv_actual_section_code jai_ap_tds_inv_taxes.actual_section_code%type;
827: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;
828: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;

Line 826: lv_actual_section_code jai_ap_tds_inv_taxes.actual_section_code%type;

822: where tds_inv_tax_id = p_tds_inv_tax_id;
823:
824: ln_tds_inv_tax_id jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
825: ln_check_if_tax_is_input number; --File.Sql.35 Cbabu :=0;
826: lv_actual_section_code jai_ap_tds_inv_taxes.actual_section_code%type;
827: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;
828: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
829: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
830:

Line 827: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;

823:
824: ln_tds_inv_tax_id jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
825: ln_check_if_tax_is_input number; --File.Sql.35 Cbabu :=0;
826: lv_actual_section_code jai_ap_tds_inv_taxes.actual_section_code%type;
827: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;
828: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
829: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
830:
831: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;

Line 828: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;

824: ln_tds_inv_tax_id jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
825: ln_check_if_tax_is_input number; --File.Sql.35 Cbabu :=0;
826: lv_actual_section_code jai_ap_tds_inv_taxes.actual_section_code%type;
827: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;
828: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
829: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
830:
831: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;
832: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;

Line 829: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';

825: ln_check_if_tax_is_input number; --File.Sql.35 Cbabu :=0;
826: lv_actual_section_code jai_ap_tds_inv_taxes.actual_section_code%type;
827: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;
828: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
829: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
830:
831: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;
832: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;
833: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;

Line 831: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;

827: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;
828: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
829: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
830:
831: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;
832: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;
833: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;
834: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;
835:

Line 832: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;

828: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
829: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
830:
831: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;
832: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;
833: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;
834: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;
835:
836: lv_input_dff_value varchar2(50);

Line 833: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;

829: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
830:
831: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;
832: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;
833: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;
834: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;
835:
836: lv_input_dff_value varchar2(50);
837: lv_user_deleted_tax_flag jai_ap_tds_inv_taxes.user_deleted_tax_flag%type; --File.Sql.35 Cbabu := 'N';

Line 834: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;

830:
831: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;
832: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;
833: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;
834: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;
835:
836: lv_input_dff_value varchar2(50);
837: lv_user_deleted_tax_flag jai_ap_tds_inv_taxes.user_deleted_tax_flag%type; --File.Sql.35 Cbabu := 'N';
838: lv_process_status jai_ap_tds_inv_taxes.process_status%type;

Line 837: lv_user_deleted_tax_flag jai_ap_tds_inv_taxes.user_deleted_tax_flag%type; --File.Sql.35 Cbabu := 'N';

833: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;
834: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;
835:
836: lv_input_dff_value varchar2(50);
837: lv_user_deleted_tax_flag jai_ap_tds_inv_taxes.user_deleted_tax_flag%type; --File.Sql.35 Cbabu := 'N';
838: lv_process_status jai_ap_tds_inv_taxes.process_status%type;
839:
840:
841: begin

Line 838: lv_process_status jai_ap_tds_inv_taxes.process_status%type;

834: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;
835:
836: lv_input_dff_value varchar2(50);
837: lv_user_deleted_tax_flag jai_ap_tds_inv_taxes.user_deleted_tax_flag%type; --File.Sql.35 Cbabu := 'N';
838: lv_process_status jai_ap_tds_inv_taxes.process_status%type;
839:
840:
841: begin
842:

Line 936: insert into jai_ap_tds_inv_taxes

932: if ln_tds_inv_tax_id is null then
933:
934: p_codepath := jai_general_pkg.plot_codepath(20, p_codepath); /* 20 */
935: lv_process_status := 'D';
936: insert into jai_ap_tds_inv_taxes
937: (
938: tds_inv_tax_id ,
939: invoice_id ,
940: invoice_line_number ,

Line 967: jai_ap_tds_inv_taxes_s.nextval ,

963: last_update_login
964: )
965: values
966: (
967: jai_ap_tds_inv_taxes_s.nextval ,
968: p_invoice_id ,
969: p_invoice_line_number ,
970: p_invoice_distribution_id ,
971: P_distribution_line_number ,

Line 999: update jai_ap_tds_inv_taxes

995: else
996:
997: p_codepath := jai_general_pkg.plot_codepath(21, p_codepath); /* 21 */
998:
999: update jai_ap_tds_inv_taxes
1000: set amount = p_amount ,
1001: section_type = p_section_type ,
1002: default_type = p_default_type ,
1003: default_section_code = p_default_section_code ,

Line 1027: update jai_ap_tds_inv_taxes

1023: if lv_consider_for_redefault = 'Y' and p_section_type = 'TDS_SECTION' then
1024:
1025: p_codepath := jai_general_pkg.plot_codepath(22, p_codepath); /* 22 */
1026:
1027: update jai_ap_tds_inv_taxes
1028: set default_tax_id = ln_default_tax_id
1029: where tds_inv_tax_id <> ln_tds_inv_tax_id
1030: and invoice_id = p_invoice_id
1031: and nvl(invoice_line_number, -9999) = nvl(p_invoice_line_number, -9999)

Line 1081: (p_invoice_id number, p_invoice_line_number number, p_invoice_distribution_id number, p_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type) is--rchandan for bug#4428980

1077: )
1078: is
1079:
1080: cursor c_get_amount_for_redefault /* AP lines uptake - introduced line */
1081: (p_invoice_id number, p_invoice_line_number number, p_invoice_distribution_id number, p_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type) is--rchandan for bug#4428980
1082: select sum(amount)
1083: from jai_ap_tds_inv_taxes
1084: where invoice_id = p_invoice_id
1085: and consider_for_redefault = p_consider_for_redefault--rchandan for bug#4428980

Line 1083: from jai_ap_tds_inv_taxes

1079:
1080: cursor c_get_amount_for_redefault /* AP lines uptake - introduced line */
1081: (p_invoice_id number, p_invoice_line_number number, p_invoice_distribution_id number, p_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type) is--rchandan for bug#4428980
1082: select sum(amount)
1083: from jai_ap_tds_inv_taxes
1084: where invoice_id = p_invoice_id
1085: and consider_for_redefault = p_consider_for_redefault--rchandan for bug#4428980
1086: and user_deleted_tax_flag <> 'Y'
1087: and ( (p_invoice_distribution_id is null ) or (p_invoice_distribution_id is not null and invoice_distribution_id <> p_invoice_distribution_id ) )

Line 1347: from jai_ap_tds_inv_taxes

1343:
1344: cursor c_get_existing_dff_values
1345: (p_invoice_id number, p_invoice_line_number number, p_invoice_distribution_id number, p_section_type jai_cmn_taxes_all.section_type%type) is--rchandan for bug#4428980
1346: select tds_inv_tax_id, default_tax_id, actual_tax_id
1347: from jai_ap_tds_inv_taxes
1348: where invoice_id = p_invoice_id
1349: and nvl(invoice_line_number, -9999) = nvl(p_invoice_line_number, -9999)
1350: and nvl(invoice_distribution_id, -9999) = nvl(p_invoice_distribution_id, -9999)
1351: and section_type = p_section_type;--rchandan for bug#4428980

Line 1431: delete jai_ap_tds_inv_taxes

1427: */
1428: begin
1429:
1430: /* AP lines uptake - introduced line */
1431: delete jai_ap_tds_inv_taxes
1432: where invoice_id = p_invoice_id
1433: and (
1434: (p_invoice_line_number is null ) or
1435: (p_invoice_line_number is not null and invoice_line_number = p_invoice_line_number)

Line 1465: cursor c_jai_ap_tds_inv_taxes_inv(p_invoice_id number) is

1461: p_new_transaction out nocopy varchar2
1462: )
1463: is
1464:
1465: cursor c_jai_ap_tds_inv_taxes_inv(p_invoice_id number) is
1466: select 'Y'
1467: from jai_ap_tds_inv_taxes
1468: where invoice_id = p_invoice_id;
1469:

Line 1467: from jai_ap_tds_inv_taxes

1463: is
1464:
1465: cursor c_jai_ap_tds_inv_taxes_inv(p_invoice_id number) is
1466: select 'Y'
1467: from jai_ap_tds_inv_taxes
1468: where invoice_id = p_invoice_id;
1469:
1470:
1471: cursor c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id number) is

Line 1471: cursor c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id number) is

1467: from jai_ap_tds_inv_taxes
1468: where invoice_id = p_invoice_id;
1469:
1470:
1471: cursor c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id number) is
1472: select 'Y'
1473: from jai_ap_tds_inv_taxes
1474: where invoice_distribution_id = p_invoice_distribution_id;
1475:

Line 1473: from jai_ap_tds_inv_taxes

1469:
1470:
1471: cursor c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id number) is
1472: select 'Y'
1473: from jai_ap_tds_inv_taxes
1474: where invoice_distribution_id = p_invoice_distribution_id;
1475:
1476: lv_new_transaction varchar2(1);
1477:

Line 1484: open c_jai_ap_tds_inv_taxes_inv(p_invoice_id);

1480: lv_new_transaction := 'N';
1481:
1482: if p_invoice_id is not null then
1483:
1484: open c_jai_ap_tds_inv_taxes_inv(p_invoice_id);
1485: fetch c_jai_ap_tds_inv_taxes_inv into lv_new_transaction;
1486: close c_jai_ap_tds_inv_taxes_inv;
1487:
1488: elsif p_invoice_distribution_id is not null then

Line 1485: fetch c_jai_ap_tds_inv_taxes_inv into lv_new_transaction;

1481:
1482: if p_invoice_id is not null then
1483:
1484: open c_jai_ap_tds_inv_taxes_inv(p_invoice_id);
1485: fetch c_jai_ap_tds_inv_taxes_inv into lv_new_transaction;
1486: close c_jai_ap_tds_inv_taxes_inv;
1487:
1488: elsif p_invoice_distribution_id is not null then
1489:

Line 1486: close c_jai_ap_tds_inv_taxes_inv;

1482: if p_invoice_id is not null then
1483:
1484: open c_jai_ap_tds_inv_taxes_inv(p_invoice_id);
1485: fetch c_jai_ap_tds_inv_taxes_inv into lv_new_transaction;
1486: close c_jai_ap_tds_inv_taxes_inv;
1487:
1488: elsif p_invoice_distribution_id is not null then
1489:
1490: open c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id);

Line 1490: open c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id);

1486: close c_jai_ap_tds_inv_taxes_inv;
1487:
1488: elsif p_invoice_distribution_id is not null then
1489:
1490: open c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id);
1491: fetch c_jai_ap_tds_inv_taxes_dist into lv_new_transaction;
1492: close c_jai_ap_tds_inv_taxes_dist;
1493:
1494: end if;

Line 1491: fetch c_jai_ap_tds_inv_taxes_dist into lv_new_transaction;

1487:
1488: elsif p_invoice_distribution_id is not null then
1489:
1490: open c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id);
1491: fetch c_jai_ap_tds_inv_taxes_dist into lv_new_transaction;
1492: close c_jai_ap_tds_inv_taxes_dist;
1493:
1494: end if;
1495:

Line 1492: close c_jai_ap_tds_inv_taxes_dist;

1488: elsif p_invoice_distribution_id is not null then
1489:
1490: open c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id);
1491: fetch c_jai_ap_tds_inv_taxes_dist into lv_new_transaction;
1492: close c_jai_ap_tds_inv_taxes_dist;
1493:
1494: end if;
1495:
1496: p_new_transaction := nvl(lv_new_transaction, 'N');