示例#1
0
        //Get departments
        $dlf = new DepartmentListFactory();
        $dlf->getByCompanyId($current_company->getId());
        $department_options = Misc::prependArray($all_array_option, $dlf->getArrayByListFactory($dlf, FALSE, TRUE));
        $filter_data['src_department_options'] = Misc::arrayDiffByKey((array) $filter_data['department_ids'], $department_options);
        $filter_data['selected_department_options'] = Misc::arrayIntersectByKey((array) $filter_data['department_ids'], $department_options);
        //Get employee titles
        $utlf = new UserTitleListFactory();
        $utlf->getByCompanyId($current_company->getId());
        $user_title_options = Misc::prependArray($all_array_option, $utlf->getArrayByListFactory($utlf, FALSE, TRUE));
        $filter_data['src_user_title_options'] = Misc::arrayDiffByKey((array) $filter_data['user_title_ids'], $user_title_options);
        $filter_data['selected_user_title_options'] = Misc::arrayIntersectByKey((array) $filter_data['user_title_ids'], $user_title_options);
        //Deduction PSEA accounts
        $psealf = new PayStubEntryAccountListFactory();
        $filter_data['deduction_pay_stub_entry_account_options'] = $psealf->getByCompanyIdAndStatusIdAndTypeIdArray($current_company->getId(), 10, array(20, 30, 40), TRUE);
        $filter_data['earning_pay_stub_entry_account_options'] = $psealf->getByCompanyIdAndStatusIdAndTypeIdArray($current_company->getId(), 10, array(10, 40), TRUE);
        $filter_data['income_pay_stub_entry_account_options'] = $psealf->getByCompanyIdAndStatusIdAndTypeIdArray($current_company->getId(), 10, array(10, 30, 40), TRUE);
        //Get employee list
        //$filter_data['user_options'] = UserListFactory::getByCompanyIdArray( $current_company->getId(), FALSE );
        //Quarters
        $filter_data['year_options'] = $year_options;
        $setup_data['state_options'] = $state_options;
        $saved_report_options = $ugdlf->getByUserIdAndScriptArray($current_user->getId(), $_SERVER['SCRIPT_NAME']);
        $generic_data['saved_report_options'] = $saved_report_options;
        $smarty->assign_by_ref('generic_data', $generic_data);
        $smarty->assign_by_ref('filter_data', $filter_data);
        $smarty->assign_by_ref('setup_data', $setup_data);
        $smarty->assign_by_ref('ugdf', $ugdf);
        $smarty->display('report/Form940ez.tpl');
        break;
}