<script src="assets/js/king-table.js"></script>
<div class="row">
<div class="QuotationPrint">
	<div class="col-md-12">
		<!-- WIDGET TABLE -->
		
		<div class="widget widget-table">
			<div class="widget-header">
				<h3><i class="fa fa-user"></i> View Quotation Request Records</h3>
				<div class="btn-group widget-header-toolbar">
				<?php if($data['create']=='1'): ?>
					<a class="btn-borderless btn-focus clickme" href="QuotationRequestCreate" title="Focus" ><i class="fa fa-plus"></i></a>
				<?php endif; ?>
				</div>
			</div>
			<div class="widget-content">
				<table id="visit-stat-table"  class="table table-sorting table-striped table-hover table-bordered datatable">
					<thead>
						<tr>    
							<th>Quotation No.</th>
							<th>Quotation date</th>
							<th>Company</th>
							<th>Seller</th>										
							<th>Status</th>
							<th>Action</th>
						</tr>
					</thead>
					<tbody>
						<?php $__currentLoopData = $data['ViewQuotation']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $quotation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
						<tr>								
								<?php $date=$quotation->bil_date; $date1=explode('-',$date); $year=$date1[0]; $month=$date1[1];$dat=$date1[2];  $todates=$dat.'/'.$month.'/'.$year?>
								<td><?php echo e($quotation->bil_no); ?></td>
								<td><?php echo e($todates); ?></td>
								<td><?php echo e($quotation->cmp_name); ?></td>
								<td><?php echo e($quotation->cst_name); ?></td>
								<td><?php echo e($quotation->bil_status); ?></td>							
								<td>									
	<button class="btn btn-default btn-xs print" onclick="Openprint(<?php echo e($quotation->bil_no); ?>)">View</button>
								</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>
<script>
	$('.clickme').click(function(e)
	{
		e.preventDefault();
		$('#sideMenu').load($(this).attr('href'));
	});
	
	function Openprint(Billno)
	{
		$.ajax({
					url: 'QuotationPrint',
					type: 'get',
					data:'&Billno='+Billno,
					success: function(data)
					{
						$('.QuotationPrint').html(data)
					}
			});	
	}
</script>