<?php
	include('common/header.php');
?>
<div class="row">
 <div class="col-md-12">

      <section class="panel panel-default">
        <!-- <header class="panel-heading bg-info lt font-bold">List City -->
     <!--  <ul class="nav nav-pills pull-right">
        <li class="bg-info lt"><a href="http://project.nityam.in/nityamhygiene/index.php/admin/client/manage_client"> + Add New Client</a></li>
        <li class="bg-info lt"><a href="http://project.nityam.in/nityamhygiene/index.php/admin/client/manage_client_n_location"> + Add New Client</a></li>
      </ul> -->
   <!--  </header> -->
        <div class="panel-body bs-example form-horizontal">
          <div class="table-responsive">
            <table id="example" class="table table-bordered" cellspacing="0" width="100%">
                <thead>
                            <tr>
                              <th class="text-center">Action</th>
                              <th class="text-center">Sr no</th>
                              <th class="text-center">Customer Name</th>
                              <th class="text-center">Dispenser Name</th>
                              <th class="text-center">Sale Type</th>
                              <th class="text-center">Branch Name</th>
                              <th class="text-center">Sale Person Name</th>
                              <th class="text-center">Refill Date</th>
                              <th class="text-center">Next Refill Date</th>
                              <th class="text-center">Tracking Number</th>
                             
                            </tr>   
                </thead>
      <tbody>

         <?php 
       $icnt=0;
     $count=count($return);
     if ($count>0) {
       foreach ($return as  $value) {
         // $user_id = $value['user_id'];
             $tracking_numbers_id= $value->tracking_numbers_id;
             $customer_name=$value->customer_name;
             $dispenser=$value->dispenser;
             $sales_type=$value->sales_type;
             $company_branch_name=$value->company_branch_name;
             $user_name=$value->first_name."".$value->last_name;
             $refill_date=$value->refill_date;
             $next_refill_date= $value->next_refill_date;
             $tracking_number=$value->tracking_number;
             $icnt++;
             $sr=$offset+$icnt;
       ?> 
                            
        <tr>
          <td><?php echo '<td><input type="checkbox" name="check_action[]" onclick="get_check_value();"value='.$tracking_numbers_id.'></td>';?></td>
          <td><?php echo $sr; ?></td>
          <td><?php echo $customer_name;?></td>
          <td><?php echo $dispenser;?></td>
          <td><?php echo $sales_type;?></td>
          <td><?php echo $company_branch_name;?></td>  
          <td><?php echo $user_name;?></td>
          <td><?php echo $refill_date;?></td>
          <td><?php echo $next_refill_date;?></td>
          <td><?php echo $tracking_number;?></td>    
          
        </tr> 
        <?php 
       }
      
         ?>
        </tbody>
            </table>
          </div>
             <?php
     if($num_results > 0) { ?>
      <div class="block"> </div>
        <div class="clearfix">
        <div class="row">
          <?php 
            if (strlen($pagination)): 
              $label_disp="dispensers";
              $data['label_disp']=$label_disp;
              $data['count']=$count;
              $this->load->view('pagination_view.php',$data);
            endif; ?>
        </div>
        </div>
        <div class="block"> </div>
      <?php }}else{?>
            <td class="text-center" colspan="12"> no data available</td>
      <?php }?>
        </div>
      </section>
 <input type="text" name="hidden_transfer" id="dispenser_sales_id">
		<div class="clearfix form-actions">
			<div class="col-md-offset-5 col-md-5">
				<button class="btn btn-info" type="button" onclick="javascript:window.location='<?php echo base_url();?>index.php/gc/dispenser_sale_data/transfer_dispenser_manage'">
					Back
				</button>
			</div>
		</div>
	</div>
</div>
<div>
	<!-- /.page-row -->
    <!-- /.page-content --> 
</div>
<!-- /.main-content --> 
</div>
<!-- /#ace-settings-container --> 
</div>
<!-- /.main-container-inner -->

<?php
	include('common/footer.php');
?>
<script>
  function get_check_value(){
    var fav = [];
    $("input[name='check_action[]']:checked").each(function(){
      $('#pc').show();
       fav.push($(this).val());

    });
    document.getElementById("dispenser_sales_id").value = fav;
    // console.log(fav);
  }
</script>