/** * */ public function indexAction() { $module = $this->_getParam('module'); if (empty($module)) { $this->_helper->redirector->goToSimple('index', 'index', 'external'); } $client = $this->view->session->client->id_perdata; $businessPlan = $this->_mapper->fetchBusinessPlanByClient($client, $module); if ($businessPlan) { $this->view->businessPlan = $businessPlan; $this->view->date_ini = $this->view->date($businessPlan->date_inserted); $this->view->hasBudgetCategory = $this->_mapper->hasBudgetCategory($businessPlan->id_businessplan); if (!$businessPlan->submitted) { $this->view->revision = $this->_mapper->getLastRevision($businessPlan->id_businessplan); } if (!empty($businessPlan->business_group)) { $this->view->is_group = true; } if (!empty($businessPlan->fk_id_fefop_contract)) { $mapperContract = new Fefop_Model_Mapper_Contract(); $this->view->contract = $mapperContract->detail($businessPlan->fk_id_fefop_contract); } } else { $this->view->date_ini = Zend_Date::now()->toString('dd/MM/yyyy'); } $this->view->can_create = $this->_mapper->canCreateBusinessPlan($client, $module); $this->view->module = $module; }