/**
  * create tine timesheet
  *
  * @param Timetracker_Model_Timesheet $_record
  * @param string $_timeaccountId
  * @return Timetracker_Model_Timesheet 
  * 
  */
 protected function _createTimesheet($_record, $_timeaccountId)
 {
     $_record->timeaccount_id = $_timeaccountId;
     // check if user is available
     try {
         Tinebase_User::getInstance()->getUserById($_record->account_id);
     } catch (Tinebase_Exception_NotFound $enf) {
         //echo "  Couldn't find user with id " . $_record->account_id . "\n";
         return NULL;
     }
     if ($_record->isValid()) {
         Timetracker_Controller_Timesheet::getInstance()->create($_record);
     } else {
         echo "  Timesheet invalid: " . print_r($_record->getValidationErrors(), true) . "\n";
         return NULL;
     }
     $this->_counters['timesheets']++;
 }