$user_obj = $ulf->getById($row['user_id'])->getCurrent(); $t4ee = new T4Employee(); $t4ee->setSin($row['sin']); $t4ee->setFirstName($user_obj->getFirstName()); $t4ee->setMiddleName($user_obj->getMiddleName()); $t4ee->setLastName($user_obj->getLastName()); $t4ee->setAddress1($user_obj->getAddress1()); $t4ee->setAddress2($user_obj->getAddress2()); $t4ee->setCity($user_obj->getCity()); $t4ee->setProvince($user_obj->getProvince()); $t4ee->setPostalCode($user_obj->getPostalCode()); //$t4ee->setEmployementCode( ); //Get User Tax / Deductions by Pay Stub Account. $udlf = new UserDeductionListFactory(); if (isset($setup_data['employee_cpp_psea_id'])) { $udlf->getByUserIdAndPayStubEntryAccountID($user_obj->getId(), $setup_data['employee_cpp_psea_id']); if ($setup_data['employee_cpp_psea_id'] != 0 and $udlf->getRecordCount() == 0) { Debug::Text('CPP Exempt!', __FILE__, __LINE__, __METHOD__, 10); $t4ee->setExemptCPP(TRUE); } } if (isset($setup_data['employee_ei_psea_id'])) { $udlf->getByUserIdAndPayStubEntryAccountID($user_obj->getId(), $setup_data['employee_ei_psea_id']); if ($setup_data['employee_ei_psea_id'] != 0 and $udlf->getRecordCount() == 0) { Debug::Text('EI Exempt!', __FILE__, __LINE__, __METHOD__, 10); $t4ee->setExemptEI(TRUE); } } $t4ee->setEmploymentIncome($row['income']); $t4ee->setIncomeTax($row['income_tax']); $t4ee->setEmployeeCPP($row['employee_cpp']);