Ignore:
Timestamp:
06/18/12 14:24:17 (12 years ago)
Author:
leticiabohnert
Message:

Ticket #2851 - Inclusão da função, data de admissão e apelido no organograma.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/workflow/inc/class.so_orgchart.inc.php

    r6490 r6535  
    128128                $this->acl = &$GLOBALS['ajax']->acl; 
    129129                $this->db = &Factory::getInstance('WorkflowObjects')->getDBWorkflow()->Link_ID; 
    130                 $this->db = &Factory::getInstance('WorkflowObjects')->getDBWorkflow()->Link_ID; 
    131130                $this->db->SetFetchMode(ADODB_FETCH_ASSOC); 
    132131        } 
     
    835834        { 
    836835                $this->_checkAccess($organizationID); 
    837                 $this->validateDate($admDate); 
     836                if ($admDate!='') 
     837                        $this->validateDate($admDate); 
     838                else 
     839                        $admDate=NULL; 
    838840 
    839841                $query = 'SELECT area.sigla FROM funcionario, area WHERE (funcionario.area_id = area.area_id) AND (funcionario.funcionario_id = ?)'; 
     
    876878        { 
    877879                $this->_checkAccess($organizationID); 
    878                 $this->validateDate($admDate); 
     880                if ($admDate!='') 
     881                        $this->validateDate($admDate); 
     882                else 
     883                        $admDate=NULL; 
    879884                 
    880                 $query = "UPDATE funcionario SET area_id = ?, centro_custo_id = ?, localidade_id = ?, funcionario_status_id = ?, cargo_id = ?, nivel = ?, funcionario_categoria_id = ?, titulo = ?, apelido = ?, funcao = ?, data_admissao = ? WHERE (funcionario_id = ?) AND (organizacao_id = ?)"; 
    881                 $result = $this->db->query($query, array($areaID, $costCenterID, $localID, $employeeStatusID, $jobTitleID, $level, $employeeCategoryID, $title,$nickname, $jobDesc, $admDate, $employeeID, $organizationID)); 
    882                 $this->_checkError($result); 
    883  
     885                $query = "UPDATE funcionario SET area_id = ?, centro_custo_id = ?, localidade_id = ?, funcionario_status_id = ?, cargo_id = ?, nivel = ?, funcionario_categoria_id = ?, titulo = ?, apelido = ?, funcao = ?, data_admissao =? WHERE (funcionario_id = ?) AND (organizacao_id = ?)"; 
     886                         
     887                $result = $this->db->query($query, array($areaID, $costCenterID, $localID, $employeeStatusID, $jobTitleID, $level, $employeeCategoryID, $title,$nickname, $jobDesc,$admDate, $employeeID, $organizationID)); 
     888                 
     889                $this->_checkError($result); 
     890                 
    884891                return (($result === false) ? false : true); 
    885892        } 
Note: See TracChangeset for help on using the changeset viewer.