function getOtherFields($station_id) { Debug::Text('Getting Other Fields Map for Station ID: ' . $station_id, __FILE__, __LINE__, __METHOD__, 10); if ($station_id == '') { return FALSE; } $slf = new StationListFactory(); $slf->getByStationID($station_id); if ($slf->getRecordCount() > 0) { $s_obj = $slf->getCurrent(); $company_id = $s_obj->getCompany(); Debug::Text('Company ID: ' . $company_id, __FILE__, __LINE__, __METHOD__, 10); if ($company_id != FALSE) { $oflf = new OtherFieldListFactory(); $retval = $oflf->getByCompanyIdAndTypeIdArray($company_id, 15); return $retval; } } Debug::Text('Returning FALSE!', __FILE__, __LINE__, __METHOD__, 10); return FALSE; }
$permission->Redirect(FALSE); //Redirect } $smarty->assign('title', TTi18n::gettext($title = 'Employee Information Report')); // See index.php /* * Get FORM variables */ extract(FormVariables::GetVariables(array('action', 'generic_data', 'filter_data'))); //Debug::Arr($action, 'Action', __FILE__, __LINE__, __METHOD__,10); //Debug::Arr($filter_data, 'Filter Data', __FILE__, __LINE__, __METHOD__,10); URLBuilder::setURL($_SERVER['SCRIPT_NAME'], array('filter_data' => $filter_data)); $columns = array('-1010-employee_number' => TTi18n::gettext('Employee #'), '-1020-status' => TTi18n::gettext('Status'), '-1030-user_name' => TTi18n::gettext('User Name'), '-1040-phone_id' => TTi18n::gettext('Phone ID'), '-1050-ibutton_id' => TTi18n::gettext('iButton'), '-1060-first_name' => TTi18n::gettext('First Name'), '-1070-middle_name' => TTi18n::gettext('Middle Name'), '-1080-last_name' => TTi18n::gettext('Last Name'), '-1085-full_name' => TTi18n::gettext('Full Name'), '-1090-title' => TTi18n::gettext('Title'), '-1099-group' => TTi18n::gettext('Group'), '-1100-default_branch' => TTi18n::gettext('Branch'), '-1110-default_department' => TTi18n::gettext('Department'), '-1112-permission_control' => TTi18n::gettext('Permission Group'), '-1115-policy_group' => TTi18n::gettext('Policy Group'), '-1118-pay_period_schedule' => TTi18n::gettext('Pay Period Schedule'), '-1120-sex' => TTi18n::gettext('Sex'), '-1130-address1' => TTi18n::gettext('Address 1'), '-1140-address2' => TTi18n::gettext('Address 2'), '-1150-city' => TTi18n::gettext('City'), '-1160-province' => TTi18n::gettext('Province/State'), '-1170-country' => TTi18n::gettext('Country'), '-1180-postal_code' => TTi18n::gettext('Postal Code'), '-1190-work_phone' => TTi18n::gettext('Work Phone'), '-1200-home_phone' => TTi18n::gettext('Home Phone'), '-1210-mobile_phone' => TTi18n::gettext('Mobile Phone'), '-1220-fax_phone' => TTi18n::gettext('Fax Phone'), '-1230-home_email' => TTi18n::gettext('Home Email'), '-1240-work_email' => TTi18n::gettext('Work Email'), '-1250-birth_date' => TTi18n::gettext('Birth Date'), '-1260-hire_date' => TTi18n::gettext('Hire Date'), '-1270-termination_date' => TTi18n::gettext('Termination Date'), '-1280-sin' => TTi18n::gettext('SIN/SSN'), '-1289-note' => TTi18n::gettext('Note'), '-1290-institution' => TTi18n::gettext('Bank Institution'), '-1300-transit' => TTi18n::gettext('Bank Transit/Routing'), '-1310-account' => TTi18n::gettext('Bank Account'), '-1319-currency' => TTi18n::gettext('Currency'), '-1320-wage_type' => TTi18n::gettext('Wage Type'), '-1330-wage' => TTi18n::gettext('Wage'), '-1340-effective_date' => TTi18n::gettext('Wage Effective Date'), '-1500-language' => 'Language', '-1510-date_format' => 'Date Format', '-1520-time_format' => 'Time Format', '-1530-time_unit' => 'Time Units', '-1540-time_zone' => 'Time Zone', '-1550-items_per_page' => 'Rows Per page'); //Get custom user fields $oflf = new OtherFieldListFactory(); $other_field_names = $oflf->getByCompanyIdAndTypeIdArray($current_company->getId(), 10); if (is_array($other_field_names)) { $columns = Misc::prependArray($columns, $other_field_names); } if (!isset($filter_data['include_user_ids'])) { $filter_data['include_user_ids'] = array(); } if (!isset($filter_data['exclude_user_ids'])) { $filter_data['exclude_user_ids'] = array(); } if (!isset($filter_data['user_status_ids'])) { $filter_data['user_status_ids'] = array(); } if (!isset($filter_data['group_ids'])) { $filter_data['group_ids'] = array(); }
} } $blf = new BranchListFactory(); $branch_options = $blf->getByCompanyIdArray($current_company->getId()); $dlf = new DepartmentListFactory(); $department_options = $dlf->getByCompanyIdArray($current_company->getId()); if ($current_company->getProductEdition() == 20) { $jlf = new JobListFactory(); $jlf->getByCompanyIdAndUserIdAndStatus($current_company->getId(), $pc_data['user_id'], array(10, 20, 30, 40)); $pc_data['job_options'] = $jlf->getArrayByListFactory($jlf, TRUE, TRUE); $pc_data['job_manual_id_options'] = $jlf->getManualIDArrayByListFactory($jlf, TRUE); $jilf = new JobItemListFactory(); $jilf->getByCompanyId($current_company->getId()); $pc_data['job_item_options'] = $jilf->getArrayByListFactory($jilf, TRUE, TRUE); $pc_data['job_item_manual_id_options'] = $jilf->getManualIdArrayByListFactory($jilf, TRUE); } //Select box options; $pc_data['status_options'] = $pf->getOptions('status'); $pc_data['type_options'] = $pf->getOptions('type'); $pc_data['branch_options'] = $branch_options; $pc_data['department_options'] = $department_options; //Get other field names $oflf = new OtherFieldListFactory(); $pc_data['other_field_names'] = $oflf->getByCompanyIdAndTypeIdArray($current_company->getId(), 15); //Debug::Text('pc_data[date_stamp]: '. TTDate::getDate('DATE+TIME', $pc_data['date_stamp']), __FILE__, __LINE__, __METHOD__,10); $smarty->assign_by_ref('pc_data', $pc_data); break; } $smarty->assign_by_ref('pcf', $pcf); $smarty->assign_by_ref('pf', $pf); $smarty->display('punch/EditPunch.tpl');
//Get Permission Groups $pclf = new PermissionControlListFactory(); $pclf->getByCompanyId($company_id); $user_data['permission_control_options'] = $pclf->getArrayByListFactory($pclf, FALSE); //Get pay period schedules $ppslf = new PayPeriodScheduleListFactory(); $pay_period_schedules = $ppslf->getByCompanyIDArray($company_id); $user_data['pay_period_schedule_options'] = $pay_period_schedules; $pglf = new PolicyGroupListFactory(); $policy_groups = $pglf->getByCompanyIDArray($company_id); $user_data['policy_group_options'] = $policy_groups; $uglf = new UserGroupListFactory(); $user_data['group_options'] = $uglf->getArrayByNodes(FastTree::FormatArray($uglf->getByCompanyIdArray($company_id), 'TEXT', TRUE)); //Get other field names $oflf = new OtherFieldListFactory(); $user_data['other_field_names'] = $oflf->getByCompanyIdAndTypeIdArray($company_id, 10); $user_data['hierarchy_object_type_options'] = $hierarchy_object_type_options; $user_data['hierarchy_control_options'] = $hierarchy_control_options; //Company list. if ($permission->Check('company', 'view')) { $user_data['company_options'] = CompanyListFactory::getAllArray(); } else { $user_data['company_options'] = array($company_id => $current_company->getName()); } $filter_data = NULL; extract(UserGenericDataFactory::getSearchFormData($saved_search_id, NULL)); if ($permission->Check('user', 'edit') == FALSE) { $filter_data['permission_children_ids'] = $permission_children_ids; } $ulf->getSearchByCompanyIdAndArrayCriteria($company_id, $filter_data); $user_data['user_options'] = UserListFactory::getArrayByListFactory($ulf, FALSE, TRUE);