Replace with existing function to get Invoice Type
Replace hardcoded admin role id with  looked up value of administrator role name
code cleanup, private function to get email addresses to send cron docs to
Regularised Patch 240 to accommodate state changes as it were then