<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /*	
 *	Author 	: Fachri
 *	Tanggal : 06-01-2015	
 *	Revisi 	: 
 */ 

class Rol_over extends CI_Controller {
	// inisialisasi manual
	public $menu_id = 223;
	
	// inisialisasi otomatis
	public $add = "add";
	public $edit = "edit";
	public $delete = "delete";
	public $to_preview = "to_preview";
	
	public function __construct() {
        parent::__construct();
		$this->load->model('m_menu');
		$this->load->model('m_rol_over');
		$this->load->helper('message');	
        $this->load->helper('convert_date');
		date_default_timezone_set('Asia/Jakarta');		
	}
	
	public function get_no_job_cos(){
		$result = $this->m_rol_over->get_no_job_cos($this->session->userdata('branch'));
		echo json_encode($result);
	}
	
	public function ajax($company){
		$result = $this->m_rol_over->get_persediaan_akun($this->session->userdata('branch'),$company);
		echo json_encode($result);
	}	
	
	function itemcategory(){
        $data = $this->load->m_rol_over->get_itemcategory();
        echo json_encode($data);
    }
}