Ejemplo n.º 1
0
 function ReportGenerator()
 {
     $this->criteria = array();
     $this->field = array();
     $sysConfObj = new sysConf();
     $this->employeeIdLength = $sysConfObj->getEmployeeIdLength();
 }
Ejemplo n.º 2
0
 function Users()
 {
     $this->sql_builder = new SQLQBuilder();
     $this->dbConnection = new DMLFunctions();
     $tmpSysConf = new sysConf();
     $this->employeeIdLength = $tmpSysConf->getEmployeeIdLength();
 }
 public function __construct()
 {
     $emptyMarker = ReportField::EMPTY_MARKER;
     $ageQuery = "IF(STRCMP(DATE_FORMAT(hs_hr_employee.`emp_birthday`, CONCAT(YEAR(hs_hr_employee.`emp_birthday`), '-%m-%d')), '0-00-00'), " . "DATE_FORMAT(hs_hr_employee.`emp_birthday`, CONCAT(YEAR(hs_hr_employee.`emp_birthday`), '-%m-%d')), " . "'{$emptyMarker}')";
     $sevicePeriodQuery = "IF(STRCMP(DATE_FORMAT(hs_hr_employee.`joined_date`, CONCAT(YEAR(hs_hr_employee.`joined_date`), '-%m-%d')), '0-00-00'), " . "DATE_FORMAT(hs_hr_employee.`joined_date`, CONCAT(YEAR(hs_hr_employee.`joined_date`), '-%m-%d')), " . "'{$emptyMarker}')";
     $this->selectionFieldMap = array('EMPNO' => new ReportField('emp_number'), 'EMPFIRSTNAME' => new ReportField('emp_firstname'), 'EMPLASTNAME' => new ReportField('emp_lastname'), 'ADDRESS1' => new ReportField(array('emp_street1', 'emp_street2', 'city_code', 'provin_code', 'coun_code', 'emp_zipcode'), ReportField::COMPOSITE_VALUE), 'TELENO' => new ReportField('emp_hm_telephone'), 'AGE' => new ReportField($ageQuery, ReportField::DIRECT_QUERY), 'REPORTTO' => new ReportField("{CONCAT_WS(' ', eee.`emp_firstname`, eee.`emp_lastname`)}", ReportField::MULTIPLE_REFERENCE, 'hs_hr_emp_reportto', 'erep_sub_emp_number', 'emp_number', new JoinTable('hs_hr_employee', 'emp_number', 'erep_sup_emp_number', 'hs_hr_emp_reportto', 'eee')), 'REPORTINGMETHOD' => new ReportField("{hs_hr_emp_reportto.`erep_reporting_mode`}", ReportField::MULTIPLE_REFERENCE, 'hs_hr_emp_reportto', 'erep_sub_emp_number', 'emp_number'), 'JOBTITLE' => new ReportField('jobtit_name', ReportField::SINGLE_REFERENCE, 'hs_hr_job_title', 'jobtit_code', 'job_title_code'), 'SERPIR' => new ReportField($sevicePeriodQuery, ReportField::DIRECT_QUERY), 'SUBDIVISION' => new ReportField('title', ReportField::SINGLE_REFERENCE, 'hs_hr_compstructtree', 'id', 'work_station'), 'QUL' => new ReportField("{CONCAT_WS(' - ', hs_hr_education.`edu_uni`, hs_hr_education.`edu_deg`)}", ReportField::MULTIPLE_REFERENCE, 'hs_hr_emp_education', 'emp_number', 'emp_number', new JoinTable('hs_hr_education', 'edu_code', 'edu_code', 'hs_hr_emp_education')), 'YEAROFPASSING' => new ReportField("{IF(STRCMP(YEAR(`edu_end_date`), '0'), YEAR(`edu_end_date`), '{$emptyMarker}')}", ReportField::MULTIPLE_REFERENCE, 'hs_hr_emp_education', 'emp_number', 'emp_number'), 'EMPSTATUS' => new ReportField('estat_name', ReportField::MULTIPLE_REFERENCE, 'hs_hr_empstat', 'estat_code', 'emp_status'), 'PAYGRD' => new ReportField('sal_grd_name', ReportField::MULTIPLE_REFERENCE, 'hs_hr_emp_basicsalary', 'emp_number', 'emp_number', new JoinTable('hs_pr_salary_grade', 'sal_grd_code', 'sal_grd_code', 'hs_hr_emp_basicsalary')), 'LANGUAGES' => new ReportField('lang_name', ReportField::MULTIPLE_REFERENCE, 'hs_hr_emp_language', 'emp_number', 'emp_number', new JoinTable('hs_hr_language', 'lang_code', 'lang_code', 'hs_hr_emp_language')), 'SKILLS' => new ReportField('skill_name', ReportField::MULTIPLE_REFERENCE, 'hs_hr_emp_skill', 'emp_number', 'emp_number', new JoinTable('hs_hr_skill', 'skill_code', 'skill_code', 'hs_hr_emp_skill')), 'CONTRACT' => new ReportField("{CONCAT(DATE(`econ_extend_start_date`), ' - ', DATE(`econ_extend_end_date`))}", ReportField::MULTIPLE_REFERENCE, 'hs_hr_emp_contract_extend', 'emp_number', 'emp_number'), 'WORKEXPERIENCE' => new ReportField("{CONCAT(`eexp_employer`, ' - ', `eexp_jobtit`, ' - ',(YEAR(`eexp_to_date`)-YEAR(`eexp_from_date`)), ' Years',' - ',(MONTH(`eexp_to_date`)-MONTH(`eexp_from_date`)),' Months')}", ReportField::MULTIPLE_REFERENCE, 'hs_hr_emp_work_experience', 'emp_number', 'emp_number'));
     $this->criteria = array();
     $this->field = array();
     $sysConfObj = new sysConf();
     $this->employeeIdLength = $sysConfObj->getEmployeeIdLength();
 }
Ejemplo n.º 4
0
 function EmpInfo()
 {
     $sysConfObj = new sysConf();
     $this->employeeIdLength = $sysConfObj->getEmployeeIdLength();
 }
Ejemplo n.º 5
0
 function Login()
 {
     $tmpSysConf = new sysConf();
     $this->employeeIdLength = $tmpSysConf->getEmployeeIdLength();
 }
Ejemplo n.º 6
0
 /**
  * Constructor
  *
  * Serializes the object
  *
  */
 public function __construct()
 {
     $confObj = new EmailConfiguration();
     $this->mailType = $confObj->getMailType();
     if ($this->mailType == 'smtp') {
         $config = array();
         $authType = $confObj->getSmtpAuth();
         if ($authType != EmailConfiguration::EMAILCONFIGURATION_SMTP_AUTH_NONE) {
             $config['auth'] = strtolower($authType);
             $config['username'] = trim($confObj->getSmtpUser());
             $config['password'] = trim($confObj->getSmtpPass());
         }
         $security = $confObj->getSmtpSecurity();
         if ($security != EmailConfiguration::EMAILCONFIGURATION_SMTP_SECURITY_NONE) {
             $config['ssl'] = strtolower($security);
         }
         $config['port'] = trim($confObj->getSmtpPort());
         $transport = new Zend_Mail_Transport_Smtp($confObj->getSmtpHost(), $config);
     } else {
         if ($this->mailType = 'sendmail') {
             $transport = new Zend_Mail_Transport_Sendmail();
         }
     }
     Zend_Mail::setDefaultTransport($transport);
     $this->mailer = new Zend_Mail();
     $this->mailer->setFrom($confObj->getMailAddress(), "OrangeHRM");
     $sysConfObj = new sysConf();
     $this->employeeIdLength = $sysConfObj->getEmployeeIdLength();
 }