DBA Data[Home] [Help]

APPS.JAI_AP_DTC_CANCELLATION_PKG dependencies on JAI_AP_TDS_THHOLD_TRXS

Line 28: cursor c_jai_ap_tds_thhold_trxs(p_invoice_id number) is --rchandan for bug#4428980

24: PROCEDURE process_invoice_cancellation(errbuf out nocopy varchar2,
25: retcode out nocopy varchar2,
26: p_invoice_id in number) is
27:
28: cursor c_jai_ap_tds_thhold_trxs(p_invoice_id number) is --rchandan for bug#4428980
29: select threshold_trx_id,
30: threshold_grp_id,
31: threshold_hdr_id, --Added by Sanjikum for Bug#5131075(4718907)
32: tax_category_id,

Line 40: from jai_ap_tds_thhold_trxs

36: invoice_to_tds_authority_id,
37: invoice_to_vendor_id,
38: tds_event, -- Added by Jia for FP Bug#7312295
39: calc_tax_amount -- Bug 5751783
40: from jai_ap_tds_thhold_trxs
41: where invoice_id = p_invoice_id
42: and (tds_event = 'INVOICE VALIDATE' or
43: tds_event like 'THRESHOLD TRANSITION%' -- Added by ChongLei for DTC Bug#13359892
44: --or tds_event = 'SURCHARGE_CALCULATE' --Bug 7312295 - Added condition 'or tds_event = 'SURCHARGE_CALCULATE' --Commented Surcharge_calcualte by Chong for bug#16414088

Line 115: from jai_ap_tds_thhold_trxs jattt

111: -- Added by ChongLei for DTC Bug#13359892, Begin
112: -------------------------------------------------------------------------------
113: and not exists
114: (select jattt.invoice_to_tds_authority_id
115: from jai_ap_tds_thhold_trxs jattt
116: ,ap_invoices_all aia
117: where jattt.threshold_trx_id in(
118: select max(threshold_trx_id)
119: from jai_ap_tds_thhold_trxs

Line 119: from jai_ap_tds_thhold_trxs

115: from jai_ap_tds_thhold_trxs jattt
116: ,ap_invoices_all aia
117: where jattt.threshold_trx_id in(
118: select max(threshold_trx_id)
119: from jai_ap_tds_thhold_trxs
120: where invoice_id = p_invoice_id
121: and tds_section_code = jtdsi.actual_section_code
122: and tds_event not like 'THRESHOLD ROLLBACK%'
123: and tds_event <> 'INVOICE CANCEL' -- Added by ChongLei for DTC Bug#13859847

Line 141: from jai_ap_tds_inv_taxes jatit, jai_ap_tds_thhold_trxs jattt

137: cursor c_threshold_breach(p_invoice_id number) is
138: select jattt.invoice_id,
139: jattt.tds_event,
140: jattt.invoice_to_tds_authority_id
141: from jai_ap_tds_inv_taxes jatit, jai_ap_tds_thhold_trxs jattt
142: where jatit.invoice_id = p_invoice_id
143: and jatit.default_cum_threshold_stage = 'BEFORE THRESHOLD'
144: and jatit.threshold_grp_id = jattt.threshold_grp_id
145: and jattt.tds_event like 'THRESHOLD%'

Line 147: from jai_ap_tds_thhold_trxs

143: and jatit.default_cum_threshold_stage = 'BEFORE THRESHOLD'
144: and jatit.threshold_grp_id = jattt.threshold_grp_id
145: and jattt.tds_event like 'THRESHOLD%'
146: and not exists (select '1'
147: from jai_ap_tds_thhold_trxs
148: where invoice_id = jatit.invoice_id); /*to ensure that no TDS is deducted*/
149: lv_count number := 0;
150: lv_payment varchar2(1) := 'N';
151: /*end-ETDS FVU3.1 11896260*/

Line 330: FOR cur_rec in c_jai_ap_tds_thhold_trxs(p_invoice_id) LOOP

326:
327: lv_codepath := jai_general_pkg.plot_codepath(2, lv_codepath); /* 2 */
328:
329: /* Get all the TDS invoices that were generated at the time of the INVOICE VALIDATE */
330: FOR cur_rec in c_jai_ap_tds_thhold_trxs(p_invoice_id) LOOP
331: --Fnd_File.put_line(Fnd_File.LOG, ' Inside Loop');
332: IF ( ln_proc_level >= ln_dbg_level)
333: THEN
334: FND_LOG.STRING ( ln_proc_level

Line 904: UPDATE JAI_AP_TDS_THHOLD_TRXS

900: goto end_of_main_loop;
901: END IF;
902:
903: /*update TDS_ROLLBACKED to Y for this transaction record*/
904: UPDATE JAI_AP_TDS_THHOLD_TRXS
905: SET TDS_ROLLBACKED = 'Y'
906: WHERE threshold_trx_id = cur_rec.threshold_trx_id;
907:
908: r_ap_invoices_all := NULL;

Line 988: from jai_ap_tds_thhold_trxs

984: elsif (r_threshold_breach.tds_event like 'THRESHOLD ROLLBACK%') then
985: lv_count := lv_count - 1;
986: end if;
987: for tds_id in (select invoice_to_tds_authority_id
988: from jai_ap_tds_thhold_trxs
989: where invoice_id = r_threshold_breach.invoice_id) loop
990:
991: open c_ap_invoices_all(tds_id.invoice_to_tds_authority_id);
992: fetch c_ap_invoices_all