Пример #1
0
 /**
  * 
  */
 public function printAction()
 {
     $this->_helper->layout()->setLayout('print');
     $id = $this->_getParam('id');
     $this->view->client = $this->_mapper->detailClient($id);
     $this->view->address = $this->_mapper->listAddress($id);
     $this->view->language = $this->_mapper->listLanguagePrint($id);
     $this->view->knowledge = $this->_mapper->listKnowledgePrint($id);
     $this->view->formalScholarity = $this->_mapper->listScholarity($id, 1);
     $this->view->nonFormalScholarity = $this->_mapper->listScholarity($id, 2);
     $this->view->experience = $this->_mapper->listExperience($id);
     $this->view->contact = $this->_mapper->listContact($id);
 }
Пример #2
0
 /**
  * 
  * @param array $data
  */
 protected function _checkBeneficiaryGraduation($data)
 {
     $mapperClient = new Client_Model_Mapper_Client();
     $types = array(Register_Model_Mapper_PerTypeScholarity::FORMAL, Register_Model_Mapper_PerTypeScholarity::NON_FORMAL);
     $valid = false;
     foreach ($types as $type) {
         // Check all the client level of scholarity to check if it has National certificate level 2 or greater or is graduated
         $scholarities = $mapperClient->listScholarity($data['fk_id_perdata'], $type);
         foreach ($scholarities as $scholarity) {
             if ($scholarity->category == 'N' && $scholarity->level_scholarity >= 2 || $type == Register_Model_Mapper_PerTypeScholarity::FORMAL && $scholarity->fk_id_perlevelscholarity >= 17) {
                 $valid = true;
                 break 2;
             }
         }
     }
     if (!$valid) {
         // Search the user who must receive notes when the client doens't have the necessary qualification
         $noteTypeMapper = new Admin_Model_Mapper_NoteType();
         $users = $noteTypeMapper->getUsersByNoteType(Admin_Model_Mapper_NoteType::FE_GRADUATION);
         $noteModelMapper = new Default_Model_Mapper_NoteModel();
         $noteMapper = new Default_Model_Mapper_Note();
         $dataNote = array('title' => 'FE KONTRATU - BENEFISIARIU LA IHA FORMASAUN', 'level' => 0, 'message' => $noteModelMapper->getFEGraduation($this->detail($data['id_fe_contract'])), 'users' => $users);
         $noteMapper->setData($dataNote)->saveNote();
     }
 }
Пример #3
0
 /**
  * 
  */
 public function printAction()
 {
     $this->_helper->layout()->setLayout('print');
     $id = $this->_getParam('id');
     $registration = $this->_mapper->detail($id);
     $this->view->registration = $registration;
     $this->view->user = Zend_Auth::getInstance()->getIdentity();
     $mapperClient = new Client_Model_Mapper_Client();
     $this->view->non_formal_scholarity = $mapperClient->listScholarity($registration->fk_id_perdata, Register_Model_Mapper_PerTypeScholarity::NON_FORMAL);
     $this->view->formal_scholarity = $mapperClient->listScholarity($registration->fk_id_perdata, Register_Model_Mapper_PerTypeScholarity::FORMAL);
     $this->view->entities = $this->_mapper->listEntities($id);
     $groups = $this->_mapper->groupFormation($id);
     $this->view->groups = $groups;
 }