コード例 #1
0
ファイル: payroll.php プロジェクト: billyriantono/ihrmis
 function monthly($employee_id = '')
 {
     $data['page_name'] = '<b>Monthly Payroll</b>';
     $data['employee_id'] = $employee_id;
     $data['msg'] = '';
     if (Input::get('op')) {
     }
     $e = new Employee_m();
     $e->where('office_id', Input::get('office_id') ? Input::get('office_id') : Session::get('office_id'));
     $e->where('permanent', 1);
     $e->order_by('lname');
     $data['employees'] = $e->get();
     $data['main_content'] = 'monthly';
     return View::make('includes/template', $data);
 }
コード例 #2
0
ファイル: json.php プロジェクト: billyriantono/ihrmis
 function employees($office_id = '', $employee_id = '')
 {
     $e = new Employee_m();
     $e->order_by('lname');
     $employees = $e->get_by_office_id($office_id);
     $json = array();
     foreach ($employees as $employee) {
         // If employee is not blank we will
         // going to use the 'employee_id' field as index
         // not the 'id' field
         if ($employee_id != '') {
             $json[$employee->employee_id] = $employee->lname . ', ' . $employee->fname;
         } else {
             $json[$employee->id] = $employee->lname . ', ' . $employee->fname;
         }
     }
     echo json_encode($json);
 }
コード例 #3
0
ファイル: pds2.php プロジェクト: billyriantono/ihrmis
 function reports()
 {
     $data['page_name'] = '<b>Reports</b>';
     $data['pop_up'] = '';
     $data['rows'] = array();
     $data['records_found'] = '';
     if (Input::get('op')) {
         $e = new Employee_m();
         if (Input::get('lname') != '') {
             $e->where('lname', Input::get('lname'));
         }
         if (Input::get('fname') != '') {
             $e->where('fname', Input::get('fname'));
         }
         if (Input::get('position') != '') {
             $e->like('position', Input::get('position'));
         }
         if (Input::get('permanent') != 'all') {
             $e->where('permanent', Input::get('permanent'));
         }
         if (Input::get('office_id') != '0') {
             $e->where('office_id', Input::get('office_id'));
         }
         if (Input::get('salary_grade') != '') {
             list($salary_grade, $step) = explode("-", Input::get('salary_grade'));
             $e->where('salary_grade', $salary_grade);
             $e->where('step', $step);
         }
         // =======================================================
         if (Input::get('years_service') != '') {
             // If blank search for exact year
             if (Input::get('years_service_above') == '') {
             }
             $the_year = date('Y') - Input::get('years_service');
             $today = date('Y-m-d');
             $e->where('YEAR(first_day_of_service)', $the_year);
             $e->where('MONTH(first_day_of_service) >=', date('m'));
         }
         if (Input::get('eligibility') != '') {
             $e->like('eligibility', Input::get('eligibility'), 'both');
         }
         if (Input::get('course') != '') {
             $e->like('course', Input::get('course'), 'both');
         }
         if (Input::get('sex') != '') {
             $e->where('sex', Input::get('sex'));
         }
         if (Input::get('age') != '') {
             $the_year = date('Y') - Input::get('age');
             $e->where('YEAR(birth_date)', $the_year);
             $e->where('MONTH(birth_date) >=', date('m'));
         }
         if (Input::get('location') != '') {
             $e->like('res_address', Input::get('location'));
         }
         $e->order_by('lname');
         $data['rows'] = $e->get();
         $data['records_found'] = $e->result_count();
         // if search and print preview
         if (Input::get('search_preview')) {
             $data['pop_up'] = 1;
             $preview = new Search_result_preview();
             $data['report_file'] = $preview->preview($data['rows'], Input::get('report_name'));
         }
     }
     $data['options'] = array('position' => 'Position/ Designation', 'department' => 'Office/ Department', 'employment_status' => 'Employment Status');
     //Use for office listbox
     $data['options'] = $this->options->office_options($add_select = TRUE);
     $data['selected'] = Input::get('office_id');
     $data['permanent_options'] = $this->options->type_employment($all = TRUE);
     $data['permanent_selected'] = Input::get('permanent');
     $data['years_service_above_options'] = array('' => '', 'above' => 'above', 'below' => 'below');
     $data['years_service_above_selected'] = Input::get('years_service_above');
     $data['age_above_options'] = array('' => '', 'above' => 'above', 'below' => 'below');
     $data['age_above_selected'] = Input::get('age_above');
     $data['main_content'] = 'reports';
     return View::make('includes/template', $data);
 }
コード例 #4
0
 function training_employees()
 {
     $options = array();
     $ci =& get_instance();
     $e = new Employee_m();
     $e->where('lname !=', '');
     $e->where('status', 1);
     $e->order_by('lname');
     $types = $e->get();
     $ci->load->helper('text');
     foreach ($types as $type) {
         $options[$type->id] = $type->lname . ', ' . $type->fname . ' ' . $type->mname;
     }
     return $options;
 }
コード例 #5
0
ファイル: report.php プロジェクト: billyriantono/ihrmis
 function salary_index($employee_id = '')
 {
     $data['page_name'] = '<b>Employee Salary Index</b>';
     $data['employee_id'] = $employee_id;
     $data['msg'] = '';
     if (Input::get('op')) {
     }
     $e = new Employee_m();
     $e->where('permanent', 1);
     $e->where('id', 171);
     $e->order_by('lname');
     $data['employees'] = $e->get();
     $data['main_content'] = 'report/salary_index';
     return View::make('includes/template', $data);
 }
コード例 #6
0
ファイル: adcom.php プロジェクト: billyriantono/ihrmis
 function staff_entitlement($employee_id = '')
 {
     $this->load->helper('payroll_options');
     $data['page_name'] = '<b>Staff Entitlement</b>';
     //Use for office listbox
     $data['options'] = $this->options->office_options();
     $data['selected'] = Session::get('office_id');
     $data['additional_compensation_id'] = Input::get('additional_compensation_id') ? Input::get('additional_compensation_id') : 1;
     $data['msg'] = '';
     $office_id = Session::get('office_id');
     if (Input::get('op')) {
         $data['employee_id'] = Input::get('employee_id');
         $data['selected'] = Input::get('office_id');
     }
     if (Input::get('office_id')) {
         $office_id = Input::get('office_id');
     }
     $e = new Employee_m();
     $e->order_by('lname');
     $e->where('office_id', $office_id);
     $data['rows'] = $e->get();
     $data['main_content'] = 'adcom/staff/staff_entitlement';
     return View::make('includes/template', $data);
 }