Exemplo n.º 1
0
 /**
  * Test saving EmployeePassport without sequence number
  */
 public function testSaveEmployeePassport1()
 {
     $empPassport = new EmpPassPort();
     $empPassport->setEmpNumber(1);
     $empPassport->country = 'LK';
     $result = $this->employeeDao->saveEmployeePassport($empPassport);
     $this->assertTrue($result);
     $this->assertEquals(1, $empPassport->seqno);
 }
Exemplo n.º 2
0
 /**
  * Test SaveEmployeePassport
  */
 public function testSaveEmployeePassport()
 {
     $employeeDao = $this->getMock('EmployeeDao');
     $employeeDao->expects($this->once())->method('saveEmployeePassport')->will($this->returnValue(true));
     $this->employeeService->setEmployeeDao($employeeDao);
     $empPassport = new EmpPassPort();
     $empPassport->setEmpNumber(1);
     $result = $this->employeeService->saveEmployeePassport($empPassport);
     $this->assertTrue($result);
 }
Exemplo n.º 3
0
 function reDirect($getArr, $postArr, $object = null)
 {
     $form_creator = new FormCreator($getArr, $postArr);
     switch ($getArr['reqcode']) {
         case 'JSP':
             $form_creator->formPath = '/templates/hrfunct/hrempjobspec.php';
             $ejobsp = new EmpJobSpec();
             $empinfo = new EmpInfo();
             $jdcat = new JDCategory();
             $form_creator->popArr['empdet'] = $empinfo->filterEmpMain($getArr['id']);
             $form_creator->popArr['catlist'] = $jdcat->getJDCatCodes();
             if (isset($getArr['editID'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID'];
                 $form_creator->popArr['editArr'] = $ejobsp->filterEmpJobSpec($arr);
             } else {
                 $form_creator->popArr['unasscatlist'] = $jdcat->getUnAssJDCatCodes($getArr['id']);
             }
             $form_creator->popArr['rset'] = $ejobsp->getAssEmpJobSpec($getArr['id']);
             //$form_creator ->popArr['catlist']=$ejobsp->getJDCatCodes();
             break;
         case 'CXT':
             $form_creator->formPath = '/templates/hrfunct/hrempconext.php';
             $empconext = new EmpConExt();
             $empinfo = new EmpInfo();
             $form_creator->popArr['empdet'] = $empinfo->filterEmpMain($getArr['id']);
             $form_creator->popArr['empstat'] = $empinfo->filterEmpJobStat($getArr['id']);
             if (isset($getArr['editID'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID'];
                 $form_creator->popArr['editArr'] = $empconext->filterConExt($arr);
                 $form_creator->popArr['lastrec'] = $empconext->getLastRecord($getArr['id']);
             } else {
                 $form_creator->popArr['lastrec'] = $empconext->getLastRecord($getArr['id']);
             }
             $form_creator->popArr['rset'] = $empconext->getAssConExt($getArr['id']);
             break;
         case 'SAL':
             $form_creator->formPath = '/templates/hrfunct/hrempbassal.php';
             $empinfo = new EmpInfo();
             $empbassal = new EmpBasSalary();
             $currTyp = new CurrencyTypes();
             $form_creator->popArr['einfo'] = $empinfo->filterEmpMain($getArr['id']);
             $form_creator->popArr['empdet'] = $empdet = $empinfo->filterEmpJobInfo($getArr['id']);
             $salGrd = $empdet[0][5];
             if (isset($getArr['editID1'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID1'];
                 $arr[2] = $getArr['editID2'];
                 $form_creator->popArr['editArr'] = $edit = $empbassal->filterEmpBasSal($arr);
                 $form_creator->popArr['currlist'] = $empbassal->getCurrCodes($edit[0][1]);
             } else {
                 $form_creator->popArr['curlist'] = $empbassal->getUnAssCurrCodes($salGrd, $getArr['id']);
                 if ($object != null) {
                     $form_creator->popArr['cmbCurrCode'] = $object->cmbCurrCode;
                 }
             }
             $form_creator->popArr['rset'] = $empbassal->getAssEmpBasSal($getArr['id']);
             $form_creator->popArr['currAlllist'] = $currTyp->getAllCurrencyCodes();
             break;
         case 'LAN':
             $form_creator->formPath = '/templates/hrfunct/hremplan.php';
             $empinf = new EmpInfo();
             $emplan = new EmpLanguage();
             $laninfo = new LanguageInfo();
             $form_creator->popArr['empDet'] = $empinf->filterEmpMain($getArr['id']);
             $form_creator->popArr['lanlist'] = $lanlist = $laninfo->getLang();
             if (isset($getArr['editID1'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID1'];
                 $arr[2] = $getArr['editID2'];
                 $form_creator->popArr['editArr'] = $emplan->filterEmpLang($arr);
                 for ($c = 0; count($lanlist) > $c; $c++) {
                     if ($getArr['editID1'] == $lanlist[$c][0]) {
                         $ratSel = $lanlist[$c][2];
                     }
                 }
             } else {
                 if ($object != null) {
                     $form_creator->popArr['cmbLanCode'] = $object->cmbLanCode;
                     for ($c = 0; $lanlist && count($lanlist) > $c; $c++) {
                         if ($lanlist[$c][0] == $object->cmbLanCode) {
                             $ratSel = $lanlist[$c][2];
                         }
                     }
                     $form_creator->popArr['ratSel'] = $ratSel;
                 }
                 $form_creator->popArr['lanlist'] = $laninfo->getLang();
             }
             $form_creator->popArr['rsets'] = $emplan->getAssEmpLang($getArr['id']);
             break;
         case 'MEM':
             $form_creator->formPath = '/templates/hrfunct/hrempmemship.php';
             $empinf = new EmpInfo();
             $empmem = new EmpMembership();
             $memtype = new MembershipType();
             $memshipinfo = new MembershipInfo();
             $form_creator->popArr['empDet'] = $empinf->filterEmpMain($getArr['id']);
             $form_creator->popArr['typlist'] = $typlist = $memtype->getMembershipTypeCodes();
             if (isset($getArr['editID1'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID1'];
                 $arr[2] = $getArr['editID2'];
                 $form_creator->popArr['editArr'] = $edit = $empmem->filterEmpMembership($arr);
                 $form_creator->popArr['mship'] = $memshipinfo->getMembershipCodes($edit[0][2]);
             } else {
                 if ($object != null) {
                     $form_creator->popArr['cmbMemTypeCode'] = $object->cmbMemTypeCode;
                     $form_creator->popArr['mship'] = $memshipinfo->getUnAssMembershipCodes($getArr['id'], $object->cmbMemTypeCode);
                 }
                 $form_creator->popArr['typlist'] = $typlist = $memtype->getMembershipTypeCodes();
             }
             $form_creator->popArr['rset'] = $empmem->getAssEmpMembership($getArr['id']);
             $form_creator->popArr['mshipAll'] = $memshipinfo->getAllMembershipCodes();
             break;
         case 'EXC':
             $form_creator->formPath = '/templates/hrfunct/hrempextcur.php';
             $empinfo = new EmpInfo();
             $empextcur = new EmpExCur();
             $extracurr = new ExtraCurrActCat();
             $extrainfo = new ExtraCurActInfo();
             $form_creator->popArr['empdet'] = $empinfo->filterEmpMain($getArr['id']);
             $form_creator->popArr['catlist'] = $extracurr->getExCurCatCodes();
             if (isset($getArr['editID'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID'];
                 $form_creator->popArr['editArr'] = $edit = $empextcur->filterEmpExCur($arr);
                 $form_creator->popArr['typelist'] = $extrainfo->getExCurTypeCodes($edit[0][2]);
             } else {
                 $form_creator->popArr['lastrec'] = $empextcur->getLastRecord($getArr['id']);
                 if ($object != null) {
                     $form_creator->popArr['cmbExtCurCat'] = $catcode = $object->cmbExtCurCat;
                     $form_creator->popArr['typeunasslist'] = $extrainfo->getUnAssExCurTypeCodes($getArr['id'], $catcode);
                 }
             }
             $form_creator->popArr['rset'] = $empextcur->getAssExCur($getArr['id']);
             $form_creator->popArr['allcatlist'] = $extracurr->getExCurCatCodes();
             $form_creator->popArr['alltypelist'] = $extrainfo->getAllExtraCurActInfo();
             break;
         case 'EXP':
             $form_creator->formPath = '/templates/hrfunct/hrempwrkexp.php';
             $empinfo = new EmpInfo();
             $empworkex = new EmpWorkExp();
             $countryinfo = new CountryInfo();
             $proinfo = new ProvinceInfo();
             $form_creator->popArr['empDet'] = $empinfo->filterEmpMain($getArr['id']);
             if ($object != null) {
                 $form_creator->popArr['txtEmpExpCompany'] = $object->txtEmpExpCompany;
                 $form_creator->popArr['txtEmpExpToDat'] = $object->txtEmpExpToDat;
                 $form_creator->popArr['txtEmpExpDesOnLev'] = $object->txtEmpExpDesOnLev;
                 $form_creator->popArr['txtEmpExpYears'] = $object->txtEmpExpYears;
                 $form_creator->popArr['chkEmpExpWorkRelFlag'] = $object->chkEmpExpWorkRelFlag;
                 $form_creator->popArr['txtEmpExpMonths'] = $object->txtEmpExpMonths;
                 $form_creator->popArr['txtEmpExpAdd1'] = $object->txtEmpExpAdd1;
                 $form_creator->popArr['txtEmpExpAcc'] = $object->txtEmpExpAcc;
                 $form_creator->popArr['txtEmpExpAdd2'] = $object->txtEmpExpAdd2;
             }
             if (isset($getArr['editID'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID'];
                 $form_creator->popArr['editArr'] = $edit = $empworkex->filterEmpWorkExp($arr);
                 $form_creator->popArr['list'] = $countryinfo->getCountryCodes();
                 if ($object != null) {
                     $form_creator->popArr['txtEmpExpAdd2'] = $pli = $object->txtEmpExpAdd2;
                     $form_creator->popArr['txtEmpExpConPers'] = $object->txtEmpExpConPers;
                     $form_creator->popArr['txtEmpExpAdd3'] = $object->txtEmpExpAdd3;
                     $form_creator->popArr['txtEmpExpTelep'] = $object->txtEmpExpTelep;
                     $form_creator->popArr['txtEmpResLev'] = $object->txtEmpResLev;
                     $form_creator->popArr['txtEmpExpAchmnt'] = $object->txtEmpExpAchmnt;
                     $form_creator->popArr['txtEmpExpFromDat'] = $object->txtEmpExpFromDat;
                     $form_creator->popArr['txtEmpExpEmail'] = $object->txtEmpExpEmail;
                     $form_creator->popArr['plist'] = $empinfo->getProvinceCodes($pli);
                 } else {
                     $form_creator->popArr['plist1'] = $proinfo->getProvinceCodes($edit[0][4]);
                 }
             } else {
                 $form_creator->popArr['newID'] = $empworkex->getLastRecord($getArr['id']);
                 $form_creator->popArr['list'] = $countryinfo->getCountryCodes();
                 if ($object != null) {
                     $form_creator->popArr['txtEmpExpCompany'] = $object->txtEmpExpCompany;
                     $form_creator->popArr['txtEmpExpToDat'] = $object->txtEmpExpToDat;
                     $form_creator->popArr['txtEmpExpDesOnLev'] = $object->txtEmpExpDesOnLev;
                     $form_creator->popArr['txtEmpExpYears'] = $object->txtEmpExpYears;
                     $form_creator->popArr['chkEmpExpWorkRelFlag'] = $object->chkEmpExpWorkRelFlag;
                     $form_creator->popArr['txtEmpExpMonths'] = $object->txtEmpExpMonths;
                     $form_creator->popArr['txtEmpExpAdd1'] = $object->txtEmpExpAdd1;
                     $form_creator->popArr['txtEmpExpAcc'] = $object->txtEmpExpAcc;
                     $form_creator->popArr['txtEmpExpTelep'] = $object->txtEmpExpTelep;
                     $form_creator->popArr['txtEmpResLev'] = $object->txtEmpResLev;
                     $form_creator->popArr['txtEmpExpAchmnt'] = $object->txtEmpExpAchmnt;
                     $form_creator->popArr['txtEmpExpFromDat'] = $object->txtEmpExpFromDat;
                     $form_creator->popArr['txtEmpExpEmail'] = $object->txtEmpExpEmail;
                     $form_creator->popArr['txtEmpExpAdd2'] = $plis = $object->txtEmpExpAdd2;
                     $form_creator->popArr['txtEmpExpAdd3'] = $object->txtEmpExpAdd3;
                     $form_creator->popArr['txtEmpExpConPers'] = $object->txtEmpExpConPers;
                     $form_creator->popArr['plist2'] = $empinfo->getProvinceCodes($plis);
                 }
             }
             $form_creator->popArr['rset'] = $empworkex->getAssEmpWorkExp($getArr['id']);
             break;
         case 'QUA':
             $form_creator->formPath = '/templates/hrfunct/hrempqual.php';
             $empinfo = new EmpInfo();
             $empqual = new EmpQualification();
             $qualtyp = new QualificationType();
             $qual = new Qualifications();
             $form_creator->popArr['statlist'] = array('First Class', 'Second Class Upr.', 'Second Class Lwr.');
             $form_creator->popArr['empdet'] = $empinfo->filterEmpMain($getArr['id']);
             $form_creator->popArr['typlist'] = $qualtyp->getQualificationTypeCodes();
             if (isset($getArr['editID'])) {
                 $arr[0] = $getArr['editID'];
                 $arr[1] = $getArr['id'];
                 $form_creator->popArr['editArr'] = $empqual->filterEmpQual($arr);
                 $form_creator->popArr['quallist'] = $qual->getAllQualifications();
             } else {
                 if ($object != null) {
                     $form_creator->popArr['TypeCode'] = $object->TypeCode;
                     $form_creator->popArr['mship'] = $qual->getUnAssQualifications($getArr['id'], $object->TypeCode);
                 }
             }
             $form_creator->popArr['rset'] = $empqual->getAssEmpQual($getArr['id']);
             $form_creator->popArr['allquallist'] = $qual->getAllQualifications();
             break;
         case 'QAS':
             $form_creator->formPath = '/templates/hrfunct/hrempqualsub.php';
             $empinfo = new EmpInfo();
             $qual = new Qualifications();
             $empqualsub = new EmpQualSubject();
             $subinfo = new SubjectInfo();
             $form_creator->popArr['empdet'] = $empinfo->filterEmpMain($getArr['id']);
             $form_creator->popArr['qualDet'] = $qual->filterQualifications($getArr['QUA']);
             $form_creator->popArr['sublistAll'] = $subinfo->getSubjectCodes($getArr['QUA']);
             $form_creator->popArr['ratlist'] = $empqualsub->getRatGrds($getArr['QUA']);
             if (isset($getArr['editID'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['QUA'];
                 $arr[2] = $getArr['editID'];
                 $form_creator->popArr['editArr'] = $empqualsub->filterEmpQualSub($arr);
             } else {
                 $form_creator->popArr['sublistUnAss'] = $subinfo->getUnAssSubjects($getArr['id'], $getArr['QUA']);
             }
             $arr[0] = $getArr['id'];
             $arr[1] = $getArr['QUA'];
             $form_creator->popArr['sublistAss'] = $empqualsub->getAssEmpQualSub($arr);
             break;
         case 'CBN':
             $form_creator->formPath = '/templates/hrfunct/hrempcashben.php';
             $empinfo = new EmpInfo();
             $empcashben = new EmpCashBen();
             $cashben = new CashBen();
             $form_creator->popArr['empdet'] = $empinfo->filterEmpMain($getArr['id']);
             $form_creator->popArr['bfilter'] = array('Salary Point' => 1, 'Designation' => 2, 'Employee' => 3);
             $form_creator->popArr['benlist'] = $cashben->getBenCodes();
             if (isset($getArr['editID'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID'];
                 $form_creator->popArr['editArr'] = $empcashben->filterEmpCashBen($arr);
             }
             $form_creator->popArr['cashbenAss'] = $empcashben->getAssEmpCashBen($getArr['id']);
             $form_creator->popArr['cashbenUnAss'] = $empcashben->getUnAssEmpCashBen($getArr['id']);
             if (isset($getArr['OBEN'])) {
                 $form_creator->popArr['cashbenOther'] = $cashben->getOthEmpCashBen($getArr['id']);
             }
             break;
         case 'NBN':
             $form_creator->formPath = '/templates/hrfunct/hrempnoncashben.php';
             $empinfo = new EmpInfo();
             $empnoncashben = new EmpNonCashBen();
             $noncashben = new NonCashBen();
             $form_creator->popArr['empdet'] = $empinfo->filterEmpMain($getArr['id']);
             $form_creator->popArr['bfilter'] = array('Salary Point' => 1, 'Designation' => 2, 'Employee' => 3);
             $form_creator->popArr['benlist'] = $noncashben->getBenCodes();
             if (isset($getArr['editID'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID'];
                 $form_creator->popArr['editArr'] = $empnoncashben->filterEmpNonCashBen($arr);
             }
             $form_creator->popArr['cashbenAss'] = $empnoncashben->getAssEmpNonCashBen($getArr['id']);
             $form_creator->popArr['cashbenUnAss'] = $empnoncashben->getUnAssEmpNonCashBen($getArr['id']);
             if (isset($getArr['OBEN'])) {
                 $form_creator->popArr['cashbenOther'] = $noncashben->getOthEmpNonCashBen($getArr['id']);
             }
             break;
         case 'ESS':
         case 'EMP':
             $form_creator->formPath = '/templates/hrfunct/hrEmpMain.php';
             //hremp.php';
             $form_creator->popArr['arrMStat'] = array('Unmarried', 'Married', 'Divorced', 'Others');
             $empinfo = new EmpInfo();
             $pport = new EmpPassPort();
             $ddebit = new EmpDirectDebit();
             $dep = new EmpDependents();
             $econ = new EmpEmergencyCon();
             $chi = new EmpChildren();
             $attachment = new EmpAttach();
             $countryinfo = new CountryInfo();
             $porinfo = new ProvinceInfo();
             $nationinfo = new NationalityInfo();
             $location = new models_eimadmin_Location();
             $distric = new DistrictInfo();
             $jobtit = new JobTitle();
             $depen = new EmpDependents();
             $ethnicrace = new EthnicRace();
             $eeojobcat = new EEOJobCat();
             $emplan = new EmpLanguage();
             $laninfo = new LanguageInfo();
             $emplicen = new EmpLicenses();
             $licen = new Licenses();
             $empmem = new EmpMembership();
             $memtype = new MembershipType();
             $memshipinfo = new MembershipInfo();
             $emprepto = new EmpRepTo();
             $empskill = new EmpSkill();
             $skill = new Skills();
             $empworkex = new EmpWorkExp();
             $empeducation = new EmpEducation();
             $education = new Education();
             $empTax = new EmpTax();
             $form_creator->popArr['nation'] = $nationinfo->getNationCodes();
             $form_creator->popArr['loc'] = $location->getLocCodes();
             $form_creator->popArr['cntlist'] = $countryinfo->getCountryCodes();
             $form_creator->popArr['ethRace'] = $ethnicrace->getEthnicRaceCodes();
             $form_creator->popArr['eeojobcat'] = $eeojobcat->getEEOJobCatCodes();
             $form_creator->popArr['jobtit'] = $jobtit->getJobTit();
             $form_creator->popArr['hier'] = isset($res) ? $res : false;
             $form_creator->popArr['cntlist'] = $countrylist = $countryinfo->getCountryCodes();
             $form_creator->popArr['ppcntlist'] = $countrylist;
             $form_creator->popArr['customFieldList'] = CustomFields::getCustomFieldList();
             if ($getArr['capturemode'] == 'addmode') {
                 $form_creator->popArr['newID'] = $empinfo->getLastId();
                 if ($object != null) {
                     $form_creator->popArr['ctlist'] = $corptit->getCorpTitlesEmpInfo($object->cmbSalGrd);
                     $form_creator->popArr['deslist'] = $des->getDesEmpInfo($object->cmbCorpTit);
                     $form_creator->popArr['plist'] = $porinfo->getProvinceCodes($object->cmbTaxCountry);
                     $form_creator->popArr['resplist'] = $porinfo->getProvinceCodes($object->cmbPermCountry);
                     $form_creator->popArr['resdlist'] = $distric->getDistrictCodes($object->cmbPermProvince);
                     if (isset($postArr['cmbJobTitle'])) {
                         $form_creator->popArr['empstatlist'] = $view_controller->xajaxObjCall($postArr['cmbJobTitle'], 'JOB', 'allEmpStat');
                     }
                     $form_creator->popArr['ethRace'] = $ethnicrace->getEthnicRaceCodes($object->cmbEthnicRace);
                 }
             } elseif ($getArr['capturemode'] == 'updatemode') {
                 $form_creator->popArr['editTaxInfo'] = $empTax->getEmployeeTaxInfo($getArr['id']);
                 $form_creator->popArr['usStateList'] = $porinfo->getProvinceCodes('US');
                 $form_creator->popArr['empDDAss'] = $ddebit->getEmployeeDirectDebit($getArr['id']);
                 if (isset($getArr['DDSEQ'])) {
                     $form_creator->popArr['editDDForm'] = $ddebit->getDirectDebit($getArr['id'], $getArr['DDSEQ']);
                 }
                 $form_creator->popArr['editMainArr'] = $empinfo->filterEmpMain($getArr['id']);
                 $form_creator->popArr['editPersArr'] = $empinfo->filterEmpPers($getArr['id']);
                 $form_creator->popArr['editJobInfoArr'] = $empJobInfo = $empinfo->filterEmpJobInfo($getArr['id']);
                 $form_creator->popArr['editCustomInfoArr'] = $empCustomInfo = $empinfo->filterEmpCustomInfo($getArr['id']);
                 $view_controller = new ViewController();
                 $form_creator->popArr['empstatlist'] = $view_controller->xajaxObjCall($empJobInfo[0][2], 'JOB', 'allEmpStat');
                 $empJobTitle = $empJobInfo[0][2];
                 if (isset($postArr['cmbJobTitle'])) {
                     $form_creator->popArr['empstatlist'] = $view_controller->xajaxObjCall($postArr['cmbJobTitle'], 'JOB', 'allEmpStat');
                     $empJobTitle = $postArr['cmbJobTitle'];
                 }
                 if (CommonFunctions::isValidId($empJobTitle, 'JOB')) {
                     $empJobSpec = $view_controller->getJobSpecForJob($empJobTitle);
                 } else {
                     $empJobSpec = null;
                 }
                 $form_creator->popArr['jobSpec'] = $empJobSpec;
                 $jobTitleHistory = new JobTitleHistory();
                 $form_creator->popArr['jobTitleHistory'] = $jobTitleHistory->getHistory($getArr['id']);
                 $empDivisionHistory = new SubDivisionHistory();
                 $form_creator->popArr['subDivisionHistory'] = $empDivisionHistory->getHistory($getArr['id']);
                 $locationHistory = new LocationHistory();
                 $form_creator->popArr['locationHistory'] = $locationHistory->getHistory($getArr['id']);
                 $form_creator->popArr['assignedlocationList'] = EmpLocation::getEmpLocations($getArr['id']);
                 $form_creator->popArr['availablelocationList'] = EmpLocation::getUnassignedLocations($getArr['id']);
                 $form_creator->popArr['editPermResArr'] = $edit = $editPermRes = $empinfo->filterEmpContact($getArr['id']);
                 $form_creator->popArr['provlist'] = $porinfo->getProvinceCodes($edit[0][4]);
                 $form_creator->popArr['citylist'] = $distric->getDistrictCodes($edit[0][5]);
                 $form_creator->popArr['empPPAss'] = $pport->getAssEmpPP($getArr['id']);
                 $form_creator->popArr['empDepAss'] = $dep->getAssEmpDep($getArr['id']);
                 $form_creator->popArr['empECAss'] = $econ->getAssEmpEC($getArr['id']);
                 $form_creator->popArr['empChiAss'] = $chi->getAssEmpChi($getArr['id']);
                 $form_creator->popArr['empAttAss'] = $attachment->getAssEmpAtt($getArr['id']);
                 $form_creator->popArr['empDpAss'] = $depen->getAssEmpDep($getArr['id']);
                 $form_creator->popArr['newPPID'] = $pport->getLastRecord($getArr['id']);
                 if (isset($getArr['PPSEQ'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['PPSEQ'];
                     $form_creator->popArr['editPPForm'] = $pport->filterEmpPP($arr);
                 }
                 $form_creator->popArr['newECID'] = $econ->getLastRecord($getArr['id']);
                 if (isset($getArr['ECSEQ'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['ECSEQ'];
                     $form_creator->popArr['editECForm'] = $econ->filterEmpEC($arr);
                 }
                 $form_creator->popArr['newDepID'] = $dep->getLastRecord($getArr['id']);
                 if (isset($getArr['depSEQ'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['depSEQ'];
                     $form_creator->popArr['editDepForm'] = $dep->filterEmpDep($arr);
                 }
                 $form_creator->popArr['newCID'] = $chi->getLastRecord($getArr['id']);
                 if (isset($getArr['CHSEQ'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['CHSEQ'];
                     $form_creator->popArr['editChiForm'] = $chi->filterEmpChi($arr);
                 }
                 if (isset($getArr['ATTACH'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['ATTACH'];
                     $form_creator->popArr['editAttForm'] = $attachment->filterEmpAtt($arr);
                 }
                 $form_creator->popArr['lantype'] = array('Writing' => 1, 'Speaking' => 2, 'Reading' => 3);
                 $form_creator->popArr['grdcodes'] = array('Poor' => 1, 'Basic' => 2, 'Good' => 3, 'Mother Tongue' => 4);
                 $form_creator->popArr['lanlist'] = $lanlist = $laninfo->getLang();
                 if (isset($getArr['lanSEQ'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['lanSEQ'];
                     $arr[2] = $getArr['lanFLU'];
                     $form_creator->popArr['editLanArr'] = $emplan->filterEmpLang($arr);
                 }
                 $form_creator->popArr['rsetLang'] = $emplan->getAssEmpLang($getArr['id']);
                 $form_creator->popArr['allLicenlist'] = $licenlist = $licen->getLicensesCodes();
                 $form_creator->popArr['unassLicenlist'] = $licen->getUnAssLicensesCodes($getArr['id']);
                 if (isset($getArr['LIC'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['LIC'];
                     $form_creator->popArr['editLicenseArr'] = $emplicen->filterEmpLicenses($arr);
                 }
                 $form_creator->popArr['rsetLicense'] = $emplicen->getAssEmpLicenses($getArr['id']);
                 $form_creator->popArr['typlist'] = $typlist = $memtype->getMembershipTypeCodes();
                 if (isset($getArr['MEM'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['MEM'];
                     $arr[2] = $getArr['MTP'];
                     $form_creator->popArr['editMembershipArr'] = $edit = $empmem->filterEmpMembership($arr);
                     $form_creator->popArr['mship'] = $memshipinfo->getMembershipCodes($edit[0][2]);
                 }
                 $form_creator->popArr['rsetMembership'] = $empmem->getAssEmpMembership($getArr['id']);
                 $form_creator->popArr['mshipAll'] = $memshipinfo->getAllMembershipCodes();
                 $empbassal = new EmpBasSalary();
                 $currTyp = new CurrencyTypes();
                 $jobtit = new JobTitle();
                 $salgradelist = new SalaryGrades();
                 $form_creator->popArr['salgradelist'] = $salgradelist->getSalGrades(true);
                 $empdet = $empinfo->filterEmpJobInfo($getArr['id']);
                 $jt = $jobtit->filterJobTitles($empdet[0][2]);
                 $form_creator->popArr['payPeriodList'] = PayPeriod::getPayPeriodList();
                 $form_creator->popArr['salGrd'] = $salGrd = $empbassal->getEmpSalGrade($getArr['id']);
                 if (isset($getArr['PAY'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['PAY'];
                     $arr[2] = $getArr['CUR'];
                     $form_creator->popArr['editPaymentArr'] = $edit = $empbassal->filterEmpBasSal($arr);
                     $form_creator->popArr['salGrd'] = $salGrd = $edit[0][1];
                     $form_creator->popArr['currlist'] = $empbassal->getCurrCodes($edit[0][1]);
                 }
                 $form_creator->popArr['unAssCurrList'] = $empbassal->getUnAssCurrCodes($salGrd, $getArr['id']);
                 $form_creator->popArr['rsetPayment'] = $empbassal->getAssEmpBasSal($getArr['id']);
                 $form_creator->popArr['currAlllist'] = $currTyp->getAllCurrencyCodes();
                 $form_creator->popArr['suprset'] = $emprepto->getEmpSup($getArr['id']);
                 $form_creator->popArr['empname'] = $empinfo->getEmpInfo();
                 $form_creator->popArr['subrset'] = $emprepto->getEmpSub($getArr['id']);
                 if (isset($getArr['editIDSup'])) {
                     $arr[0] = $getArr['editIDSup'];
                     $arr[1] = $getArr['id'];
                     $arr[2] = $getArr['RepMethod'];
                     $form_creator->popArr['editIDSupInfo'] = $emprepto->filterEmpRepTo($arr);
                 }
                 if (isset($getArr['editIDSub'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['editIDSub'];
                     $arr[2] = $getArr['RepMethod'];
                     $form_creator->popArr['editIDSubInfo'] = $emprepto->filterEmpRepTo($arr);
                 }
                 $form_creator->popArr['allSkilllist'] = $skill->getSkillCodes();
                 $form_creator->popArr['uskilllist'] = $skill->getUnAssSkillCodes($getArr['id']);
                 if (isset($getArr['SKILL'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['SKILL'];
                     $form_creator->popArr['editSkillArr'] = $empskill->filterEmpSkill($arr);
                 }
                 $form_creator->popArr['rsetSkill'] = $empskill->getAssEmpSkill($getArr['id']);
                 $form_creator->popArr['newWrkExpID'] = $empworkex->getLastRecord($getArr['id']);
                 if (isset($getArr['WRKEXP'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['WRKEXP'];
                     $form_creator->popArr['editWrkExpArr'] = $edit = $empworkex->filterEmpWorkExp($arr);
                 }
                 $form_creator->popArr['rsetWrkExp'] = $empworkex->getAssEmpWorkExp($getArr['id']);
                 $form_creator->popArr['allEduCodes'] = $education->getListofEducation(0, '', 0);
                 $form_creator->popArr['unAssEduCodes'] = $empeducation->getUnAssEduCodes($getArr['id']);
                 if (isset($getArr['EDU'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['EDU'];
                     $form_creator->popArr['editEducationArr'] = $empeducation->filterEmpEducation($arr);
                 }
                 $form_creator->popArr['rsetEducation'] = $empeducation->getAssEmpEducation($getArr['id']);
                 if ($object != null) {
                     $form_creator->popArr['ctlist'] = $corptit->getCorpTitlesEmpInfo($object->cmbSalGrd);
                     $form_creator->popArr['deslist'] = $des->getDesEmpInfo($object->cmbCorpTit);
                     $form_creator->popArr['resplist'] = $porinfo->getProvinceCodes($object->cmbPermCountry);
                     $form_creator->popArr['resdlist'] = $distric->getDistrictCodes($object->cmbPermProvince);
                     $form_creator->popArr['brchlist'] = $brch->getUnAssBranchCodes($getArr['id'], $object->cmbBank);
                     $form_creator->popArr['ctlist'] = $empinfo->getCorpTitles($object->cmbSalGrd);
                     $form_creator->popArr['deslist'] = $empinfo->getDes($object->cmbCorpTit);
                     $form_creator->popArr['resplist'] = $empinfo->getProvinceCodes($object->cmbPermCountry);
                     $form_creator->popArr['resdlist'] = $empinfo->getDistrictCodes($object->cmbPermProvince);
                     $form_creator->popArr['brchlist'] = $brch->getUnAssBranchCodes($getArr['id'], $object->cmbBank);
                 } else {
                     $form_creator->popArr['resplist'] = $porinfo->getProvinceCodes($editPermRes[0][10]);
                     $form_creator->popArr['resdlist'] = $distric->getDistrictCodes($editPermRes[0][11]);
                 }
                 $empconext = new EmpConExt();
                 $form_creator->popArr['newConExtID'] = $empconext->getLastRecord($getArr['id']);
                 if (isset($getArr['CONEXT'])) {
                     $arr[0] = $getArr['id'];
                     $arr[1] = $getArr['CONEXT'];
                     $form_creator->popArr['editConExtArr'] = $empconext->filterConExt($arr);
                 }
                 $form_creator->popArr['rsetConExt'] = $empconext->getAssConExt($getArr['id']);
             }
             break;
         case 'REP':
             $form_creator->formPath = '/templates/hrfunct/hremprepto.php';
             $empinfo = new EmpInfo();
             $emprepto = new EmpRepTo();
             $form_creator->popArr['empdet'] = $empinfo->filterEmpMain($getArr['id']);
             $form_creator->popArr['suprset'] = $emprepto->getEmpSup($getArr['id']);
             $form_creator->popArr['empname'] = $empinfo->getEmpInfo();
             $form_creator->popArr['subrset'] = $emprepto->getEmpSub($getArr['id']);
             if (isset($getArr['editIDSup'])) {
                 $arr[0] = $getArr['editIDSup'];
                 $arr[1] = $getArr['id'];
                 $arr[2] = $getArr['repmethod'];
                 $form_creator->popArr['editIDSupInfo'] = $emprepto->filterEmpRepTo($arr);
             }
             if (isset($getArr['editIDSub'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editIDSub'];
                 $arr[2] = $getArr['repmethod'];
                 $form_creator->popArr['editIDSubInfo'] = $emprepto->filterEmpRepTo($arr);
             }
             break;
         case 'SKI':
             $form_creator->formPath = '/templates/hrfunct/hrempskill.php';
             $empinf = new EmpInfo();
             $empskill = new EmpSkill();
             $skill = new Skills();
             $form_creator->popArr['empDet'] = $empinf->filterEmpMain($getArr['id']);
             $form_creator->popArr['allSkilllist'] = $skill->getSkillCodes();
             if (isset($getArr['editID1'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID1'];
                 $arr[2] = $getArr['editID2'];
                 $form_creator->popArr['editArr'] = $empskill->filterEmpSkill($arr);
             } else {
                 $form_creator->popArr['uskilllist'] = $skill->getUnAssSkillCodes($getArr['id']);
             }
             $form_creator->popArr['rsets'] = $empskill->getAssEmpSkill($getArr['id']);
             break;
         case 'LIC':
             $form_creator->formPath = '/templates/hrfunct/hremplicenses.php';
             $empinf = new EmpInfo();
             $emplicen = new EmpLicenses();
             $licen = new Licenses();
             $form_creator->popArr['empDet'] = $empinf->filterEmpMain($getArr['id']);
             $form_creator->popArr['allLicenlist'] = $licenlist = $licen->getLicensesCodes();
             $form_creator->popArr['unassLicenlist'] = $licen->getUnAssLicensesCodes($getArr['id']);
             if (isset($getArr['editID1'])) {
                 $arr[0] = $getArr['id'];
                 $arr[1] = $getArr['editID1'];
                 $arr[2] = $getArr['editID2'];
                 $form_creator->popArr['editArr'] = $emplicen->filterEmpLicenses($arr);
             }
             $form_creator->popArr['rsets'] = $emplicen->getAssEmpLicenses($getArr['id']);
             break;
     }
     $form_creator->display();
 }