Ejemplo n.º 1
0
 function list_drop()
 {
     $te = new Tax_Employee();
     $te->get();
     foreach ($te as $row) {
         $data[''] = '[ Pilih Pajak karyawan ]';
         $data[$row->sp_status] = $row->sp_status;
     }
     return $data;
 }
Ejemplo n.º 2
0
 function delete($id)
 {
     $this->filter_access('Tax_Employee', 'roled_delete', 'taxes_employees/index');
     $te = new Tax_Employee();
     $te->_delete($id);
     $this->session->set_flashdata('message', 'Taxes Employees successfully deleted!');
     redirect('taxes_employees/');
 }
Ejemplo n.º 3
0
 function edit($id)
 {
     $staff = new Staff();
     $rs = $staff->where('staff_id', $id)->get();
     $data['id'] = $rs->staff_id;
     $data['staff_nik'] = array('name' => 'staff_nik', 'value' => $rs->staff_nik);
     $data['staff_kode_absen'] = array('name' => 'staff_kode_absen', 'value' => $rs->staff_kode_absen);
     $data['staff_name'] = array('name' => 'staff_name', 'value' => $rs->staff_name);
     $data['staff_address'] = array('name' => 'staff_address', 'rows' => '2', 'value' => $rs->staff_address);
     $data['staff_email'] = array('name' => 'staff_email', 'value' => $rs->staff_email);
     $data['staff_email_alternatif'] = array('name' => 'staff_email_alternatif', 'value' => $rs->staff_email_alternatif);
     $data['staff_phone_home'] = array('name' => 'staff_phone_home', 'value' => $rs->staff_phone_home);
     $data['staff_phone_hp'] = array('name' => 'staff_phone_hp', 'value' => $rs->staff_phone_hp);
     // Status Pajak Karyawan
     $tax_employee = new Tax_Employee();
     $list_spk = $tax_employee->list_drop();
     $spk_selected = $staff->staff_status_pajak;
     $data['staff_status_pajak'] = form_dropdown('staff_status_pajak', $list_spk, $spk_selected);
     // Status Nikah
     $marital = new Marital();
     $list_sn = $marital->list_drop();
     $sn_selected = $staff->staff_status_nikah;
     $data['staff_status_nikah'] = form_dropdown('staff_status_nikah', $list_sn, $sn_selected);
     // Status Karyawan
     $employee_status = new Employee_Status();
     $list_sk = $employee_status->list_drop();
     $sk_selected = $staff->staff_status_karyawan;
     $data['staff_status_karyawan'] = form_dropdown('staff_status_karyawan', $list_sk, $sk_selected);
     // Branch
     $branch = new Branch();
     $list_branch = $branch->list_drop();
     $branch_selected = $staff->staff_cabang;
     $data['staff_cabang'] = form_dropdown('staff_cabang', $list_branch, $branch_selected);
     // Departement
     $dept = new Department();
     $list_dpt = $dept->list_drop();
     $dpt_selected = $staff->staff_departement;
     $data['staff_departement'] = form_dropdown('staff_departement', $list_dpt, $dpt_selected);
     //Jabatan
     $title = new Title();
     $list_jbt = $title->list_drop();
     $jbt_selected = $staff->staff_jabatan;
     $data['staff_jabatan'] = form_dropdown('staff_jabatan', $list_jbt, $jbt_selected);
     $data['staff_photo'] = array('name' => 'staff_photo', 'value' => $staff->staff_photo);
     $data['staff_birthdate'] = array('name' => 'staff_birthdate', 'id' => 'staff_birthdate', 'value' => $staff->staff_birthdate);
     $data['staff_birthplace'] = array('name' => 'staff_birthplace', 'value' => $staff->staff_birthplace);
     $options_sex = array('Laki' => 'Laki', 'Perempuan' => 'Perempuan');
     $sex_selected = $staff->staff_sex;
     $data['staff_sex'] = form_dropdown('staff_sex', $options_sex, $sex_selected);
     $data['staff_password'] = array('name' => 'staff_password');
     $data['btn_save'] = array('name' => 'btn_save', 'value' => 'Update', 'class' => 'btn btn-primary');
     $data['title'] = 'Update Staff';
     $data['message'] = '';
     $data['form_action'] = site_url('staffs/update');
     $data['link_back'] = anchor('staffs/', 'Back');
     /*$component_a = new Salary_Component_A();
       $data["component_a"] = $component_a->get()->all;
       
       $component_b = new Salary_Component_B();
       $data["component_b"] = $component_b->get()->all;
       
       $family = new Family();
       $data["family"] = $family->get()->all;*/
     $this->load->view('staffs/frm_staff', $data);
 }