<?php require_once('header.php'); ?>
<?php if($session_id==1 || $allPermissions['transporter_details']['read']=="1"){ ?>
<section class="content-header">
    <div class='box-body' style="margin: 0px 0px;box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;background-color: white;">
    <div class="row">
		<div class="col-md-4" style="text-align: left;">
		    <input type="hidden" autocomplete="off" class="form-control" name="pincode" id='pincode'>
			<h4><i class="fa fa-list"></i>Transporter Details</h4>
		</div>
		<div class="col-md-8" style="text-align: right;"> 
		<?php if($session_id==1 || $allPermissions['transporter_details']['create']=="1"){ ?>
		    <a href="transporter-details-add.php" class="btn btn-success btn-sm" style="cursor: pointer;"><i class="fa fa-plus"></i> Create Transporter DETAILS</a>
		<?php } ?>
		</div>
	</div> 
    </div>
</section>
<section class="content-header">
    <div class='box-body' style="margin: 0px 0px;box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;background-color: white;">
				<div class="box-body table-responsive">
				<table id="employee-grid"  class="table table-bordered table-striped">
						<thead style="color:gray;">
							<tr>
							    <th  data-sortable= false>S.No</th>
								<th data-sortable= false> Action</th>
								<th >Transporter Name</th>
								<th >Mobile No</th>
								<th >vechile No</th>
								<th>Date</th>
								<th>Advance Percentage (%)</th>
								<th>Status</th>
							</tr>
						</thead>
						
					</table>
				</div>
				 
    <br>
     <div class="content-footer-center" style="text-align:left;" hidden>
		<button class="btn btn-success btn-sm" onclick="redirectTo();"><i class="fa fa-print"></i>Print FTL DETAILS</button>
		<button class="btn btn-warning btn-sm" onclick="redirectTolable();" style="display:none;"><i class="fa fa-print"></i> Print Label</button>
		
		
		<button class="btn btn-danger btn-sm" id="btn_delete_shipments" style="display:none;"><i class="fa fa-trash-o" ></i> Delete Pickup Entry</button>
	</div>
   
    </div>
   
</section>

<script>
$(document).ready(function() {
    getData();
});

function getData()
{
   
    var dataTable = $('#employee-grid').DataTable( {
    	"processing": true,
    	"serverSide": true,
    	"bDestroy": true,
    	"aaSorting":[[0,'desc']],
    	"ajax":{
    		url :"data-tables/transporter-details-dt.php", 
    		data: {ftl_details:1},
    		type: "post",
    		error: function(){  
    			$(".employee-grid-error").html("");
    			$("#employee-grid").append('<tbody class="employee-grid-error"><tr><th colspan="3">No data found in the server</th></tr></tbody>');
    			$("#employee-grid_processing").css("display","none");
    		}
    	}
    });
}


</script>


	
    <?php } ?>
<?php require_once('footer.php'); ?>