openbravo: custom query to find invoice's product account

SELECT c_invoice.documentno, c_invoiceline.linenetamt, --m_product_acct.m_product_id, --m_product_acct.ad_org_id, m_product_acct.p_expense_acct, c_elementvalue.name FROM c_invoice LEFT JOIN c_invoiceline ON c_invoice.c_invoice_id = c_invoiceline.c_invoice_id LEFT JOIN m_product_acct ON c_invoiceline.m_product_id = […]