<script src="assets/js/king-table.js"></script>
<!-- END WIDGET MAIN CHART WITH TABBED CONTENT -->
<div class="Editseller">
	<div class="row">
		<div class="col-md-12">
			<!-- WIDGET TABLE -->
			<div class="widget widget-table">
				<div class="widget-header">
					<h3><i class="fa fa-user"></i> View Customer Records</h3>
					<div class="btn-group widget-header-toolbar">
						<?php if($data['create']=='1'): ?>
						<a class="btn-borderless btn-focus clickme" href="WBCustomercreate" title="Focus" ><i class="fa fa-plus"></i></a>
						<?php endif; ?>
					</div>
				</div>
				<div class="widget-content">
					<table id="datatable-data-export" class="table table-sorting table-striped table-hover table-bordered datatable">
						<thead>
							<tr>
								<th>SL No.</th>
								<th>Sequence No.</th>
								<th>Customer Name</th>
								<th>Contact</th>
								<th>Tariff detail</th>
								<th>Meter No.</th>
								<th>Block</th>
								<th>Ward</th>
								<th>Area</th>
								<th>Note</th>
								<th>Status</th>
								<th>Connection Date</th>
								<th>Last Meter Reading Date</th>
								<th>Last Meter Reading Unit</th>
								<th>Previous Balance</th>
								<?php 
									/*
									if($data['edit']=='1' || $data['delete']=='1'){echo'<th>Action</th>';}
									*/
								?>
							</tr>
						</thead>
						<tbody>
							<?php
							$slno=1;
							?>
							<?php $__currentLoopData = $data['cst_customer']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $custrec): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
							<tr>   
								<td><?php echo $slno++; ?></td>
								<td><?php echo e($custrec->cst_code); ?></td>
								<td><?php echo e($custrec->cst_name); ?></td>
								<td>
									<a href="#" data-toggle="popover" title="Contact Detail" data-content="House: <?php echo e($custrec->cst_housename); ?>, 
									Flat No. <?php echo e($custrec->cst_flatno); ?>, 
									<?php echo e($custrec->cst_address); ?>"><i class="fa fa-address-book-o" aria-hidden="true"></i></a>
									
									
									<a href="#" data-toggle="popover" title="Phone No." data-content="
									Mob. <?php echo e($custrec->cst_contact1); ?>,
									Ph. <?php echo e($custrec->cst_contact2); ?>"><i class="fa fa-phone-square" aria-hidden="true"></i></a>
									
									
									<a href="#" data-toggle="popover" title="Email ID" data-content="  <?php echo e($custrec->cst_email); ?>"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
								</td>
								<td><?php echo e($custrec->tarf_tarifftype); ?> 
								<?php
								/*
									<a href="#" data-toggle="popover" title="Tariff Charge" data-content="  {{$custrec->cst_email}}"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
								*/
								?>
									</td>
								<td><?php echo e($custrec->cst_meterno); ?> <a href="#" data-toggle="popover" title="Meter Status" data-content="  <?php echo e($custrec->cst_meterstatus); ?>"><i class="fa fa-envelope-o" aria-hidden="true"></i></a></td>
								<td><?php echo e($custrec->blok_name); ?></td>
								<td><?php echo e($custrec->ward_name); ?></td>
								<td><?php echo e($custrec->area_name); ?></td>
								<td>
									<a href="#" data-toggle="popover" title="Note" data-content="<?php echo e($custrec->cst_note); ?>"><i class="fa fa-commenting" aria-hidden="true"></i></a></td>
								<td><?php echo e($custrec->cst_status); ?></td>								
								<td><?php echo e($custrec->cst_connectiondate); ?></td>	
								<td></td>	
								<td></td>
								<td></td>
								<?php 
								/*
									if($data['edit']=='1' || $data['delete']=='1'){ echo'<td>';}
								
								if($data['edit']=='1')
								{
									echo'<button class="btn btn-default btn-xs print" onclick="Editseller('.$custrec->cst_id.')">Edit</button>'; 
								} 
								if($data['delete']=='1')
								{
									echo' <button class="btn btn-default btn-xs print" onclick="Deleteseller('.$custrec->cst_id.')">Delete</button>';
								}
								if($data['edit']=='1' || $data['delete']=='1'){ echo '</td>';}
								*/
							?>
							</tr>
							<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>											
						</tbody>
					</table>
					</div>
			</div>
			<!-- END WIDGET TABLE -->
			<!-- WIDGET DONUT AND PIE CHART -->
			
			<!-- END WIDGET INLINE SPARKLINE -->
		</div>
	</div>
</div>
<script>
	$('.clickme').click(function(e)
	{
		e.preventDefault();
		$('#sideMenu').load($(this).attr('href'));
	});
	function Editseller(editsell)
	{
		$.ajax({
			url: 'WBCustomercreate',
			type: 'get',
			data:'&cst_id='+editsell,
			success: function(data)
			{
				$('.Editseller').html(data);
			}
		});
	}
	
	function Deleteseller(deletesell)
	{
		if (confirm("Are you sure delete!") == true)
		{
			$.ajax({
				url: 'DeleteCustomer',
				type: 'get',
				data:'&cst_id='+deletesell,
				success: function(data)
				{
					$('#sideMenu').load('customerView');
				}
			});
		}
	}
	</script>
<script>
$(document).ready(function(){
    $('[data-toggle="popover"]').popover(); 
});
</script>	