Você está na página 1de 1

select api.

doc_sequence_value vouch_no,
api.invoice_num,
pov.vendor_name,
p_open_period open_period,
to_char (api.invoice_date, 'DD-MON-YYYY') invrcvddt,
api.invoice_currency_code curr,
pol.requisition_line_id
and po.po_header_id = poh.po_header_id
and pa.project_id = pod.project_id
and po.attribute2 = por.segment1)))
rtask
from ap_invoices_all api,
po_vendors pov,
fnd_lookup_values fnd,
po_headers_all poh
where api.vendor_id = pov.vendor_id
and api.attribute7 is not null
and fnd.description = 'ENGG'
and poh.type_lookup_code = 'BLANKET'
AND api.doc_sequence_value NOT IN (SELECT ATTRIBUTE3 FROM
RCV_SHIPMENT_HEADERS WHERE ATTRIBUTE3=api.doc_sequence_value AND ATTRIBUTE3 IS NOT
NULL)
and fnd.lookup_code = api.attribute7
-- and poh.segment1 in
('4004992','4004993','4004994','4004995','4004996','4004997','4004998','4004999')
api.invoice_amount,
api.payment_status_flag,
api.invoice_type_lookup_code),
'NEVER APPROVED', 'Never Validated',
'NEEDS REAPPROVAL', 'Needs Revalidation',
'CANCELLED', 'Cancelled',
'Validated') not like
('Cancelled')) where rproject <> 'E0000';

Você também pode gostar