DBA Data[Home] [Help]

APPS.JAI_AP_TDS_TAX_DEFAULTATION dependencies on JAI_CMN_TAXES_ALL

Line 101: Fix:Added AND clause to have a join for jai_cmn_taxes_all(jcta2) in cursors c_no_tds_service_excise_po and c_no_tds_service_excise_rec

97: Fix:Commented the union all in cursors c_no_tds_service_excise_rec, c_no_tds_service_excise_po, c_no_tds_service_excise_st
98: where we have a check for excise and customs tax lines.
99: 16. 05-Jun-2012 amandali for bug 14052883
100: Description:TDS not deducted on tax lines other than Service tax
101: Fix:Added AND clause to have a join for jai_cmn_taxes_all(jcta2) in cursors c_no_tds_service_excise_po and c_no_tds_service_excise_rec
102:
103: ---------------------------------------------------------------------------- */
104:
105: procedure process_invoice

Line 525: cursor c_check_receipt_tds_tax(p_shipment_header_id number, p_shipment_line_id number,p_section_type jai_cmn_taxes_all.section_type%type) is--rchandan for bug#4428980

521: shipment_line_id
522: from rcv_transactions
523: where transaction_id = p_rcv_transaction_id;
524:
525: cursor c_check_receipt_tds_tax(p_shipment_header_id number, p_shipment_line_id number,p_section_type jai_cmn_taxes_all.section_type%type) is--rchandan for bug#4428980
526: select jtc.section_code section_code,
527: jrtl.tax_id tax_id
528: from jai_rcv_line_taxes jrtl,
529: jai_cmn_taxes_all jtc

Line 529: jai_cmn_taxes_all jtc

525: cursor c_check_receipt_tds_tax(p_shipment_header_id number, p_shipment_line_id number,p_section_type jai_cmn_taxes_all.section_type%type) is--rchandan for bug#4428980
526: select jtc.section_code section_code,
527: jrtl.tax_id tax_id
528: from jai_rcv_line_taxes jrtl,
529: jai_cmn_taxes_all jtc
530: where jtc.tax_id = jrtl.tax_id
531: and jrtl.tax_type = jai_constants.tax_type_tds
532: and jtc.section_type = p_section_type--rchandan for bug#4428980
533: and jrtl.shipment_header_id = p_shipment_header_id

Line 608: cursor c_po_taxes(p_po_header_id number, p_po_line_id number, p_line_location_id number,p_section_type jai_cmn_taxes_all.section_type%type)--rchandan for bug#4428980

604: from po_distributions_all
605: where po_distribution_id = p_po_distribution_id;
606:
607:
608: cursor c_po_taxes(p_po_header_id number, p_po_line_id number, p_line_location_id number,p_section_type jai_cmn_taxes_all.section_type%type)--rchandan for bug#4428980
609: is
610: select jtc.section_code section_code,
611: jpllt.tax_id tax_id
612: from jai_po_taxes jpllt,

Line 613: jai_cmn_taxes_all jtc

609: is
610: select jtc.section_code section_code,
611: jpllt.tax_id tax_id
612: from jai_po_taxes jpllt,
613: jai_cmn_taxes_all jtc
614: where jpllt.tax_id = jtc.tax_id
615: and jpllt.po_header_id = p_po_header_id
616: and jpllt.po_line_id = p_po_line_id
617: and jpllt.line_location_id = p_line_location_id

Line 624: lv_last_section_type JAI_CMN_TAXES_ALL.section_type%type;

620: order by jpllt.tax_line_no asc;
621:
622:
623: c_rec_po_distributions_all c_po_distributions_all%rowtype;
624: lv_last_section_type JAI_CMN_TAXES_ALL.section_type%type;
625: c_rec_po_taxes c_po_taxes%rowtype;
626:
627: begin
628:

Line 781: cursor c_check_section_applicable(p_vendor_id number, p_vendor_site_id number, p_tds_section_code varchar2,p_section_type JAI_CMN_TAXES_ALL.section_type%type) is--rchandan for bug#4428980

777: from JAI_AP_TDS_VENDOR_HDRS
778: where vendor_id = p_vendor_id
779: and vendor_site_id = p_vendor_site_id;
780:
781: cursor c_check_section_applicable(p_vendor_id number, p_vendor_site_id number, p_tds_section_code varchar2,p_section_type JAI_CMN_TAXES_ALL.section_type%type) is--rchandan for bug#4428980
782: select 'Y'
783: from JAI_AP_TDS_TH_VSITE_V
784: where vendor_id = p_vendor_id
785: and vendor_site_id = p_vendor_site_id

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 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 939: jai_cmn_taxes_all jcta

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%')
942: AND jcta.tax_type in (JAI_CONSTANTS.TAX_TYPE_EXCISE, JAI_CONSTANTS.TAX_TYPE_EXC_ADDITIONAL, JAI_CONSTANTS.TAX_TYPE_EXC_OTHER,
943: JAI_CONSTANTS.TAX_TYPE_EXC_EDU_CESS, JAI_CONSTANTS.TAX_TYPE_SH_EXC_EDU_CESS, JAI_CONSTANTS.TAX_TYPE_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 1381: (p_vendor_id number, p_vendor_site_id number, p_tds_section_code varchar2,p_section_type jai_cmn_taxes_all.section_type%type) is--rchandan for bug#4428980

1377: This is not required as we need to consider all distributions for redefaulting*/
1378: and invoice_distribution_id < p_invoice_distribution_id; --Added by Eric Ma for PF bug#7340818
1379:
1380: cursor c_get_threshold
1381: (p_vendor_id number, p_vendor_site_id number, p_tds_section_code varchar2,p_section_type jai_cmn_taxes_all.section_type%type) is--rchandan for bug#4428980
1382: select threshold_hdr_id
1383: from jai_ap_tds_th_vsite_v
1384: where vendor_id = p_vendor_id
1385: and vendor_site_id = p_vendor_site_id

Line 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

1643: )
1644: is
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)