1)What is the name of the supplier who sent this invoice?
2. What is the amount and date of this invoice?
3. To what accounts was this invoice distributed?
4. What is the invoice due date and the amount left to be paid on this invoice?
1) SELECT v.vendor_name, v.vendor_id
FROM ap_supliers v, ap_invoices_all i
WHERE i.vendor_site_id = 12
AND i.invoice_num = 'W33578'
AND i.org_id = 204
AND v.vendor_id = i.vendor_id;
SELECT invoice_amount, invoice_date, invoice_id
WHERE vendor_site_id = 12 AND invoice_num = 'W33578' AND org_id = 204;
FROM gl_code_combinations c, ap_invoice_distributions_all d
WHERE d.invoice_id = 10916
AND c.chart_of_accounts_id = 101
AND c.code_combination_id = d.dist_code_combination_id
SELECT due_date, amount_remaining
WHERE invoice_id = 10916;