application/modules/hr/models/Lov_model.php
// model untuk dropdown employee code di menu add rooster production
model untuk dropdown employee code di menu add rooster production
model untuk dropdown employee code di menu add rooster production
public function dd_empcode_ros()
    {
        $this->db->select('a.empcode, b.empname');
        $this->db->from('gang_master a');
        $this->db->join('emp_master b','a.empcode = b.empcode');
        $this->db->where('a.active=1');
        $this->db->where('b.empcode not in (SELECT empcode FROM hr_termination WHERE dateterminate < CURRENT_DATE() - INTERVAL 26 DAY)');
        $result = $this->db->get();
        if ($result->num_rows() > 0) {
            foreach ($result->result() as $row) {
                $a = " -> ";
                $dd[$row->empcode] = $row->empcode .$a. $row->empname;
            }
        }
        return $dd;
    }
public function dd_empcode_ros ( ) { $ this -> db -> select ( 'a.empcode, b.empname' ) ; $ this -> db -> from ( 'gang_master a' ) ; $ this -> db -> join ( 'emp_master b' , 'a.empcode = b.empcode' ) ; $ this -> db -> where ( 'a.active=1' ) ; $ this -> db -> where ( 'b.empcode not in (SELECT empcode FROM hr_termination WHERE dateterminate < CURRENT_DATE() - INTERVAL 26 DAY)' ) ; $ result = $ this -> db -> get ( ) ; if ( $ result -> num_rows ( ) > 0 ) { foreach ( $ result -> result ( ) as $ row ) { $ a = "  ->  " ; $ dd [ $ row -> empcode ] = $ row -> empcode . $ a . $ row -> empname ; } } return $ dd ; }
model untuk dropdown employee code di menu add rooster production
model untuk dropdown employee code di menu add rooster production
// ambil data dari db /*       $this->db->order_by('empcode', 'asc');
        $result = $this->db->get('emp_master');*/ // bikin array // please select berikut ini merupakan tambahan saja agar saat pertama // diload akan ditampilkan text please select. //$dd[''] = 'Empcode'; untuk placeholder // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)