[Home] [Help]
200: from
201: ap_checks_all aca ,
202: ap_invoice_payments_all aipa ,
203: ap_invoices_all aia ,
204: jai_ap_tds_thhold_trxs jattt,
205: JAI_CMN_TAXES_ALL jitc
206: where
207: aca.check_id = aipa.check_id
208: and aipa.invoice_id = jattt.invoice_to_tds_authority_id
302: where invoice_id = aia.invoice_id
303: )
304: and not exists (
305: SELECT 1
306: FROM jai_ap_tds_thhold_trxs
307: WHERE invoice_to_tds_authority_id = aia.invoice_id
308: )/*bduvarag for Bug#5647725*/
309:
310: ;
444: aia.attribute1 ,
445: aida_prepayment.invoice_id
446: ;
447:
448: cursor c_jai_ap_tds_thhold_trxs(pn_invoice_to_tds_authority_id number) is
449: select
450: jatt.threshold_trx_id,
451: jatt.invoice_id,
452: jatc.section_code tds_section,
456: jatt.tax_amount,
457: jatt.vendor_id,
458: jatt.vendor_site_id
459: from
460: jai_ap_tds_thhold_trxs jatt,
461: JAI_CMN_TAXES_ALL jatc
462: where
463: jatt.invoice_to_tds_authority_id = pn_invoice_to_tds_authority_id
464: and jatc.tax_id = jatt.tax_id
571: from
572: ap_checks_all aca ,
573: ap_invoice_payments_all aipa ,
574: ap_invoices_all aia ,
575: jai_ap_tds_thhold_trxs jattt,
576: JAI_CMN_TAXES_ALL jitc
577: where
578: aca.check_id = aipa.check_id
579: and aipa.invoice_id = jattt.invoice_to_tds_authority_id
936: fetch c_get_payment_details into r_get_payment_details;
937: close c_get_payment_details;
938:
939: /* Check if the TDS invoice is created post clean up then get all info from there */
940: open c_jai_ap_tds_thhold_trxs(cur_rec.invoice_id);
941: fetch c_jai_ap_tds_thhold_trxs into
942: ln_threshold_trx_id,
943: ln_parent_invoice_id,
944: lv_section_code ,
937: close c_get_payment_details;
938:
939: /* Check if the TDS invoice is created post clean up then get all info from there */
940: open c_jai_ap_tds_thhold_trxs(cur_rec.invoice_id);
941: fetch c_jai_ap_tds_thhold_trxs into
942: ln_threshold_trx_id,
943: ln_parent_invoice_id,
944: lv_section_code ,
945: ln_tax_id,
947: ln_taxable_basis,
948: ln_tax_amount,
949: ln_vendor_id,
950: ln_vendor_site_id;
951: close c_jai_ap_tds_thhold_trxs;
952:
953: if ln_threshold_trx_id is not null then
954: goto populate_invoice_details;
955: end if;
1394: for update of certificate_line_num;
1395:
1396: cursor c_tds_thhold_event(cp_threshold_trx_id number) is
1397: select tds_event
1398: from jai_ap_tds_thhold_trxs
1399: where threshold_trx_id = cp_threshold_trx_id;
1400:
1401: cursor c_get_form16_hdr_id is
1402: select jai_ap_tds_f16_hdrs_all_s.nextval from dual;
1419: where fin_year = p_fin_year;
1420:
1421: ln_cert_line_num NUMBER(15);
1422: ln_prev_parent_invoice_id ap_invoices_all.invoice_id%TYPE;
1423: -- lv_prev_tds_event jai_ap_tds_thhold_trxs.tds_event%TYPE;
1424: /*Bug 5647725 bduvarag*/
1425: lv_tds_event jai_ap_tds_thhold_trxs.tds_event%TYPE;
1426:
1427:
1421: ln_cert_line_num NUMBER(15);
1422: ln_prev_parent_invoice_id ap_invoices_all.invoice_id%TYPE;
1423: -- lv_prev_tds_event jai_ap_tds_thhold_trxs.tds_event%TYPE;
1424: /*Bug 5647725 bduvarag*/
1425: lv_tds_event jai_ap_tds_thhold_trxs.tds_event%TYPE;
1426:
1427:
1428: --r_hr_operating_units c_hr_operating_units%rowtype;
1429: r_ja_in_tds_year_info c_ja_in_tds_year_info%rowtype;