<?php	if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Refill_track extends CI_Controller {

	function __construct()	{
		parent::__construct();
		 //$this->lang->load('masters', '');
		//$this->lang->load('hindi', '');
		  $language = $this->session->userdata('language'); 
        if ($language=='hindi') {
               $this->lang->load('hindi', '');
        }else{
              $this->lang->load('masters', '');
            }
		//error_reporting(E_ALL);
	}

	function index()	{	
		$this->list_refill_track();
	}

	function list_refill_track($get_tracking_number='')
	{
		admin_auth();
		//error_reporting(E_ALL);
	  if($get_tracking_number=="")
	  {
		$tracking_number = check_injections_filter($this->input->post('refill_tracking_number'));
	  }
	  else
	  {
		$tracking_number= $this->encrypt->decode($get_tracking_number);
		$tracking_number =  $tracking_number;
	  } 
	  
	  $cond[] = array('where','tracking_number',$tracking_number);

	   $select=array(
                              'table_name'=>TABLE_TRACKING_NUMBERS,
                              'table_fields'=>'tracking_number,tracking_numbers_id',
                               'condition'=>$cond,
                               'limit'=>'',
                               'offset'=>''
                              );
	   $track_check['track_check'] = $this->master_model->select_data($select); 
	  /*  foreach ($track_check['track_check'] as  $value) {
	          	$tracking_numbers_id=$value['tracking_numbers_id'];
	          }  */        
       if(!empty($track_check['track_check'])&& is_array($track_check['track_check'])){

		$this->page_data['page_title']="History of ".$tracking_number;
		$this->page_data['bredcrum']=array(
			 							'Refill Tracking'=>'#',
										//'Company Branch'=>'#',
										'History of Tracking Number'=>'#',
										);


		

		 $condition[] = array('join',TABLE_COMPANY_BRANCH.' as e','e.company_branch_id = a.company_branch_id','inner');
		 $condition[] = array('join',TABLE_CUSTOMER.' as c','c.customer_id = a.customer_id','inner');
		  $condition[] = array('join',TABLE_DISPENSER_SALES.' as b','b.dispenser_sales_id = a.dispenser_sales_id','inner');	
		 $condition[] = array('join',TABLE_DISPENSER_REFILL_DETAILS.' as r','r.dispenser_refill_details_id = a.dispenser_refill_details_id','inner');
		$condition[] = array('join',TABLE_PRODUCT.' as p','b.product_id = p.product_id','inner');
		  $condition[] = array('join',TABLE_PRODUCT.' as p1','r.product_id = p1.product_id','inner');     
		    $condition[] = array('join',TABLE_TRACKING_NUMBERS.' as t','t.tracking_numbers_id = a.tracking_numbers_id','left');   
		$condition[] = array('where','a.tracking_number',$tracking_number);
		//$condition[] = array('where','t.tracking_number',$tracking_number);

        $selected_array=array(
                              'table_name'=>TABLE_TRACKING_DETAILS.' as a',
                              'table_fields'=>'p1.product_id,p.product_name as dispenser,a.is_returned,e.company_branch_name,r.refill_date,c.customer_name,p.dispenser_name, p1.product_name, b.sales_type, b.dispenser_quantity, r.refill_location, b.installation_date, r.next_refill_date, r.duration_days, b.comments, r.product_id, a.dispenser_sales_id, b.dispenser_sales_id, b.product_id, b.customer_id, p.product_id, c.customer_id,t.possessed_by,is_status',
                               'condition'=>$condition,
                               'limit'=>'',
                               'order'=>'DESC',
                               'order_by_field'=>'r.dispenser_refill_details_id',
                               'group_by_field'=>'',
                               'offset'=>''
                              );
        $refill_history = $this->master_model->select_data($selected_array);
        //dump($this->db->last_query());
      
       if(!empty($refill_history)&& is_array($refill_history))
	   {							
			$this->page_data['refill_history'] = $refill_history;
			//$this->page_data['tracking_id']= $refill_history[0]['tracking_details_id'];
			//$this->page_data['tracking_number']= $refill_history[0]['tracking_number'];
			$this->page_data['customer_name']= $refill_history[0]['customer_name'];
			$this->page_data['company_branch_name']= $refill_history[0]['company_branch_name'];
			$this->page_data['installation_date']= $refill_history[0]['installation_date'];
			$this->page_data['dispenser']= $refill_history[0]['dispenser'];
			$this->page_data['possessed_by']= $refill_history[0]['possessed_by'];
			$this->page_data['is_status']= $refill_history[0]['is_status'];
  	    } 

			$this->load->view('gc/refill_tracking_list.php',$this->page_data);
      }	
      else{

      	$this->session->set_flashdata('msg','Invalid Tracking Number');
      	redirect('gc/refill_track/manage_refill_track');
      }
    
	
	}
	
	// function view_refill_track() {
	// 	$this->_page_data['page_title']="View Company Branch";
	// 	$this->_page_data['bredcrum']=array(
	// 									'Masters'=>'#',
	// 									'Company Branch'=>'#',
	// 									'List Company Branch'=>site_url('gc/company_branch/list_company_branch'),
	// 									'View Company Branch'=>'#',
	// 									);
	// 	$this->load->view('gc/refill_tracking_view.php',$this->_page_data);
	// }
	
	function manage_refill_track() {
		admin_auth();
		
		$this->_page_data['lable_refill_tracking']=$this->lang->line('lable_refill_tracking', FALSE);
		$this->_page_data['page_title']=" Search Tracking ";
		$this->_page_data['bredcrum']=array(
										'Refill Tracking'=>'#',
									    //'Company Branch'=>'#',
										//'List Company Branch'=>site_url('gc/company_branch/list_gc_type'),
										'Tracking '=>'#',
										);


		$this->load->view('gc/refill_tracking.php',$this->_page_data);
	}
	
	function manage_stop_refill() {
		admin_auth();
		
		$this->_page_data['lable_refill_tracking']=$this->lang->line('lable_refill_tracking', FALSE);
		$this->_page_data['page_title']=" Stop Refill ";
		$this->_page_data['bredcrum']=array(
										'Tracking History'=>'#',
										'Stop Refill'=>'#',
									    //'Company Branch'=>'#',
										//'List Company Branch'=>site_url('gc/company_branch/list_gc_type'),
										
										);
		$refill_cond = array();
		$refill_cond[] = array('where','is_active','1');
		$refill_cond[] = array('where','product_type','dispenser');
		$select_array = array(
								'table_name'=>TABLE_PRODUCT,
								'table_fields'=>'product_name,product_id',
								'condition'=>$refill_cond,
								'sort_by'=>'product_id',
								'order_by_field'=>'product_name',
								'order'=>'ASC',
								'limit'=>'',
								'offset'=>''
								);
		$refill_data=$this->master_model->select_data($select_array);
		$refill_cnt_data=count($refill_data);
		$this->_page_data['refill_array'] = '';
		if($refill_cnt_data > 0)
		{
			foreach($refill_data as $cKey => $cValue)
			{
				$this->_page_data['refill_array'][''] = 'Select Dispenser Name';
				$this->_page_data['refill_array'][$cValue['product_id']] = $cValue['product_name'];
			}
		}
		$this->load->view('gc/stop_refill.php',$this->_page_data);
	}
	
	function list_stop_refill($query_id = 0, $sort_by = 'dispenser_sales_id', $sort_order = 'asc', $offset = 0,$sort_type=0)
	{
		admin_auth();
		
		$limit = LIMIT_PER_PAGE;
	    $customer_id = check_injections_filter($this->input->post('customer_id')); 
	    $dispenser_id = check_injections_filter($this->input->post('dispenser_id')); 
	    $access_branch= $this->session->userdata('access_branch');
	    // echo $customer_id;
	    // echo $dispenser_id;
	    // exit;

		$this->_page_data['page_title']="List of Refills";
		$this->_page_data['bredcrum']=array(
			 							'Tracking History'=>'#',
										'Stop Refill'=>'#',
										'List of Refills'=>site_url('gc/refill_track/manage_stop_refill'),
										);


		 // $condition[] = array('join',TABLE_TRACKING_NUMBERS.' as t','t.tracking_numbers_id = a.tracking_numbers_id','inner');

        //dump($this->db->last_query());
      
        if ($access_branch!='') 
		{
			 $acb =  explode( ',',$access_branch);
			 $condition[] = array('where_in','b.company_branch_id',$acb);
		}
        if ($customer_id>"0") {
        		
			$customer_name=get_data_value(TABLE_CUSTOMER,'customer_name','customer_id',$customer_id,'where');
			$this->_page_data['dis_customer_name']=$customer_name;
			$condition[] = array('where','b.customer_id',$customer_id);
		}
		else{
			$this->_page_data['dis_customer_name']='';
		}
				
		if($dispenser_id!="")
		{
			$product_name=get_data_value(TABLE_PRODUCT,'product_name','product_id',$dispenser_id,'where');
			$this->_page_data['dis_product_name']=$product_name;
			$condition[] = array('where','b.product_id',$dispenser_id);
		}else{
			$this->_page_data['dis_product_name']='';
		}
		
		$condition[] = array('join',TABLE_DISPENSER_REFILL_DETAILS.' as a','b.dispenser_sales_id = a.dispenser_sales_id','inner');
		//$condition[] = array('join',TABLE_DISPENSER_SALES.' as f','f.dispenser_sales_id = b.dispenser_sales_id','inner');
		$condition[] = array('join',TABLE_PRODUCT.' as p','a.product_id = p.product_id','inner');
		$condition[] = array('join',TABLE_PRODUCT.' as p1','b.product_id = p1.product_id','inner');
        $condition[] = array('join',TABLE_CUSTOMER.' as c','c.customer_id = b.customer_id','inner');
        $condition[] = array('join',TABLE_CUSTOMER_ADDRESSS.' as d','c.customer_id = d.customer_id','inner');
        $condition[] = array('where','a.stop_refill','no');
     
        $sort_columns = array('refill_name','installation_date','refill_date','customer_name');
			$search_array=array(
							'limit' => $limit,
							'offset' => $offset,
							'sort_by' => $sort_by,
							'sort_type' => $sort_type,
							'sort_order' => $sort_order,
							'sort_columns'=> $sort_columns,
							'table_fields'=>'b.dispenser_sales_id,p1.product_name as dispenser,b.sales_type,a.dispenser_refill_details_id,c.customer_name,p.dispenser_name, p.product_name as refill_name, b.dispenser_quantity, a.refill_location, b.installation_date,a.refill_date, a.next_refill_date, a.duration_days, b.comments, a.product_id, a.dispenser_sales_id, b.dispenser_sales_id,b.product_id, b.customer_id, p.product_id,c.customer_id',
							'group_by_field'=>'b.dispenser_sales_id',
							'table_name'=>TABLE_DISPENSER_SALES.' as b',
							'cond'=> $condition,
							);
			$results = $this->master_model->search($search_array);
			$search_full_array=array(
							'limit' => '',
							'offset' => '',
							'sort_by' => $sort_by,
							'sort_type' => $sort_type,
							'sort_order' => $sort_order,
							'sort_columns'=> $sort_columns,
							'table_fields'=>'b.dispenser_sales_id,p1.product_name as dispenser,b.sales_type,a.dispenser_refill_details_id,c.customer_name,p.dispenser_name, p.product_name as refill_name, b.dispenser_quantity, a.refill_location, b.installation_date,a.refill_date, a.next_refill_date, a.duration_days, b.comments, a.product_id, a.dispenser_sales_id, b.dispenser_sales_id,b.product_id, b.customer_id, p.product_id,c.customer_id',
							'group_by_field'=>'b.dispenser_sales_id',
							'table_name'=>TABLE_DISPENSER_SALES.' as b',
							'condition'=> $condition,
							);
			$search_data=$this->master_model->select_data($search_full_array);			
		    $cnt_all_rows=count($search_data);
			dump($this->db->last_query());
        	
		if(!empty($results)&& is_array($results))
		{
			$this->_page_data['stop_refill'] = $results['rows'];
			$this->_page_data['num_results'] = $cnt_all_rows;
		}
		else
		{
			$results='';
		}
		$this->_page_data['offset'] = $offset;
			/// pagination
			$this->load->library('pagination');
			$config = array();
			$config['base_url'] = site_url("gc/refill_track/list_stop_refill/$query_id/$sort_by/$sort_order");
			$config['total_rows'] = $this->_page_data['num_results'];
			$config['per_page'] = $limit;
			$config['uri_segment'] = 7;
			$config['full_tag_open'] = '<span class=\'paging\'>';
			$config['full_tag_close'] = '</span>';
			$config['first_link'] = 'First';
			$config['prev_link'] = '<<';
			$config['next_link'] = '>>';
			$config['last_link'] = 'Last';
			$this->pagination->initialize($config);
			
			$this->_page_data['pagination'] = $this->pagination->create_links();
			$this->_page_data['sort_by'] = $sort_by;
			$this->_page_data['sort_order'] = $sort_order;
			$this->_page_data['customer_id'] = $customer_id;
			$this->_page_data['dispenser_id'] = $dispenser_id;
			//$data['purpose'] = $purpose;
			$this->_page_data['query_id'] = $query_id;

			$this->load->view('gc/stop_refill_list.php',$this->_page_data);
      // }	
      // else{

      // 	$this->session->set_flashdata('msg','Invalid Tracking Number');
      // 	redirect('gc/refill_track/manage_refill_track');
      // }
    
	
	}
	function stop_refill_data($dispenser_refill_details_id)
	{
	
		 if($dispenser_refill_details_id){
		 	$purpose='Refill Sales Manage';
		 	$this->_page_data['tb_heading']='Stop Refill';
		 }
			
				
		$dispenser_refill_details_id = $this->encrypt->decode(($dispenser_refill_details_id));
		// //$dues_day = $this->encrypt->decode(($dues_day));
		
		$cond=array();		
		$cond[]=array('where','dispenser_refill_details_id',$dispenser_refill_details_id);
		//$cond[]=array('where','dispenser_sales_id',$dispenser_sales_id);
		$cond[]=array('join',TABLE_DISPENSER_SALES.' as A','A.dispenser_sales_id=F.dispenser_sales_id','left');	
		$cond[]=array('join',TABLE_CUSTOMER.' as C','A.customer_id=C.customer_id','left');
		$cond[]=array('join',TABLE_COMPANY_BRANCH.' as D','A.company_branch_id=D.company_branch_id','left');		
		$cond[]=array('join',TABLE_PRODUCT.' as B','F.product_id=B.product_id','left');		
		$cond[]=array('join',TABLE_USERS.' as E','A.sales_person_id=E.user_id','left');		
		$cond[]=array('join',TABLE_PRODUCT.' as G','A.product_id=G.product_id','left');		
			
		$company_array=array(
							'table_name'=>TABLE_DISPENSER_REFILL_DETAILS." as F",
							'table_fields'=>'A.company_branch_id,A.customer_id,E.first_name,E.last_name, A.dispenser_quantity,A.installation_date,C.customer_name, D.company_branch_name, B.product_name ,B.stock_quantity, B.product_prefix,A.product_id,F.tracking_numbers,F.duration_days,F.quantity ,F.refill_date,F.next_refill_date,F.refill_location,F.product_id as refill_id,F.dispenser_refill_details_id,A.dispenser_sales_id,G.product_name as dispenser_name',
							'condition'=>$cond,
							'sort_by' => 'dispenser_sales_id', 
							'limit'=>'',
							'offset'=>''
							);											
		$company_data=$this->master_model->select_data($company_array);
		$company_cnt_data=count($company_data);
		// //dump($this->db->last_query());
		
		if($company_cnt_data >0){
			$this->_page_data['sales_person_name']= isset($company_data[0]['sales_person_name']) && !empty($company_data[0]['sales_person_name']) ? $company_data[0]['sales_person_name'] :'';
			$this->_page_data['company_name']= isset($company_data[0]['company_name']) && !empty($company_data[0]['company_name']) ? $company_data[0]['company_name'] :'';
			$this->_page_data['first_name']= isset($company_data[0]['first_name']) && !empty($company_data[0]['first_name']) ? $company_data[0]['first_name'] :'';
			$this->_page_data['last_name']= isset($company_data[0]['last_name']) && !empty($company_data[0]['last_name']) ? $company_data[0]['last_name'] :'';
			$this->_page_data['dispenser_quantity']= isset($company_data[0]['dispenser_quantity']) && !empty($company_data[0]['dispenser_quantity']) ? $company_data[0]['dispenser_quantity'] :'';
			$this->_page_data['installation_date']= isset($company_data[0]['installation_date']) && !empty($company_data[0]['installation_date']) ? $company_data[0]['installation_date'] :'';
			$this->_page_data['product_name']= isset($company_data[0]['product_name']) && !empty($company_data[0]['product_name']) ? $company_data[0]['product_name'] :'';
			$this->_page_data['product_prefix']= isset($company_data[0]['product_prefix']) && !empty($company_data[0]['product_prefix']) ? $company_data[0]['product_prefix'] :'';
			$this->_page_data['stock_quantity']= isset($company_data[0]['stock_quantity']) && !empty($company_data[0]['stock_quantity']) ? $company_data[0]['stock_quantity'] :'';
			$this->_page_data['customer_id']= isset($company_data[0]['customer_id']) && !empty($company_data[0]['customer_id']) ? $company_data[0]['customer_id'] :'';
			$this->_page_data['company_branch_id']= isset($company_data[0]['company_branch_id']) && !empty($company_data[0]['company_branch_id']) ? $company_data[0]['company_branch_id'] :'';
			$product_id= isset($company_data[0]['product_id']) && !empty($company_data[0]['product_id']) ? $company_data[0]['product_id'] :'';
			$this->_page_data['customer_name']= isset($company_data[0]['customer_name']) && !empty($company_data[0]['customer_name']) ? $company_data[0]['customer_name'] :'';$this->_page_data['company_branch_name']= isset($company_data[0]['company_branch_name']) && !empty($company_data[0]['company_branch_name']) ? $company_data[0]['company_branch_name'] :'';
			
			$tracking_numbers= isset($company_data[0]['tracking_numbers']) && !empty($company_data[0]['tracking_numbers']) ? $company_data[0]['tracking_numbers'] :'';
			$this->_page_data['duration_days']= isset($company_data[0]['duration_days']) && !empty($company_data[0]['duration_days']) ? $company_data[0]['duration_days'] :'';
			$this->_page_data['quantity']= isset($company_data[0]['quantity']) && !empty($company_data[0]['quantity']) ? $company_data[0]['quantity'] :'';
			$this->_page_data['refill_date']= isset($company_data[0]['refill_date']) && !empty($company_data[0]['refill_date']) ? $company_data[0]['refill_date'] :'';
			$this->_page_data['next_refill_date']= isset($company_data[0]['next_refill_date']) && !empty($company_data[0]['next_refill_date']) ? $company_data[0]['next_refill_date'] :'';
			$this->_page_data['refill_location']= isset($company_data[0]['refill_location']) && !empty($company_data[0]['refill_location']) ? $company_data[0]['refill_location'] :'';
			$this->_page_data['refill_id']= isset($company_data[0]['refill_id']) && !empty($company_data[0]['refill_id']) ? $company_data[0]['refill_id'] :'';
			$this->_page_data['dispenser_name']= isset($company_data[0]['dispenser_name']) && !empty($company_data[0]['dispenser_name']) ? $company_data[0]['dispenser_name'] :'';
			$dispenser_sales_id= isset($company_data[0]['dispenser_sales_id']) && !empty($company_data[0]['dispenser_sales_id']) ? $company_data[0]['dispenser_sales_id'] :'';
		}
		
		
		
		$refill_cond = array();
		$refill_cond[] = array('where','is_active','1');
		$refill_cond[] = array('where','product_type','refill');
		$select_array = array(
								'table_name'=>TABLE_PRODUCT,
								'table_fields'=>'product_name,product_id',
								'condition'=>$refill_cond,
								'sort_by'=>'product_id',
								'order_by_field'=>'product_name',
								'order'=>'ASC',
								'limit'=>'',
								'offset'=>''
								);
		$refill_data=$this->master_model->select_data($select_array);
		$refill_cnt_data=count($refill_data);
		$this->_page_data['refill_array'] = '';
		if($refill_cnt_data > 0)
		{
			foreach($refill_data as $cKey => $cValue)
			{
				$this->_page_data['refill_array'][''] = 'Select Refill Name';
				$this->_page_data['refill_array'][$cValue['product_id']] = $cValue['product_name'];
			}
		}
		
		$tracking_numbers_arr = explode(',', $tracking_numbers);
		$tracking_cond = array();		 
		$tracking_cond[] = array('where_in','tracking_numbers_id',$tracking_numbers_arr);
		$select_array = array(
								'table_name'=>TABLE_TRACKING_NUMBERS,
								'table_fields'=>'group_concat(tracking_number) as tracking_numbers',
								'condition'=>$tracking_cond,
								'sort_by'=>'tracking_numbers_id',
								'order_by_field'=>'tracking_number',
								'order'=>'ASC',
								'limit'=>'',
								'offset'=>''
								);
		$tracking_data=$this->master_model->select_data($select_array);
		
		$tracking_cnt_data=count($tracking_data);
		$this->_page_data['tracking_array'] = '';
		if($tracking_cnt_data > 0)
		{
			$this->_page_data['tracking_numbers_name']= isset($tracking_data[0]['tracking_numbers']) && !empty($tracking_data[0]['tracking_numbers']) ? $tracking_data[0]['tracking_numbers'] :'';
		}
		
		$this->_page_data['purpose']=$purpose;
		$this->_page_data['tracking_numbers']=$tracking_numbers;
		$this->_page_data['dispenser_sales_id']=$dispenser_sales_id;
		$this->_page_data['dispenser_refill_details_id']=$dispenser_refill_details_id;
		$this->_page_data['page_title']=$purpose;
		$this->_page_data['bredcrum']=array(
										'Tracking History'=>'#',
										'Stop Refill'=>'#',
										'List of Refills'=>site_url('gc/refill_track/manage_stop_refill'),
										'Refill Details'=>'#',
										);
		$this->_page_data['form_action'] = 'gc/refill_track/submit_stop_refill_details';
		//$this->_page_data['dues_day']=$dues_day;
					
		$this->load->view('gc/stop_refill_details.php',$this->_page_data);
		
	}
	function submit_stop_refill_details(){
		 $refill_comments= check_injections_filter($this->input->post('refill_comments')); 
		 $stop= check_injections_filter($this->input->post('stop')); 
		 $dispenser_refill_details_id= check_injections_filter($this->input->post('dispenser_refill_details_id'));
		

		$cond[] = array('where','dispenser_refill_details_id',$dispenser_refill_details_id);
		$select_array = array(
								'table_name'=>TABLE_DISPENSER_REFILL_DETAILS,
								'table_fields'=>'dispenser_sales_id,tracking_numbers,product_id,duration_days,quantity,refill_date,next_refill_date,is_damaged,stop_refill,next_has_been_refilled,refill_location,comments,is_active,old_enduser_refill_transaction_id',
								'condition'=>$cond,
								'sort_by'=>'dispenser_sales_id',
								'order_by_field'=>'',
								'order'=>'ASC',
								'limit'=>'',
								'offset'=>''
								);
		$refill_data['refill_data']=$this->master_model->select_data($select_array);
		foreach ($refill_data['refill_data'] as  $value) {
			$dispenser_sales_id=$value['dispenser_sales_id'];
			$tracking_numbers=$value['tracking_numbers'];
			$product_id=$value['product_id'];
			$duration_days=$value['duration_days'];
			$quantity=$value['quantity'];
			$refill_date=$value['refill_date'];
			$next_refill_date=$value['next_refill_date'];
			$is_damaged=$value['is_damaged'];
			$stop_refill=$value['stop_refill'];
			$next_has_been_refilled=$value['next_has_been_refilled'];
			$refill_location=$value['refill_location'];
			$is_active=$value['is_active'];
			$old_enduser_refill_transaction_id=$value['old_enduser_refill_transaction_id'];
		}

		    $insert_array=array(

		    			'dispenser_sales_id'=>$dispenser_sales_id,
		    			'tracking_numbers'=>$tracking_numbers,
		    			'product_id'=>$product_id,
		    			'duration_days'=>$duration_days,
		    			'quantity'=>$quantity,
		    			'refill_date'=>$refill_date,
		    			'next_refill_date'=>$next_refill_date,
		    			'is_damaged'=>$is_damaged,
		    			'stop_refill'=>$stop,
		    			'next_has_been_refilled'=>$next_has_been_refilled,
		    			'refill_location'=>$refill_location,
		    			'comments'=>$refill_comments,
		    			'created_on' => date("Y-m-d H:i:s"),
		    			'old_enduser_refill_transaction_id'=>$old_enduser_refill_transaction_id


		    );
		 $this->master_model->insert_record(TABLE_DISPENSER_REFILL_DETAILS,$insert_array);
		 $this->session->set_flashdata('message','Refill has been stoped successfully');
		 redirect('gc/refill_track/list_stop_refill');
			}
}