Monday, January 11, 2010

Get all vtigerCRM invoices

The following query gets vtigerCRM Invoice List
SELECT t1.invoice_no AS 'Invoice No'
, t1.subject AS 'Subject'
, t3.subject AS 'Sales Order'
, t1.invoicestatus AS 'Status'
, t1.total AS 'Total'
, t4.user_name AS 'Assigned To'
FROM vtiger_invoice t1
INNER JOIN vtiger_crmentity t2 ON t1.invoiceid = t2.crmid AND t2.setype='Invoice'
LEFT JOIN vtiger_salesorder t3 ON t1.salesorderid = t3.salesorderid
INNER JOIN vtiger_users t4 ON t2.smownerid = t4.id

No comments:

Post a Comment

Oracle Query