<?php
	include('common/header.php');
?>
<div id="messages" style="color: green;"><h5><?php echo $this->session->flashdata('message'); ?></h5></div>
<div class="row">
	<div class="col-xs-12">
	<section class="panel panel-default">
        <header class="panel-heading bg-info lt font-bold">List Dispenser Sale Data
     
    </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>Sr No</th>
          <th>Customer  Name</th>
          <th>Branch Name</th>
          <th>Sales Person</th>         
          <th>Sales Date</th>
          <th>Dispenser Name</th>
          <th>Quantity</th>
          <th>Action</th>
        </tr> 
      </thead>
      <tbody>
        <?php 
       $srno=1;
       foreach ($dispenser as  $value) {
         $dispenser_sales_id=$value['dispenser_sales_id'];
       ?>     
        <tr>
          <td><?php echo $srno; ?></td>
          <td><?php echo $value['customer_name'];?></td>  
          <td><?php echo $value['company_branch_name'];?></td> 
          <td><?php echo $value['sales_person_name'];?></td>
          <td><?php echo $value['installation_date'];?></td>
          <td><?php echo $value['product_name'];?></td>
          <td><?php echo $value['dispenser_quantity'];?></td>
         <td>
            <b><a href="<?php echo base_url();?>index.php/gc/customer_master/view_customer_master/<?php echo $customer_id?>">View</a> | <a href="<?php echo base_url();?>index.php/gc/customer_master/manage_customer_master/<?php echo $customer_id ?>"> Edit |
             <?php if($value['is_active']==0) {?>
                 <a href="<?php echo base_url();?>index.php/gc/customer_master/enable_customer_master/<?php echo $customer_id ?>">Enable</a></b><?php }else{?>
                 <a href="<?php echo base_url();?>index.php/gc/customer_master/disable_customer_master/<?php echo $customer_id ?> " onclick="return confirm('Are you sure you want to Disable?')">Disable</a></b><?php } ?>

          </td>
        </tr> 
        <?php 
         $srno=$srno+1;
       }
         ?>
        
        </tbody>
            </table>
          </div>
        </div>
      </section>
		
		<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/manage_dispenser_sale_data'">
					Add Dispenser Sale Data
				</button>
			</div>
		</div>
	</div>
</div>
<div>
	<!-- /.page-row -->
    <!-- /.page-content --> 
</div>
<!-- /.main-content --> 
</div>
<!-- /#ace-settings-container --> 
</div>
<!-- /.main-container-inner -->
<script type="text/javascript" charset="utf-8">
  $(document).ready(function() {
    $('#example').DataTable();
  } );
</script>
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable( {
    destroy: true,
    searching: true,
    "order": [],
    "columnDefs": [
      { "orderable": false, "targets":  [3] }
      ]
  } );
});
</script>  
<?php
	include('common/footer.php');
?>