/** * @see Tinebase_Setup_DemoData_Abstract * */ protected function _beforeCreate() { $this->_ccController = Sales_Controller_CostCenter::getInstance(); $this->_taController = Timetracker_Controller_Timeaccount::getInstance(); $this->_taController->sendNotifications(FALSE); $this->_tsController = Timetracker_Controller_Timesheet::getInstance(); $this->_tsController->sendNotifications(FALSE); $this->_tsController->doContainerACLChecks(false); $this->_contractController = Sales_Controller_Contract::getInstance(); $contracts = $this->_contractController->getAll(); $developmentString = self::$_de ? 'Entwicklung' : 'Development'; $this->_contractsDevelopment = $contracts->filter('title', '/.' . $developmentString . '/', TRUE); $this->_contractsMarketing = $contracts->filter('title', '/.Marketing/', TRUE); $this->_loadCostCentersAndDivisions(); if (Tinebase_Application::getInstance()->isInstalled('HumanResources')) { $this->_empController = HumanResources_Controller_Employee::getInstance(); $filter = new HumanResources_Model_EmployeeFilter(array()); $this->_employees = $this->_empController->search($filter); } // set start date to start date of june 1st before last year $date = Tinebase_DateTime::now(); $this->_startDate = $date->subMonth(3)->setTime(8, 0, 0); // set clearedDate almost a month after $this->_clearedDate = clone $this->_startDate; $this->_clearedDate->addMonth(1)->subDay(2); }