<!-- END WIDGET MAIN CHART WITH TABBED CONTENT -->
<div class="Editseller">
	<script src="assets/js/king-table.js"></script>
	<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 Seller Records</h3>
					<div class="btn-group widget-header-toolbar">
						@if($data['create']=='1')
						<a class="btn-borderless btn-focus clickme" href="Sellercreate" title="Focus" ><i class="fa fa-plus"></i></a>
						@endif
					</div>
					<!--<div class="btn-group widget-header-toolbar">
						<div class="control-inline toolbar-item-group">
						<span class="control-title">New Visits:</span>
						<div class="label label-success"><i class="fa fa-caret-up"></i> 3.5%</div>
						</div>
					</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>Company</th>
								<th>Seller type</th>
								<th>Name</th>
								<th>Contact Detail</th>
								<th>Bank detail.</th>
								<th>Status</th>
								<?php if($data['edit']=='1' || $data['delete']=='1'){echo'<th>Action</th>';}?>
							</tr>
						</thead>
						<tbody>
							@foreach($data['cst_customer'] as $custrec)
							<tr>
								<td>{{$custrec->cmp_name}}</td>
								<td>{{$custrec->cst_type}}</td>
								<td>{{$custrec->cst_name}}</td>
								<td>
									{{$custrec->cst_address}}, {{$custrec->cst_city}}, {{$custrec->cst_state}}, {{$custrec->cst_country}}
									<br>Ph. No.{{$custrec->cst_contact1}}, {{$custrec->cst_contact2}}
									<br>Email ID. {{$custrec->cst_email}}
								<br>Website.{{$custrec->cst_www}}</td>
								<td>{{$custrec->cst_bankdetail}}</td>
								<td>{{$custrec->cst_status}}</td>
								
								<?php if($data['edit']=='1' || $data['delete']=='1'){ echo'<td>';}?>	
								
								<?php 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>';} echo '</td>';?>
							</tr>
							@endforeach											
						</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: 'Editseller',
			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('SellerView');
				}
			});
		}
	}
	</script>	