The following lines contain the word 'select', 'insert', 'update' or 'delete':
select vendor_id,
vendor_site_id,
org_id
from ap_invoices_all
where invoice_id = p_invoice_id;
select nvl( approved_tds_flag, 'N' ) approved_invoice_flag
from JAI_CMN_VENDOR_SITES
where vendor_id = p_vendor_id
and vendor_site_id = p_vendor_site_id;
select *
from ap_invoice_lines_all
where invoice_id = cp_invoice_id
and line_number = cp_line_number;
Select *
from ap_invoices_all
where invoice_id = cp_invoice_id;
select *
from JAI_PO_RCV_TAXES_V jpr
where jpr.match_type = cp_match_type
and jpr.trx_id = cp_trx_id
and jpr.vendor_id = cp_vendor_id;
select tax_name, mod_cr_percentage, rounding_factor
from JAI_CMN_TAXES_ALL
where tax_id = cp_tax_id;
select lt.tax_rate, lt.uom, lt.qty_rate
from JAI_RCV_LINE_TAXES lt, RCV_TRANSACTIONS rt
where tax_id = cp_tax_id
and lt.shipment_line_id = rt.shipment_line_id
and rt.transaction_id = cp_trx_id;
select tax_rate, uom, qty_rate
from JAI_PO_TAXES
where line_location_id = cp_line_loc_id
and po_header_id = cp_po_header_id
and po_line_id = cp_po_line_id
and tax_id = cp_tax_id;
Select shipment_num
INTO lv_shipment_num
From rcv_headers_interface
Where invoice_num =invs_rec.invoice_num;
l_tax_line_tbl.Delete();
/* Update invoice Ids in TDS tables for TDS invoices */
if pv_action = jai_constants.inserting and pr_rec.source = 'INDIA TDS' then /* 'TDS' then --Ramanand for bug#4388958 */
--jai_ap_tds_generation_pkg.populate_tds_invoice_id
jai_ap_dtc_generation_pkg.populate_tds_invoice_id --Update to call new DTC generation package. bug#16778906 2013/05/09
(
p_invoice_id => pr_rec.invoice_id,
p_invoice_num => pr_rec.invoice_num,
p_vendor_id => pr_rec.vendor_id,
p_vendor_site_id => pr_rec.vendor_site_id,
p_process_flag => lv_process_flag,
p_process_message => lv_process_message
);
end if; /* Update invoice Ids in TDS tables for TDS invoices */
/* Update invoice Ids in Third Party tables for Third Party invoices */
if pv_action = jai_constants.inserting and pr_rec.source = 'INDIA TAX INVOICE' then /* 'RECEIPT' then --Ramanand for bug#4388958 */
jai_rcv_third_party_pkg.populate_tp_invoice_id
(
p_invoice_id => pr_rec.invoice_id,
p_invoice_num => pr_rec.invoice_num,
p_vendor_id => pr_rec.vendor_id,
p_vendor_site_id => pr_rec.vendor_site_id,
p_process_flag => lv_process_flag,
p_process_message => lv_process_message
);
update AP_INVOICES_ALL
SET WFAPPROVAL_STATUS = 'NOT REQUIRED'
WHERE INVOICE_ID = pr_rec.invoice_id;