SELECT
 hb_currency(SUM(i.tax)) AS `Total Tax L1`,
 hb_currency(SUM(i.tax2)) AS `Total Tax L2`,
 hb_currency(SUM(i.total)) AS `Invoice totals`,
 hb_currency(SUM(i.subtotal)) AS `Invoice subtotals`,
 hb_currency(SUM(i.credit)) AS `Invoice credits`
FROM hb_invoices i
 WHERE i.status='Paid'
 AND  i.datepaid>= :date_bottom
    AND i.datepaid<= :date_top