SELECT DISTINCT aia.invoice_id
, aia.org_id
, aia.invoice_num
, aia.invoice_type_lookup_code
, ap_invoices_pkg.get_approval_status
(aia.invoice_id
, aia.invoice_amount
, aia.payment_status_flag
, aia.invoice_type_lookup_code
) status
FROM ap_invoices_all aia
, ap_invoice_lines_all aila
WHERE 1 = 1
AND aia.invoice_id = aila.invoice_id
AND aia.org_id = aila.org_id
AND aia.org_id = :p_org_id
AND aia.invoice_num = :p_invoice_num
No comments:
Post a Comment