<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Icd_print_out_ctrl extends user_icd_index {
 
	
	public function __construct(){
		parent::__construct();  
		$data = array();
		$this->load->model('admin_model');
		$this->load->model('icd_model');		
	}
	
	/*----------------- load finance_entry_approve_print_out page -----------------*/
	public function finance_entry_approve_print_out($idl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/finance_entry_approve_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['idl_data'] 		= $this->icd_model->get_icd_details_list($idl_id);
		$data['sdata']['icdl_list'] 		= $this->icd_model->get_icdl_details_list($idl_id);
		foreach($data['sdata']['icdl_list'] as $icdl_listrow)
		{
		     $l_id = $icdl_listrow['idl_ppo_id'];
		}
	 	 $data['sdata']['user_name'] 		= $this->icd_model->get_user_name($l_id);
	 	 foreach($data['sdata']['user_name'] as $user_name_row)
		{
		      $data['user_name_val'] = $user_name_row['l_user_name'];
		}
 
	 
		$this->load->view('icd/common/icd_sidepanel',$data); 
	} 

	/*----------------- load gate_entry_details_print_out page -----------------*/
	public function gate_entry_details_print_out($igedl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/gate_entry_details_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igedl_data'] 				= $this->icd_model->get_icd_igedl_details_list('',$igedl_id);
		$data['sdata']['iidl_list'] 				= $this->icd_model->get_icdl_iidl_details_list('',$igedl_id);
		$data['sdata']['igedl_data11'] 				= $this->icd_model->get_icd_igedl_details_list_print('',$igedl_id);
	  
		foreach($data['sdata']['igedl_data11'] as $icdl_listrow)
		{
		       $l_id = $icdl_listrow['igedl_tno_id'];
		}
	 
	 	 $data['sdata']['user_name'] 		= $this->icd_model->get_user_name($l_id);
	 	 foreach($data['sdata']['user_name'] as $user_name_row)
		{
		      $data['user_name_val'] = $user_name_row['l_user_name'];
		}
	
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}
	

	/*----------------- load authorize_icd_gate_entry_details_print_out page -----------------*/
	public function authorize_icd_gate_entry_details_print_out($igedl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/authorize_icd_gate_entry_details_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igedl_data'] 				= $this->icd_model->get_icd_igedl_details_list('',$igedl_id);
		$data['sdata']['iidl_list'] 				= $this->icd_model->get_icdl_iidl_details_list('',$igedl_id);
		$data['sdata']['igedl_data11'] 				= $this->icd_model->get_icd_igedl_details_list_print('',$igedl_id);
	  
		foreach($data['sdata']['igedl_data11'] as $icdl_listrow)
		{
		       $l_id = $icdl_listrow['igedl_tno_id'];
		}
	 
	 	 $data['sdata']['user_name'] 		= $this->icd_model->get_user_name($l_id);
	 	 foreach($data['sdata']['user_name'] as $user_name_row)
		{
		      $data['user_name_val'] = $user_name_row['l_user_name'];
		}
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}
	/*----------------- load out_gate_pass_icd_authorization_print_out page -----------------*/
	public function out_gate_pass_icd_authorization_print_out($igedl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/out_gate_pass_icd_authorization_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igedl_data'] 				= $this->icd_model->get_icd_igedl_details_list('',$igedl_id);
		$data['sdata']['iidl_list'] 				= $this->icd_model->get_icdl_iidl_details_list('',$igedl_id,'','1');
			$data['sdata']['igedl_data11'] 				= $this->icd_model->get_icd_igedl_details_list_print('',$igedl_id);
	  
		foreach($data['sdata']['igedl_data11'] as $icdl_listrow)
		{
		       $l_id = $icdl_listrow['igedl_tno_id'];
		}
	 
	 	 $data['sdata']['user_name'] 		= $this->icd_model->get_user_name($l_id);
	 	 foreach($data['sdata']['user_name'] as $user_name_row)
		{
		      $data['user_name_val'] = $user_name_row['l_user_name'];
		}
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}
 
	/*----------------- load container_release_approve_details_print_out page -----------------*/
	public function container_release_approve_details_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/container_release_approve_details_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igetl_data'] 		= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id,'','','','1','1','1','1','0');
		// echo $this->db->last_query();return;
		
		$data['sdata']['itncl_list'] 	= $this->icd_model->get_icdl_itncl_details_list('',$igetl_id,'','1','','1');

		$this->load->view('icd/common/icd_sidepanel',$data); 
	}

	/*----------------- load icd_container_out_proceed_print_out page -----------------*/
	public function icd_container_out_proceed_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_container_out_proceed_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igetl_data'] 		= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id);				
		$data['sdata']['itncl_list'] 	= $this->icd_model->get_icdl_itncl_details_list('',$igetl_id,'','1','','1');
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}


	/*----------------- load icd_container_out_local_gate_print_out page -----------------*/
	public function icd_container_out_local_gate_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_container_out_local_gate_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igetl_data'] 	= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id);				
		$data['sdata']['itncl_list'] 	= $this->icd_model->get_icdl_itncl_details_list('',$igetl_id,'','1','','1');
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}

	/*------- load icd_vehicle_gpo_authorize_at_local_print_out  (gpo - gate pass out)  page -------*/
	public function icd_vehicle_gpo_authorize_at_local_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_vehicle_gpo_authorize_at_local_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igetl_data'] 	= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id);				
		$data['sdata']['itncl_list'] 	= $this->icd_model->get_icdl_itncl_details_list('',$igetl_id,'','1','','1');
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}


	/*- load icd_out_l_e_or_l_m_proceed_print_out (l_e_or_l_m-local extra or lcl material )  page -*/
	public function icd_out_l_e_or_l_m_proceed_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_out_l_e_or_l_m_proceed_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		// $data['sdata']['igedl_data'] 				= $this->icd_model->get_icd_igedl_details_list('',$igedl_id,'1','0');
		// $data['sdata']['iidl_list'] 				= $this->icd_model->get_icdl_iidl_details_list('',$igedl_id,'','1');

		$data['sdata']['igetl_data'] 		= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id);				
		$data['sdata']['itncl_list'] 	= $this->icd_model->get_icdl_itncl_details_list('',$igetl_id,'','1','','1');
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}

	/*------- load icd_out_local_extra_icd_gate_print_out  page -------*/
	public function icd_out_local_extra_icd_gate_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_out_local_extra_icd_gate_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igetl_data'] 		= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id);				
		$data['sdata']['itncl_list'] 	= $this->icd_model->get_icdl_itncl_details_list('',$igetl_id,'','1','','1');
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}


	/*------- load icd_gpofvo_loacl_extra_lcl_authorize_print_out  page -------*/
	public function icd_gpofvo_loacl_extra_lcl_authorize_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_gpofvo_loacl_extra_lcl_authorize_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igetl_data'] 		= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id);				
		$data['sdata']['itncl_list'] 	= $this->icd_model->get_icdl_itncl_details_list('',$igetl_id,'','1','','1');
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}

	/*------- load icd_out_vehicle_transit_empty_proceed_print_out  page -------*/
	public function icd_out_vehicle_transit_empty_proceed_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_out_vehicle_transit_empty_proceed_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igetl_data'] 		= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id);				
		$data['sdata']['itncl_list'] 	= $this->icd_model->get_icdl_itncl_details_list('',$igetl_id,'','1','','1');
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}

	/*------- load icd_out_vehicle_transit_empty_aproove_print_out  page -------*/
	public function icd_out_vehicle_transit_empty_aproove_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_out_vehicle_transit_empty_aproove_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igetl_data'] 		= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id);				
		$data['sdata']['itncl_list'] 	= $this->icd_model->get_icdl_itncl_details_list('',$igetl_id,'','1','','1');
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}

	/*------- load icd_gate_vehicle_pass_out_transit_empty_print_out  page -------*/
	public function icd_gate_vehicle_pass_out_transit_empty_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_gate_vehicle_pass_out_transit_empty_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igetl_data'] 		= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id);				
		$data['sdata']['itncl_list'] 	= $this->icd_model->get_icdl_itncl_details_list('',$igetl_id,'','1','','1');
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}

	/*------- load icd_out_transit_material_proceed_print_out  page -------*/
	public function icd_out_transit_material_proceed_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_out_transit_material_proceed_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igetl_data'] 		= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id);		
		$data['sdata']['itml_list'] 	= $this->icd_model->get_icdl_itml_details_list('',$igetl_id,'','1');
		
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}

	/*------- load icd_out_transit_material_icd_gate_print_out  page -------*/
	public function icd_out_transit_material_icd_gate_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_out_transit_material_icd_gate_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igetl_data'] 		= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id);
		$data['sdata']['itml_list'] 	= $this->icd_model->get_icdl_itml_details_list('',$igetl_id,'','1');
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}

	/*------- load icd_out_transit_material_icd_gate_print_print_out  page -------*/
	public function icd_out_transit_material_icd_gate_print_print_out($igetl_id){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_out_transit_material_icd_gate_print_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['igetl_data'] 		= $this->icd_model->get_icdl_igetl_details_list('','',$igetl_id);
		$data['sdata']['itml_list'] 	= $this->icd_model->get_icdl_itml_details_list('',$igetl_id,'','1');
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}

	/*------- load icd_container_cvo_verify_print_out  page -------*/
	public function icd_container_cvo_verify_print_out(){		
		$data['sdata'] 			= array();
		$data['subview'] 		= 'icd/icd_print_out/icd_container_cvo_verify_print_out';		
		$data['active_cls'] 	= 'dash';			
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');			
	
		$data['sdata']['ivcl_list'] 		= $this->icd_model->get_ivcl_verification_list('1');
		
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}
	
	
	
}
