示例#1
0
 /**
  * 
  */
 public function headerReportAction()
 {
     if ($this->getRequest()->isXMLHttpRequest()) {
         $this->_helper->layout()->disableLayout();
     }
     $mapperCeop = new Register_Model_Mapper_Dec();
     $this->view->ceop = $mapperCeop->fetchRow($this->_getParam('id'));
 }
示例#2
0
 /**
  * 
  * @return int|bool
  */
 public function save()
 {
     $dbAdapter = Zend_Db_Table_Abstract::getDefaultAdapter();
     $dbAdapter->beginTransaction();
     try {
         if (empty($this->_session->client_list)) {
             $this->_message->addMessage('Tenki tau Kliente sira', App_Message::ERROR);
             return false;
         }
         $history = 'KRIA LISTA IMPRESAUN CARTAUN EVIDENSIA: %s';
         $mapperDec = new Register_Model_Mapper_Dec();
         $ceop = $mapperDec->fetchRow($this->_data['fk_id_dec']);
         $this->_data['create_date'] = Zend_Date::now()->toString('yyyy-MM-dd');
         $this->_data['list_name'] = $ceop->name_dec . ' - ' . Zend_Date::now()->toString('yyyy-MM-dd HH:mm:ss');
         $this->_data['printed'] = 0;
         $id = parent::_simpleSave();
         $history = sprintf($history, $id);
         $this->_sysAudit($history);
         $historyClient = 'KLIENTE %s SELECIONADO BA LISTA IMPRESAUN CARTAUN EVIDENSIA: %s';
         $dbJobListPrintPerData = App_Model_DbTable_Factory::get('JOBListPrintHasPerdata');
         foreach ($this->_session->client_list as $client) {
             $row = $dbJobListPrintPerData->createRow();
             $row->fk_id_joblistprint = $id;
             $row->fk_id_perdata = $client;
             $row->printed = 0;
             $row->save();
             $history = sprintf($historyClient, $client, $id);
             $this->_sysAudit($history);
         }
         $dbAdapter->commit();
         return $id;
     } catch (Exception $e) {
         $dbAdapter->rollBack();
         $this->_message->addMessage($this->_config->messages->error, App_Message::ERROR);
         return false;
     }
 }
示例#3
0
 /**
  * 
  */
 public function ceopListAction()
 {
     $mapperCEOP = new Register_Model_Mapper_Dec();
     $this->view->rows = $mapperCEOP->fetchAll();
 }
示例#4
0
 /**
  * 
  */
 public function listAction()
 {
     $this->_helper->layout()->disableLayout();
     $this->view->rows = $this->_mapper->fetchAll();
 }