<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/* 
 * Author   : Ferry / Tanggal : 22-06-2015 
 * Revisi   :
 */
 
class Index_to_report extends CI_Controller {
	//public $menu_id   = array(271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287);
	
    public function __construct() {
        parent::__construct();
        
        $this->load->helper('status');
        $this->load->helper('message');
        $this->load->helper('number');

        if($this->session->userdata("login") != TRUE) {
            redirect("login", "refresh");
            die;
        }        
    }

    public function index() {
		$menu_id = 271;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_sales', $data);
        $this->load->view('v_footer');
    }
	
    public function sales(){
		$menu_id = 271;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_sales', $data);
        $this->load->view('v_footer');
    }
	
    public function purchase(){
		$menu_id = 272;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_purchase', $data);
        $this->load->view('v_footer');
    }
	
    public function account_receivables(){
		$menu_id = 273;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_acc_receivable', $data);	
        $this->load->view('v_footer');
    }
	
    public function account_payables(){
		$menu_id = 274;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_acc_payable', $data);
        $this->load->view('v_footer');
    }
	
	public function financial_statements(){
		$menu_id = 275;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		//echo $this->db->last_query();
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_financial_statement', $data);
        $this->load->view('v_footer');
    }
	
    public function general_ledger(){
		$menu_id = 276;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_general_ledger', $data);
        $this->load->view('v_footer');
    }
	
    public function cash_bank(){
		$menu_id = 277;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_cash_bank', $data);
        $this->load->view('v_footer');		
    }

    public function fixed_asset(){
		$menu_id = 278;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_fixed_asset', $data);
        $this->load->view('v_footer');		
    }

    public function inventory(){
		$menu_id = 279;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] = $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_inventory', $data);
        $this->load->view('v_footer');		
    }

    public function warehouse(){
		$menu_id = 280;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_warehouse', $data);
        $this->load->view('v_footer');		
    }
	
    public function biaya_dibayar_dimuka(){
		$menu_id = 281;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_biaya_dibayar_dimuka', $data);
        $this->load->view('v_footer');		
    }

    public function giro_mundur(){
		$menu_id = 282;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_giro_mundur', $data);
        $this->load->view('v_footer');		
    }

    public function daftar_pinjaman(){
		$menu_id = 283;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_daftar_pinjaman', $data);
        $this->load->view('v_footer');		
    }

    public function job_costing_bahan_baku(){
		$menu_id = 284;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_job_costing_bahan_baku', $data);
        $this->load->view('v_footer');		
    }

    public function sparepart(){
		$menu_id = 285;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_sparepart', $data);
        $this->load->view('v_footer');		
    }
	
    public function journal(){
		$menu_id = 286;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_journal', $data);
        $this->load->view('v_footer');		
    }

    public function departments(){
		$menu_id = 287;
		$group_menu         	= $this->session->userdata('group_menu');
		//panggil model hak akses untuk autoriti
		$data['group_user'] 	= $this->m_menu->group_user_autority($menu_id, $group_menu);
		$data['report_menu'] 	= $this->m_menu->get_menu_report($group_menu);
		//panggil m menu untuk sub report
		$data['group_sub_report'] 	= $this->m_menu->get_menu_sub_report($menu_id, $group_menu);
		
        $this->load->view('v_header');
        $this->load->view('index_to_report/view_department', $data);
        $this->load->view('v_footer');		
    }
}

/* End of file index to report.php */
/* Location: ./application/controllers/report/index_to_report.php */