DBA Data[Home] [Help]

APPS.JAI_AP_TDS_TAX_DEFAULTATION dependencies on JAI_AP_TDS_INV_TAXES

Line 82: to update values of flag column consider_amt_for_tds in table jai_ap_tds_inv_taxes to 'N' or 'Y' based on section attached.

78: 12. 23-Aug-2011 mmurtuza for bug12858951
79: Description: TDS CALCULATED FOR SERVICE TAX LINES WHEN THRESHOLD CROSSED
80: Fix: Modified the call and definition of procedure populate_localization_inv_tax by adding the parameter p_line_type_lookup_code
81: Declared two cursors c_upd_servtax_flag_n, c_upd_servtax_flag_y and two variables ln_tds_inv_tax_id_upd_n and ln_tds_inv_tax_id_upd_y
82: to update values of flag column consider_amt_for_tds in table jai_ap_tds_inv_taxes to 'N' or 'Y' based on section attached.
83:
84: 13. 13-Mar-2012 mmurtuza for bug12858951 Post review
85: Description: TDS CALCULATED FOR SERVICE TAX LINES WHEN THRESHOLD CROSSED
86: Fix; Modified the call and definition of procedure populate_localization_inv_tax by adding tow more parameters p_po_distribution_id and p_rcv_transaction_id

Line 89: to update values of flag column consider_amt_for_tds in table jai_ap_tds_inv_taxes to 'N' or 'Y' based on section and tax type attached.

85: Description: TDS CALCULATED FOR SERVICE TAX LINES WHEN THRESHOLD CROSSED
86: Fix; Modified the call and definition of procedure populate_localization_inv_tax by adding tow more parameters p_po_distribution_id and p_rcv_transaction_id
87: Commneted two cursors c_upd_servtax_flag_n, c_upd_servtax_flag_y and two variables ln_tds_inv_tax_id_upd_n and ln_tds_inv_tax_id_upd_y.
88: Added three cursors c_no_tds_service_excise_st, c_no_tds_service_excise_po, c_no_tds_service_excise_rec and varaible ln_tds_inv_tax_id_st
89: to update values of flag column consider_amt_for_tds in table jai_ap_tds_inv_taxes to 'N' or 'Y' based on section and tax type attached.
90:
91: 14. 20-Apr-2012 mmurtuza for bug 13983975
92: Description: SEVERE PERFORMANCE ISSUES WITH SERVICE TAX ATTACHMENT AND VALIDATION OF INVOICE
93: Fix: Removed nvl cluase from cursors c_no_tds_service_excise_st, c_no_tds_service_excise_po and c_no_tds_service_excise_rec

Line 144: lv_default_tds_section_code jai_ap_tds_inv_taxes.default_section_code%type;

140: where set_of_books_id = cp_set_of_books_id;
141:
142: r_gl_sets_of_books c_gl_sets_of_books%rowtype;
143:
144: lv_default_tds_section_code jai_ap_tds_inv_taxes.default_section_code%type;
145: ln_default_tds_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
146: lv_default_from jai_ap_tds_inv_taxes.default_from%type;
147: lv_default_type jai_ap_tds_inv_taxes.default_type%type;
148: ln_exchange_rate ap_invoices_all.exchange_rate%type;

Line 145: ln_default_tds_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;

141:
142: r_gl_sets_of_books c_gl_sets_of_books%rowtype;
143:
144: lv_default_tds_section_code jai_ap_tds_inv_taxes.default_section_code%type;
145: ln_default_tds_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
146: lv_default_from jai_ap_tds_inv_taxes.default_from%type;
147: lv_default_type jai_ap_tds_inv_taxes.default_type%type;
148: ln_exchange_rate ap_invoices_all.exchange_rate%type;
149:

Line 146: lv_default_from jai_ap_tds_inv_taxes.default_from%type;

142: r_gl_sets_of_books c_gl_sets_of_books%rowtype;
143:
144: lv_default_tds_section_code jai_ap_tds_inv_taxes.default_section_code%type;
145: ln_default_tds_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
146: lv_default_from jai_ap_tds_inv_taxes.default_from%type;
147: lv_default_type jai_ap_tds_inv_taxes.default_type%type;
148: ln_exchange_rate ap_invoices_all.exchange_rate%type;
149:
150:

Line 147: lv_default_type jai_ap_tds_inv_taxes.default_type%type;

143:
144: lv_default_tds_section_code jai_ap_tds_inv_taxes.default_section_code%type;
145: ln_default_tds_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
146: lv_default_from jai_ap_tds_inv_taxes.default_from%type;
147: lv_default_type jai_ap_tds_inv_taxes.default_type%type;
148: ln_exchange_rate ap_invoices_all.exchange_rate%type;
149:
150:
151: begin

Line 426: 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

422: )
423: is
424:
425:
426: 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
427: select 'P'
428: from jai_ap_tds_inv_taxes
429: where invoice_id = p_invoice_id
430: and process_status = p_process_status;

Line 428: from jai_ap_tds_inv_taxes

424:
425:
426: 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
427: select 'P'
428: from jai_ap_tds_inv_taxes
429: where invoice_id = p_invoice_id
430: and process_status = p_process_status;
431:
432: cursor c_check_old_tds_processed(p_invoice_id number) is

Line 869: from jai_ap_tds_inv_taxes

865:
866: cursor c_check_if_record_exists
867: (p_invoice_id number, p_invoice_line_number number, p_invoice_distribution_id number) is
868: select tds_inv_tax_id, actual_tax_id --Added by Bgowrava for Bug#5911913
869: from jai_ap_tds_inv_taxes
870: where invoice_id = p_invoice_id
871: and nvl(invoice_line_number, -9999) = nvl(p_invoice_line_number, -9999)
872: and nvl(invoice_distribution_id, -9999) = nvl(p_invoice_distribution_id, -9999)
873: and section_type = p_section_type;

Line 881: jai_ap_tds_inv_taxes jadit, jai_cmn_document_taxes jcdt, jai_cmn_taxes_all jcta,

877: /*Start Commenting by mmurtuza for bug 12858951 Post review*/
878:
879: /*Cursor c_upd_servtax_flag_n(cp_invoice_id number, cp_invoice_distribution_id number) is
880: select tds_inv_tax_id from
881: jai_ap_tds_inv_taxes jadit, jai_cmn_document_taxes jcdt, jai_cmn_taxes_all jcta,
882: jai_rgm_registrations jrr, jai_rgm_definitions jrd
883: where jadit.invoice_id=jcdt.source_doc_id
884: and jadit.actual_tax_id=jcta.tax_id
885: and (NVL(upper(nvl(actual_section_code, default_section_code)), '-XX') NOT IN (select upper(lookup_code) from ja_lookups where lookup_type='JAI_TDS_SECTION_SERVICE')

Line 896: jai_ap_tds_inv_taxes jadit, jai_cmn_document_taxes jcdt, jai_cmn_taxes_all jcta,

892: and nvl(jadit.invoice_id, -9999) = nvl(cp_invoice_id, -9999);
893:
894: Cursor c_upd_servtax_flag_y(cp_invoice_id number, cp_invoice_distribution_id number) is
895: select tds_inv_tax_id from
896: jai_ap_tds_inv_taxes jadit, jai_cmn_document_taxes jcdt, jai_cmn_taxes_all jcta,
897: jai_rgm_registrations jrr, jai_rgm_definitions jrd
898: where jadit.invoice_id=jcdt.source_doc_id
899: and jadit.actual_tax_id=jcta.tax_id
900: and NOT (NVL(upper(nvl(actual_section_code, default_section_code)), '-XX') NOT IN (select upper(lookup_code) from ja_lookups where lookup_type='JAI_TDS_SECTION_SERVICE')

Line 909: ln_tds_inv_tax_id_upd_n jai_ap_tds_inv_taxes.tds_inv_tax_id%type;

905: AND jrd.regime_code = jai_constants.service_regime
906: and nvl(jadit.invoice_distribution_id, -9999) = nvl(cp_invoice_distribution_id, -9999)
907: and nvl(jadit.invoice_id, -9999) = nvl(cp_invoice_id, -9999);
908:
909: ln_tds_inv_tax_id_upd_n jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
910: ln_tds_inv_tax_id_upd_y jai_ap_tds_inv_taxes.tds_inv_tax_id%type;*/
911:
912: /*End Commenting by mmurtuza for bug 12858951 Post review*/
913:

Line 910: ln_tds_inv_tax_id_upd_y jai_ap_tds_inv_taxes.tds_inv_tax_id%type;*/

906: and nvl(jadit.invoice_distribution_id, -9999) = nvl(cp_invoice_distribution_id, -9999)
907: and nvl(jadit.invoice_id, -9999) = nvl(cp_invoice_id, -9999);
908:
909: ln_tds_inv_tax_id_upd_n jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
910: ln_tds_inv_tax_id_upd_y jai_ap_tds_inv_taxes.tds_inv_tax_id%type;*/
911:
912: /*End Commenting by mmurtuza for bug 12858951 Post review*/
913:
914: /*End Additions for bug 12858951 by mmurtuza*/

Line 920: jai_ap_tds_inv_taxes jadit, jai_cmn_document_taxes jcdt, jai_cmn_taxes_all jcta,

916: /*Start additions by mmurtuza for bug 12858951 Post review*/
917:
918: cursor c_no_tds_service_excise_st is
919: select jadit.tds_inv_tax_id from
920: jai_ap_tds_inv_taxes jadit, jai_cmn_document_taxes jcdt, jai_cmn_taxes_all jcta,
921: jai_rgm_registrations jrr, jai_rgm_definitions jrd
922: where jadit.invoice_id=jcdt.source_doc_id
923: and nvl(jadit.actual_tax_id, jadit.default_tax_id)=jcta.tax_id
924: AND upper(jcta.section_code) NOT IN (select upper(lookup_code) from ja_lookups where lookup_type='JAI_TDS_SECTION_SERVICE')

Line 937: FROM jai_ap_tds_inv_taxes jadit,

933: /* Commented below union all for bug 14019234 */
934: /* union all
935:
936: SELECT tds_inv_tax_id
937: FROM jai_ap_tds_inv_taxes jadit,
938: jai_cmn_document_taxes jcdt,
939: jai_cmn_taxes_all jcta
940: WHERE jcdt.tax_id = jcta.tax_id
941: --AND (UPPER(jcta.tax_type) LIKE '%EXCISE%' OR UPPER(jcta.tax_type) LIKE '%CUSTOMS%')

Line 954: jai_ap_tds_inv_taxes jadit, JAI_AP_MATCH_INV_TAXES jamit , jai_cmn_taxes_all jcta1, jai_cmn_taxes_all jcta2,

950:
951:
952: cursor c_no_tds_service_excise_po is
953: select jadit.tds_inv_tax_id from
954: jai_ap_tds_inv_taxes jadit, JAI_AP_MATCH_INV_TAXES jamit , jai_cmn_taxes_all jcta1, jai_cmn_taxes_all jcta2,
955: jai_rgm_registrations jrr, jai_rgm_definitions jrd
956: where jadit.invoice_id = jamit.invoice_id
957: and nvl(jadit.actual_tax_id, default_tax_id)=jcta1.tax_id
958: and nvl(jamit.po_distribution_id, -9999) = p_po_distribution_id

Line 974: jai_ap_tds_inv_taxes jadit, JAI_AP_MATCH_INV_TAXES jamit, jai_cmn_taxes_all jcta

970: /* Commented below union all for bug 14019234 */
971: /* union all
972:
973: select tds_inv_tax_id from
974: jai_ap_tds_inv_taxes jadit, JAI_AP_MATCH_INV_TAXES jamit, jai_cmn_taxes_all jcta
975: where --(upper(jcta.tax_type) like '%EXCISE%' OR UPPER(jcta.tax_type) LIKE '%CUSTOMS%')
976: jcta.tax_type in (JAI_CONSTANTS.TAX_TYPE_EXCISE, JAI_CONSTANTS.TAX_TYPE_EXC_ADDITIONAL, JAI_CONSTANTS.TAX_TYPE_EXC_OTHER,
977: JAI_CONSTANTS.TAX_TYPE_EXC_EDU_CESS, JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS, JAI_CONSTANTS.TAX_TYPE_CUSTOMS,
978: JAI_CONSTANTS.TAX_TYPE_CUSTOMS_EDU_CESS, JAI_CONSTANTS.TAX_TYPE_SH_CUSTOMS_EDU_CESS)

Line 990: jai_ap_tds_inv_taxes jadit, JAI_AP_MATCH_INV_TAXES jamit , jai_cmn_taxes_all jcta1, jai_cmn_taxes_all jcta2,

986:
987:
988: cursor c_no_tds_service_excise_rec is
989: select jadit.tds_inv_tax_id from
990: jai_ap_tds_inv_taxes jadit, JAI_AP_MATCH_INV_TAXES jamit , jai_cmn_taxes_all jcta1, jai_cmn_taxes_all jcta2,
991: jai_rgm_registrations jrr, jai_rgm_definitions jrd
992: where jadit.invoice_id = jamit.invoice_id
993: and nvl(jadit.actual_tax_id, default_tax_id)=jcta1.tax_id
994: and nvl(jamit.rcv_transaction_id, -9999) = p_rcv_transaction_id

Line 1010: jai_ap_tds_inv_taxes jadit, JAI_AP_MATCH_INV_TAXES jamit, jai_cmn_taxes_all jcta

1006: /* Commented below union all for bug 14019234 */
1007: /* union all
1008:
1009: select tds_inv_tax_id from
1010: jai_ap_tds_inv_taxes jadit, JAI_AP_MATCH_INV_TAXES jamit, jai_cmn_taxes_all jcta
1011: where --(upper(jcta.tax_type) like '%EXCISE%' OR UPPER(jcta.tax_type) LIKE '%CUSTOMS%')
1012: jcta.tax_type in (JAI_CONSTANTS.TAX_TYPE_EXCISE, JAI_CONSTANTS.TAX_TYPE_EXC_ADDITIONAL, JAI_CONSTANTS.TAX_TYPE_EXC_OTHER,
1013: JAI_CONSTANTS.TAX_TYPE_EXC_EDU_CESS, JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS, JAI_CONSTANTS.TAX_TYPE_CUSTOMS,
1014: JAI_CONSTANTS.TAX_TYPE_CUSTOMS_EDU_CESS, JAI_CONSTANTS.TAX_TYPE_SH_CUSTOMS_EDU_CESS)

Line 1024: ln_tds_inv_tax_id_st jai_ap_tds_inv_taxes.tds_inv_tax_id%type;

1020: and jadit.invoice_distribution_id = p_invoice_distribution_id
1021: and jadit.invoice_id = p_invoice_id */;
1022:
1023:
1024: ln_tds_inv_tax_id_st jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
1025:
1026: /*End additions by mmurtuza for bug 12858951 Post review*/
1027:
1028: ln_tds_inv_tax_id jai_ap_tds_inv_taxes.tds_inv_tax_id%type;

Line 1028: ln_tds_inv_tax_id jai_ap_tds_inv_taxes.tds_inv_tax_id%type;

1024: ln_tds_inv_tax_id_st jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
1025:
1026: /*End additions by mmurtuza for bug 12858951 Post review*/
1027:
1028: ln_tds_inv_tax_id jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
1029: ln_check_if_tax_is_input number; --File.Sql.35 Cbabu :=0;
1030: lv_actual_section_code jai_ap_tds_inv_taxes.actual_section_code%type;
1031: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;
1032: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;

Line 1030: lv_actual_section_code jai_ap_tds_inv_taxes.actual_section_code%type;

1026: /*End additions by mmurtuza for bug 12858951 Post review*/
1027:
1028: ln_tds_inv_tax_id jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
1029: ln_check_if_tax_is_input number; --File.Sql.35 Cbabu :=0;
1030: lv_actual_section_code jai_ap_tds_inv_taxes.actual_section_code%type;
1031: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;
1032: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
1033: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
1034:

Line 1031: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;

1027:
1028: ln_tds_inv_tax_id jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
1029: ln_check_if_tax_is_input number; --File.Sql.35 Cbabu :=0;
1030: lv_actual_section_code jai_ap_tds_inv_taxes.actual_section_code%type;
1031: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;
1032: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
1033: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
1034:
1035: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;

Line 1032: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;

1028: ln_tds_inv_tax_id jai_ap_tds_inv_taxes.tds_inv_tax_id%type;
1029: ln_check_if_tax_is_input number; --File.Sql.35 Cbabu :=0;
1030: lv_actual_section_code jai_ap_tds_inv_taxes.actual_section_code%type;
1031: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;
1032: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
1033: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
1034:
1035: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;
1036: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;

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

1029: ln_check_if_tax_is_input number; --File.Sql.35 Cbabu :=0;
1030: lv_actual_section_code jai_ap_tds_inv_taxes.actual_section_code%type;
1031: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;
1032: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
1033: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
1034:
1035: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;
1036: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;
1037: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;

Line 1035: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;

1031: ln_actual_tax_id jai_ap_tds_inv_taxes.actual_tax_id%type;
1032: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
1033: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
1034:
1035: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;
1036: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;
1037: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;
1038: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;
1039:

Line 1036: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;

1032: ln_default_tax_id jai_ap_tds_inv_taxes.default_tax_id%type;
1033: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
1034:
1035: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;
1036: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;
1037: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;
1038: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;
1039:
1040: lv_input_dff_value varchar2(50);

Line 1037: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;

1033: lv_consider_for_redefault jai_ap_tds_inv_taxes.consider_for_redefault%type; --File.Sql.35 Cbabu := 'N';
1034:
1035: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;
1036: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;
1037: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;
1038: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;
1039:
1040: lv_input_dff_value varchar2(50);
1041: lv_user_deleted_tax_flag jai_ap_tds_inv_taxes.user_deleted_tax_flag%type; --File.Sql.35 Cbabu := 'N';

Line 1038: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;

1034:
1035: ln_default_threshold_grp_id jai_ap_tds_inv_taxes.default_threshold_grp_id%type;
1036: ln_default_cum_threshold_slab jai_ap_tds_inv_taxes.default_cum_threshold_slab_id%type;
1037: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;
1038: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;
1039:
1040: lv_input_dff_value varchar2(50);
1041: lv_user_deleted_tax_flag jai_ap_tds_inv_taxes.user_deleted_tax_flag%type; --File.Sql.35 Cbabu := 'N';
1042: lv_process_status jai_ap_tds_inv_taxes.process_status%type;

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

1037: lv_default_cum_threshold_stage jai_ap_tds_inv_taxes.default_cum_threshold_stage%type;
1038: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;
1039:
1040: lv_input_dff_value varchar2(50);
1041: lv_user_deleted_tax_flag jai_ap_tds_inv_taxes.user_deleted_tax_flag%type; --File.Sql.35 Cbabu := 'N';
1042: lv_process_status jai_ap_tds_inv_taxes.process_status%type;
1043:
1044: ln_actual_dff_tax_id number; --Added by Bgowrava for Bug#5911913
1045:

Line 1042: lv_process_status jai_ap_tds_inv_taxes.process_status%type;

1038: ln_default_sin_threshold_slab jai_ap_tds_inv_taxes.default_sin_threshold_slab_id%type;
1039:
1040: lv_input_dff_value varchar2(50);
1041: lv_user_deleted_tax_flag jai_ap_tds_inv_taxes.user_deleted_tax_flag%type; --File.Sql.35 Cbabu := 'N';
1042: lv_process_status jai_ap_tds_inv_taxes.process_status%type;
1043:
1044: ln_actual_dff_tax_id number; --Added by Bgowrava for Bug#5911913
1045:
1046: begin

Line 1144: insert into jai_ap_tds_inv_taxes

1140: if ln_tds_inv_tax_id is null then
1141:
1142: p_codepath := jai_general_pkg.plot_codepath(20, p_codepath); /* 20 */
1143: lv_process_status := 'D';
1144: insert into jai_ap_tds_inv_taxes
1145: (
1146: tds_inv_tax_id ,
1147: invoice_id ,
1148: invoice_line_number ,

Line 1175: jai_ap_tds_inv_taxes_s.nextval ,

1171: last_update_login
1172: )
1173: values
1174: (
1175: jai_ap_tds_inv_taxes_s.nextval ,
1176: p_invoice_id ,
1177: p_invoice_line_number ,
1178: p_invoice_distribution_id ,
1179: P_distribution_line_number ,

Line 1207: update jai_ap_tds_inv_taxes

1203: else
1204:
1205: p_codepath := jai_general_pkg.plot_codepath(21, p_codepath); /* 21 */
1206:
1207: update jai_ap_tds_inv_taxes
1208: set amount = p_amount ,
1209: section_type = p_section_type ,
1210: default_type = p_default_type ,
1211: default_section_code = p_default_section_code ,

Line 1236: update jai_ap_tds_inv_taxes

1232: /*if (p_line_type_lookup_code = 'MISCELLANEOUS' and p_default_from not in ('PO', 'Receipt')) then
1233: open c_upd_servtax_flag_n(p_invoice_id, p_invoice_distribution_id);
1234: fetch c_upd_servtax_flag_n into ln_tds_inv_tax_id_upd_n;
1235: close c_upd_servtax_flag_n;
1236: update jai_ap_tds_inv_taxes
1237: set consider_amt_for_tds = 'N'
1238: where tds_inv_tax_id = ln_tds_inv_tax_id_upd_n;
1239:
1240: if(SQL%ROWCOUNT = 0) then

Line 1245: update jai_ap_tds_inv_taxes

1241:
1242: open c_upd_servtax_flag_y(p_invoice_id, p_invoice_distribution_id);
1243: fetch c_upd_servtax_flag_y into ln_tds_inv_tax_id_upd_y;
1244: close c_upd_servtax_flag_y;
1245: update jai_ap_tds_inv_taxes
1246: set consider_amt_for_tds = 'Y'
1247: where tds_inv_tax_id = ln_tds_inv_tax_id_upd_y;
1248:
1249: end if;

Line 1263: update jai_ap_tds_inv_taxes

1259: open c_no_tds_service_excise_st;
1260: fetch c_no_tds_service_excise_st into ln_tds_inv_tax_id_st;
1261: close c_no_tds_service_excise_st;
1262: if ln_tds_inv_tax_id_st is not null then
1263: update jai_ap_tds_inv_taxes
1264: set consider_amt_for_tds = 'N'
1265: where tds_inv_tax_id = ln_tds_inv_tax_id_st;
1266: else
1267: update jai_ap_tds_inv_taxes

Line 1267: update jai_ap_tds_inv_taxes

1263: update jai_ap_tds_inv_taxes
1264: set consider_amt_for_tds = 'N'
1265: where tds_inv_tax_id = ln_tds_inv_tax_id_st;
1266: else
1267: update jai_ap_tds_inv_taxes
1268: set consider_amt_for_tds = 'Y'
1269: where invoice_id=p_invoice_id
1270: and invoice_distribution_id = p_invoice_distribution_id;
1271: end if;

Line 1279: update jai_ap_tds_inv_taxes

1275: open c_no_tds_service_excise_po;
1276: fetch c_no_tds_service_excise_po into ln_tds_inv_tax_id_st;
1277: close c_no_tds_service_excise_po;
1278: if ln_tds_inv_tax_id_st is not null then
1279: update jai_ap_tds_inv_taxes
1280: set consider_amt_for_tds = 'N'
1281: where tds_inv_tax_id = ln_tds_inv_tax_id_st;
1282: else
1283: update jai_ap_tds_inv_taxes

Line 1283: update jai_ap_tds_inv_taxes

1279: update jai_ap_tds_inv_taxes
1280: set consider_amt_for_tds = 'N'
1281: where tds_inv_tax_id = ln_tds_inv_tax_id_st;
1282: else
1283: update jai_ap_tds_inv_taxes
1284: set consider_amt_for_tds = 'Y'
1285: where invoice_id=p_invoice_id
1286: and invoice_distribution_id = p_invoice_distribution_id;
1287: end if;

Line 1295: update jai_ap_tds_inv_taxes

1291: open c_no_tds_service_excise_rec;
1292: fetch c_no_tds_service_excise_rec into ln_tds_inv_tax_id_st;
1293: close c_no_tds_service_excise_rec;
1294: if ln_tds_inv_tax_id_st is not null then
1295: update jai_ap_tds_inv_taxes
1296: set consider_amt_for_tds = 'N'
1297: where tds_inv_tax_id = ln_tds_inv_tax_id_st;
1298: else
1299: update jai_ap_tds_inv_taxes

Line 1299: update jai_ap_tds_inv_taxes

1295: update jai_ap_tds_inv_taxes
1296: set consider_amt_for_tds = 'N'
1297: where tds_inv_tax_id = ln_tds_inv_tax_id_st;
1298: else
1299: update jai_ap_tds_inv_taxes
1300: set consider_amt_for_tds = 'Y'
1301: where invoice_id=p_invoice_id
1302: and invoice_distribution_id = p_invoice_distribution_id;
1303: end if;

Line 1315: update jai_ap_tds_inv_taxes

1311: if lv_consider_for_redefault = 'Y' and p_section_type = 'TDS_SECTION' then
1312:
1313: p_codepath := jai_general_pkg.plot_codepath(22, p_codepath); /* 22 */
1314:
1315: update jai_ap_tds_inv_taxes
1316: set default_tax_id = ln_default_tax_id
1317: where tds_inv_tax_id <> ln_tds_inv_tax_id
1318: and invoice_id = p_invoice_id
1319: and nvl(invoice_line_number, -9999) = nvl(p_invoice_line_number, -9999)

Line 1369: (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

1365: )
1366: is
1367:
1368: cursor c_get_amount_for_redefault /* AP lines uptake - introduced line */
1369: (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
1370: select sum(amount)
1371: from jai_ap_tds_inv_taxes
1372: where invoice_id = p_invoice_id
1373: --Commented out by Eric Ma for PF bug#7340818 and consider_for_redefault = p_consider_for_redefault--rchandan for bug#4428980

Line 1371: from jai_ap_tds_inv_taxes

1367:
1368: cursor c_get_amount_for_redefault /* AP lines uptake - introduced line */
1369: (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
1370: select sum(amount)
1371: from jai_ap_tds_inv_taxes
1372: where invoice_id = p_invoice_id
1373: --Commented out by Eric Ma for PF bug#7340818 and consider_for_redefault = p_consider_for_redefault--rchandan for bug#4428980
1374: --Commented out by Eric Ma for PF bug#7340818 and user_deleted_tax_flag <> 'Y'
1375: and ( (p_invoice_distribution_id is null ) or (p_invoice_distribution_id is not null and invoice_distribution_id <> p_invoice_distribution_id ) )

Line 1649: from jai_ap_tds_inv_taxes

1645:
1646: cursor c_get_existing_dff_values
1647: (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
1648: select tds_inv_tax_id, default_tax_id, actual_tax_id
1649: from jai_ap_tds_inv_taxes
1650: where invoice_id = p_invoice_id
1651: and nvl(invoice_line_number, -9999) = nvl(p_invoice_line_number, -9999)
1652: and nvl(invoice_distribution_id, -9999) = nvl(p_invoice_distribution_id, -9999)
1653: and section_type = p_section_type;--rchandan for bug#4428980

Line 1740: delete jai_ap_tds_inv_taxes

1736: */
1737: begin
1738:
1739: /* AP lines uptake - introduced line */
1740: delete jai_ap_tds_inv_taxes
1741: where invoice_id = p_invoice_id
1742: and (
1743: (p_invoice_line_number is null ) or
1744: (p_invoice_line_number is not null and invoice_line_number = p_invoice_line_number)

Line 1774: cursor c_jai_ap_tds_inv_taxes_inv(p_invoice_id number) is

1770: p_new_transaction out nocopy varchar2
1771: )
1772: is
1773:
1774: cursor c_jai_ap_tds_inv_taxes_inv(p_invoice_id number) is
1775: select 'Y'
1776: from jai_ap_tds_inv_taxes
1777: where invoice_id = p_invoice_id;
1778:

Line 1776: from jai_ap_tds_inv_taxes

1772: is
1773:
1774: cursor c_jai_ap_tds_inv_taxes_inv(p_invoice_id number) is
1775: select 'Y'
1776: from jai_ap_tds_inv_taxes
1777: where invoice_id = p_invoice_id;
1778:
1779:
1780: cursor c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id number) is

Line 1780: cursor c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id number) is

1776: from jai_ap_tds_inv_taxes
1777: where invoice_id = p_invoice_id;
1778:
1779:
1780: cursor c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id number) is
1781: select 'Y'
1782: from jai_ap_tds_inv_taxes
1783: where invoice_distribution_id = p_invoice_distribution_id;
1784:

Line 1782: from jai_ap_tds_inv_taxes

1778:
1779:
1780: cursor c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id number) is
1781: select 'Y'
1782: from jai_ap_tds_inv_taxes
1783: where invoice_distribution_id = p_invoice_distribution_id;
1784:
1785: lv_new_transaction varchar2(1);
1786:

Line 1793: open c_jai_ap_tds_inv_taxes_inv(p_invoice_id);

1789: lv_new_transaction := 'N';
1790:
1791: if p_invoice_id is not null then
1792:
1793: open c_jai_ap_tds_inv_taxes_inv(p_invoice_id);
1794: fetch c_jai_ap_tds_inv_taxes_inv into lv_new_transaction;
1795: close c_jai_ap_tds_inv_taxes_inv;
1796:
1797: elsif p_invoice_distribution_id is not null then

Line 1794: fetch c_jai_ap_tds_inv_taxes_inv into lv_new_transaction;

1790:
1791: if p_invoice_id is not null then
1792:
1793: open c_jai_ap_tds_inv_taxes_inv(p_invoice_id);
1794: fetch c_jai_ap_tds_inv_taxes_inv into lv_new_transaction;
1795: close c_jai_ap_tds_inv_taxes_inv;
1796:
1797: elsif p_invoice_distribution_id is not null then
1798:

Line 1795: close c_jai_ap_tds_inv_taxes_inv;

1791: if p_invoice_id is not null then
1792:
1793: open c_jai_ap_tds_inv_taxes_inv(p_invoice_id);
1794: fetch c_jai_ap_tds_inv_taxes_inv into lv_new_transaction;
1795: close c_jai_ap_tds_inv_taxes_inv;
1796:
1797: elsif p_invoice_distribution_id is not null then
1798:
1799: open c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id);

Line 1799: open c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id);

1795: close c_jai_ap_tds_inv_taxes_inv;
1796:
1797: elsif p_invoice_distribution_id is not null then
1798:
1799: open c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id);
1800: fetch c_jai_ap_tds_inv_taxes_dist into lv_new_transaction;
1801: close c_jai_ap_tds_inv_taxes_dist;
1802:
1803: end if;

Line 1800: fetch c_jai_ap_tds_inv_taxes_dist into lv_new_transaction;

1796:
1797: elsif p_invoice_distribution_id is not null then
1798:
1799: open c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id);
1800: fetch c_jai_ap_tds_inv_taxes_dist into lv_new_transaction;
1801: close c_jai_ap_tds_inv_taxes_dist;
1802:
1803: end if;
1804:

Line 1801: close c_jai_ap_tds_inv_taxes_dist;

1797: elsif p_invoice_distribution_id is not null then
1798:
1799: open c_jai_ap_tds_inv_taxes_dist(p_invoice_distribution_id);
1800: fetch c_jai_ap_tds_inv_taxes_dist into lv_new_transaction;
1801: close c_jai_ap_tds_inv_taxes_dist;
1802:
1803: end if;
1804:
1805: p_new_transaction := nvl(lv_new_transaction, 'N');