DBA Data[Home] [Help]

APPS.JAI_AP_IA_DTC_TRIGGER_PKG dependencies on JAI_AP_TDS_THHOLD_TRXS

Line 38: cursor c_jai_ap_tds_thhold_trxs(p_invoice_id number) is

34: lv_payment varchar2(1) := 'N';
35:
36:
37: /*Get transaction records by invoice_id*/
38: cursor c_jai_ap_tds_thhold_trxs(p_invoice_id number) is
39: select threshold_trx_id,
40: threshold_grp_id,
41: threshold_hdr_id,
42: tax_category_id,

Line 50: from jai_ap_tds_thhold_trxs

46: invoice_to_tds_authority_id,
47: invoice_to_vendor_id,
48: tds_event,
49: calc_tax_amount
50: from jai_ap_tds_thhold_trxs
51: where invoice_id = p_invoice_id
52: and (tds_event = 'INVOICE VALIDATE' or
53: tds_event like 'THRESHOLD TRANSITION%' or
54: tds_event = 'SURCHARGE_CALCULATE')

Line 78: from jai_ap_tds_inv_taxes jatit, jai_ap_tds_thhold_trxs jattt

74: cursor c_threshold_breach(p_invoice_id number) is
75: select jattt.invoice_id,
76: jattt.tds_event,
77: jattt.invoice_to_tds_authority_id
78: from jai_ap_tds_inv_taxes jatit, jai_ap_tds_thhold_trxs jattt
79: where jatit.invoice_id = p_invoice_id
80: and jatit.default_cum_threshold_stage = 'BEFORE THRESHOLD'
81: and jatit.threshold_grp_id = jattt.threshold_grp_id
82: and jattt.tds_event like 'THRESHOLD%'

Line 84: from jai_ap_tds_thhold_trxs

80: and jatit.default_cum_threshold_stage = 'BEFORE THRESHOLD'
81: and jatit.threshold_grp_id = jattt.threshold_grp_id
82: and jattt.tds_event like 'THRESHOLD%'
83: and not exists (select '1'
84: from jai_ap_tds_thhold_trxs
85: where invoice_id = jatit.invoice_id); /*to ensure that no TDS is deducted*/
86:
87: lv_invoice_payment_status ap_invoices_all.payment_status_flag%TYPE;
88:

Line 164: FOR cur_rec IN c_jai_ap_tds_thhold_trxs(pr_old.invoice_id) LOOP

160: if pr_old.cancelled_date is null and pr_new.cancelled_date is not null then
161: JAI_CMN_UTILS_PKG.WRITE_FND_LOG(G_LEVEL_STATEMENT, GV_MODULE_PREFIX ||'.'|| lv_proc_name, 'Cancelling invoice' || pr_old.invoice_id);
162:
163: IF pr_new.source <> 'INDIA TDS' THEN /* 'TDS' then --Ramanand for bug#4388958 */
164: FOR cur_rec IN c_jai_ap_tds_thhold_trxs(pr_old.invoice_id) LOOP
165:
166: /**Check payment status of TDS invoice to authority */
167: IF cur_rec.invoice_to_tds_authority_id IS NOT NULL THEN
168: lv_invoice_payment_status := get_invoice_payment_status(cur_rec.invoice_to_tds_authority_id);

Line 252: END LOOP; /*cur_rec IN c_jai_ap_tds_thhold_trxs(pr_old.invoice_id) LOOP*/

248: JAI_CMN_UTILS_PKG.WRITE_FND_LOG(G_LEVEL_ERROR, GV_MODULE_PREFIX ||'.'|| lv_proc_name, pv_return_message || ' invoice_id :' ||cur_rec.invoice_to_vendor_id);
249: return;
250: end if;
251: end if; /* lv_open_period is null */
252: END LOOP; /*cur_rec IN c_jai_ap_tds_thhold_trxs(pr_old.invoice_id) LOOP*/
253:
254: /**To check the invoices for which the TDS has not been deducted as threshold is not breached and same threshold having crossed with another invoice and is paid.*/
255: for r_threshold_breach in c_threshold_breach(pr_old.invoice_id) loop
256: if (r_threshold_breach.tds_event like 'THRESHOLD TRANSITION%') then

Line 263: from jai_ap_tds_thhold_trxs

259: elsif (r_threshold_breach.tds_event like 'THRESHOLD ROLLBACK%') then
260: lv_count := lv_count - 1;
261: end if;
262: for tds_id in (select invoice_to_tds_authority_id
263: from jai_ap_tds_thhold_trxs
264: where invoice_id = r_threshold_breach.invoice_id) loop
265:
266: if get_invoice_payment_status(tds_id.invoice_to_tds_authority_id) <> 'N' and
267: lv_payment = 'N' then