DBA Data[Home] [Help]

APPS.JAI_AP_TDS_POP_RPST_PKG dependencies on JAI_AP_TDS_THHOLD_TRXS

Line 171: FROM jai_ap_tds_thhold_trxs jattt

167: ,jattt.tds_authority_vendor_id
168: ,jattt.tds_authority_vendor_site_id
169: --,NVL(REGEXP_SUBSTR(jattt.invoice_to_tds_authority_num, '(WCT|TDS|ESSI)-\w+-\d+$',1,1,'i',1), G_TDS) withhold_tax_type
170: ,jctca.effective_tds_rate
171: FROM jai_ap_tds_thhold_trxs jattt
172: ,ap_invoices_all tds_inv
173: ,jai_cmn_tax_ctgs_all jctca
174: WHERE jattt.invoice_to_tds_authority_id = tds_inv.invoice_id
175: AND jattt.tax_category_id = jctca.tax_category_id(+)

Line 753: FROM jai_ap_tds_thhold_trxs

749:
750: CURSOR c_chk_threshold_rollback(p_threshold_grp_id IN NUMBER)
751: IS
752: SELECT invoice_to_tds_authority_id
753: FROM jai_ap_tds_thhold_trxs
754: WHERE tds_event LIKE 'THRESHOLD ROLLBACK%'
755: AND threshold_grp_id = p_threshold_grp_id
756: AND invoice_to_tds_authority_id > (SELECT MAX(invoice_to_tds_authority_id)
757: FROM jai_ap_tds_thhold_trxs

Line 757: FROM jai_ap_tds_thhold_trxs

753: FROM jai_ap_tds_thhold_trxs
754: WHERE tds_event LIKE 'THRESHOLD ROLLBACK%'
755: AND threshold_grp_id = p_threshold_grp_id
756: AND invoice_to_tds_authority_id > (SELECT MAX(invoice_to_tds_authority_id)
757: FROM jai_ap_tds_thhold_trxs
758: WHERE threshold_grp_id = p_threshold_grp_id
759: AND tds_event LIKE 'THRESHOLD TRANSITION%'
760: );
761:

Line 766: FROM jai_ap_tds_thhold_trxs jattt_out

762: --Get effective surcharge calculate transactions, which not be rollbacked.
763: CURSOR c_effective_surcharge(p_threshold_grp_id IN NUMBER)
764: IS
765: SELECT jattt_out.invoice_to_tds_authority_id
766: FROM jai_ap_tds_thhold_trxs jattt_out
767: WHERE jattt_out.tds_event = G_SURCHARGE_CALCULATE
768: AND jattt_out.threshold_grp_id = p_threshold_grp_id
769: AND NOT EXISTS (SELECT 1
770: FROM jai_ap_tds_thhold_trxs jattt_in

Line 770: FROM jai_ap_tds_thhold_trxs jattt_in

766: FROM jai_ap_tds_thhold_trxs jattt_out
767: WHERE jattt_out.tds_event = G_SURCHARGE_CALCULATE
768: AND jattt_out.threshold_grp_id = p_threshold_grp_id
769: AND NOT EXISTS (SELECT 1
770: FROM jai_ap_tds_thhold_trxs jattt_in
771: WHERE jattt_in.threshold_grp_id = p_threshold_grp_id
772: AND jattt_in.tds_event = G_SURCHARGE_ROLLBACK
773: AND jattt_in.threshold_trx_id > jattt_out.threshold_trx_id
774: );

Line 814: FROM jai_ap_tds_thhold_trxs jattt

810: ,jattt.taxable_amount
811: ,jattt.tax_category_id
812: ,jattt.tds_authority_vendor_id
813: ,jattt.tds_authority_vendor_site_id
814: FROM jai_ap_tds_thhold_trxs jattt
815: WHERE jattt.threshold_trx_id = p_thhold_trx_id
816: ;
817: --get prepayment distribution id
818: CURSOR c_get_prepay_dist_id( pn_inv_dist_id NUMBER

Line 850: FROM jai_ap_tds_thhold_trxs

846: , TDS_INV_TAX_AMOUNT
847: , base_tax_amount
848: FROM jai_ap_tds_repository
849: WHERE invoice_id = (SELECT MAX(invoice_to_tds_authority_id)
850: FROM jai_ap_tds_thhold_trxs
851: WHERE threshold_grp_id = p_threshold_grp_id
852: AND tds_event LIKE 'THRESHOLD TRANSITION%'
853: )
854: AND MIGRATED = G_Y

Line 921: --Step 1. Pick all TDS invoices base on jai_ap_tds_thhold_trxs table.

917: FROM jai_ap_tds_thhold_grps jattg
918: )
919: LOOP
920:
921: --Step 1. Pick all TDS invoices base on jai_ap_tds_thhold_trxs table.
922: INSERT INTO jai_ap_tds_repository (
923: TDS_REPOSITORY_ID
924: ,INVOICE_ID
925: ,INVOICE_NUMBER

Line 1059: from jai_ap_tds_thhold_trxs jattt

1055: ,fnd_global.user_id
1056: ,sysdate
1057: ,fnd_global.login_id
1058: ,fnd_global.user_id
1059: from jai_ap_tds_thhold_trxs jattt
1060: , ap_invoices_all base_invoices
1061: , ap_invoices_all tds_invoices
1062: , ap_invoices_all vendor_invoices
1063: , JAI_RGM_ORG_REGNS_V jror

Line 1808: and not exists (select 1 from jai_ap_tds_thhold_trxs where invoice_id = jatit.invoice_id)

1804: AND aia.vendor_site_id = jte.vendor_site_id
1805: AND aia.invoice_id = aida.invoice_id
1806: AND aida.match_status_flag in ('A','T')
1807: AND aia.invoice_type_lookup_code IN ('STANDARD','PREPAYMENT')
1808: and not exists (select 1 from jai_ap_tds_thhold_trxs where invoice_id = jatit.invoice_id)
1809: and jitc.tax_rate = 0
1810: and jitc.vendor_id = r_tds_vendor_rec.vendor_id
1811: AND aia.org_id = jror.organization_id
1812: AND jror.regime_code = G_TDS

Line 1947: and not exists (select '1' from jai_ap_tds_thhold_trxs jattt where jattt.invoice_id = base_invoices.invoice_id) /*Bug 10408793 - TDS should not be deducted*/

1943: and aida.global_attribute_category = 'JA.IN.APXINWKB.DISTRIBUTIONS'
1944: and aida.invoice_id = base_invoices.invoice_id
1945: and aida.match_status_flag in ('A','T') /*10408793 - Unvalidated Invoices must not be picked*/
1946: and base_invoices.invoice_type_lookup_code IN ('STANDARD','PREPAYMENT')
1947: and not exists (select '1' from jai_ap_tds_thhold_trxs jattt where jattt.invoice_id = base_invoices.invoice_id) /*Bug 10408793 - TDS should not be deducted*/
1948: and not exists (select '1'
1949: from jai_ap_tds_repository jatr
1950: where jatr.source_invoice_id = base_invoices.invoice_id
1951: and jatr.migrated= G_Y)

Line 2006: and not exists (select '1' from jai_ap_tds_thhold_trxs jattt where jattt.invoice_id = base_invoices.invoice_id)

2002: AND jror.regime_code = G_TDS
2003: AND jror.registration_type = 'OTHERS'
2004: AND jror.attribute_code = 'TAN NO'
2005: and base_invoices.invoice_type_lookup_code IN ('STANDARD','PREPAYMENT')
2006: and not exists (select '1' from jai_ap_tds_thhold_trxs jattt where jattt.invoice_id = base_invoices.invoice_id)
2007: and not exists (select '1'
2008: from jai_ap_tds_repository jatr
2009: where jatr.source_invoice_id = base_invoices.invoice_id
2010: and jatr.migrated= G_Y)