make agent available to invoice templates, backport freeside-daily -p from HEAD