Total Pageviews

Saturday, April 6, 2013


Vendor-Statement-Report-in-AP

select
haou.name ”Entity”,
aia.invoice_num “Invoice Number”,
aia.voucher_num “Voucher Number”,
aia.description “Invoice Description”,
pv.vendor_name “Supplier”,
pvs.vendor_site_code “Supplier Site”,
aia.invoice_amount “Invoice Amount”,
aia.invoice_currency_code “Currency”,
aia.payment_status_flag “Payment Status”,
aia.amount_paid “Amount Paid”,
–aida.distribution_line_number “Invoice Distribution Num”,
–aida.amount “Invoice Distribution Amount”,
poh.segment1 “PO Number”,
–poh.comments “PO Description”,
–pol.line_num “PO Line Number”,
–pll.shipment_num “PO Shipment Number”,
–pod.distribution_num “PO Distribution Number”,
aca.check_number “Cheque Number”,
aca.check_date “Payment Date”,
pay.accounting_date “Accounting Date”,
aca.status_lookup_code “Cheque Status”,
aca.bank_account_name “Bank Acc Name”
from
gl_sets_of_books sob,
hr_all_organization_units haou,
ap_invoices_all aia,
ap_invoice_distributions_all aida,
ap_invoice_payments_all pay,
ap_checks_all aca,
po_vendors pv,
po_vendor_sites_all pvs,
po_headers_all poh,
po_lines_all pol,
po_distributions_all pod,
po_line_locations_all pll
where aia.set_of_books_id = sob.set_of_books_id
and aia.invoice_id = aida.invoice_id
and aia.org_id = haou.organization_id
and aia.invoice_id = pay.invoice_id(+)
and pay.check_id = aca.check_id(+)
and aia.vendor_id = pv.vendor_id
and aia.vendor_site_id = pvs.vendor_site_id
and aida.po_distribution_id = pod.po_distribution_id
and pod.po_line_id = pol.po_line_id
and pod.po_header_id = poh.po_header_id
and poh.po_header_id = pll.po_header_id

No comments:

Post a Comment