SELECT
 hb_currency(SUM(t.`in`),t.currency_id,t.rate) AS `Total Income`
FROM
 hb_transactions t
 JOIN hb_invoices i ON (t.invoice_id=i.id)
 WHERE
 i.id IN (SELECT invoice_id FROM hb_invoice_items WHERE  `type`='Other')
 AND
    t.date >= :date_bottom
    AND t.date <= :date_top
