<!-- <style type="text/css">
    .fixed_header{
		width:100%;
		table-layout: fixed;
		border-collapse: collapse;
	}
	.fixed_header tbody{
	display:block;
	width: 100%;
	overflow: auto;
	height: 100px;
	}

	.fixed_header thead tr {
	display: block;
	}

	.fixed_header thead th, .fixed_header tbody td {
	padding: 5px;
	text-align: left;
	width:7.5%;
	}
   
</style> -->

<div class="col-lg-12">
    <section class="panel">
		<header class="panel-heading" style="min-height:0">

			<div class="col-md-12 " sty>
				<form class="form-horizontal"method="post" action="<?php echo base_url();?>reports_ctrl/get_download_reports">
					<input type="hidden" name="view_type_val" value="<?php echo $view_type_val;?>">
					<input type="hidden" name="s_type" value="<?php echo $s_type;?>">
					<input type="hidden" name="cl_id" value="<?php echo $cl_id;?>">
					<input type="hidden" name="com_id" value="<?php echo $com_id;?>">
					<input type="hidden" name="ml_id" value="<?php echo $ml_id;?>">
					<input type="hidden" name="tl_id" value="<?php echo $tl_id;?>">
					<input type="hidden" name="token" value="<?php echo $token;?>">
					<input type="hidden" name="w_b_token" value="<?php echo $w_b_token;?>">
					<input type="hidden" name="f_date" value="<?php echo $f_date;?>">
					<input type="hidden" name="t_date" value="<?php echo $t_date;?>">
					
					<button type="submit" class="btn btn-danger pull-right" style=" margin-top: -28px;">Download</button>
				
			
				</form>
			</div>
		</header>
        
        <div class="panel-body">
            <section id="unseen">
				<div style="overflow-x:auto; height:500px">
					<table class="table table-bordered table-striped table-condensed fixed_header">
	
						<!-- <table id="dtVerticalScrollExample" class="table table-striped table-bordered table-sm"> -->
						<thead id="myHeader">
							<tr>
								<?php
									$list_view_type='';
									$desti_type = '';
									if($token!='' || $w_b_token!='' ){
										foreach($lul_re_list as $lul_re_row1){
											$list_view_type = $lul_re_row1['type'];
											if($lul_re_row1['type']=='Loading'){
												$desti_type="To";
											}else if($lul_re_row1['type']=='Unloading'){
												$desti_type="From";
											}
										}
									}
									if($token=='' || $w_b_token==''){
										$list_view_type = $s_type;
										if($s_type=='Loading'){
											$desti_type="To";
										}else if($s_type=='Unloading'){
											$desti_type="From";
										}
									}
								?>
								<!-- <th class="col-md-3">Type</th> -->
								<th class="col-md-3">Gate Entry Date</th>
								<th class="numeric col-md-3"> <?php echo $list_view_type;?> Date</th>
								<th class="col-md-3">Vehicle Exit Date</th>
								<th class="col-md-3">Gate Entry Token No</th>
								<th class="col-md-3">Weighbridge Ticket No</th>
								<th class="col-md-3">Customer</th>
								<th class="col-md-3">Transporter </th>
								<th class="col-md-3">Truck No</th>
								<th class="col-md-3">Trailor No</th>
								<th class="col-md-3">Destination <?php echo $desti_type;?></th>
								<th class="col-md-3">Customer DO No</th>
								<th class="col-md-3">DN Qty. in MT</th>
								<th class="col-md-3">Commodity</th>
								<th class="col-md-3">Material Name</th>
								<th class="col-md-3">Gross Weight</th>
								<th class="col-md-3">Tare Weight</th>
								<th class="col-md-3">Net Weight</th>
								<th class="col-md-3">No. of Bags</th>
								<th class="col-md-3">Remarks</th>
								<?php
									if($token!='' || $w_b_token!=''){
								?>
										<th class="col-md-3">Load By</th>
										<th class="col-md-3">Name</th>
										<th class="col-md-3">Bag Loaded</th>
										<th class="col-md-3">Bag Short</th>
										<th class="col-md-3">Kgs</th>

										<th class="col-md-3">Entered By</th>
										<th class="col-md-3">Authorized By</th>
										<th class="col-md-3">Loading By</th>
										<th class="col-md-3">Despatch By</th>
										<th class="col-md-3">Authorized Date - time</th>
										<th class="col-md-3">Entry Date - time</th>
										<th class="col-md-3">Entry Approve Date - time</th>
										<th class="col-md-3">Despatch Entry Date - time</th>
								<?php		
									}
								?>
							</tr>
						</thead>
						<tbody>
							<?php
								foreach($lul_re_list as $lul_re_key=>$lul_re_row){
							?>
									<tr>
										<!-- <td><?php echo $lul_re_row['type'];?></td> -->
										<td><?php echo $lul_re_row['Entry_Date'];?></td>
										<td><?php echo $lul_re_row['Loading_Date'];?></td>
										<td><?php echo $lul_re_row['Exit_Date'];?></td>
										<td><?php echo $lul_re_row['SLIP_NUMBER'];?></td>
										<td><?php echo $lul_re_row['w_bridge_no'];?></td>
										<td><?php echo $lul_re_row['cust_Name'];?></td>
										<td><?php echo $lul_re_row['Transporter_Name'];?></td>
										<td><?php echo $lul_re_row['Truck_No'];?></td>
										<td><?php echo $lul_re_row['trailer_no'];?></td>
										<td><?php echo $lul_re_row['desti_place'];?></td>
										<td><?php echo $lul_re_row['cust_code'];?></td>
										<td><?php echo $lul_re_row['qty_kgs'];?></td>
										<td><?php echo $lul_re_row['commodity_name'];?></td>
										<td>
											<?php
												foreach($lul_re_ml_list[$lul_re_key] as $r_row1){
													echo  $r_row1['ml_name'].' -'.$r_row1['luml_total_weight'].', <br> ';
												}
											?>
										</td>
										<td><?php echo $lul_re_row['gross_weight'];?></td>
										<td><?php echo $lul_re_row['tare_weight'];?></td>
										<td><?php echo $lul_re_row['net_weight'];?></td>
										<td><?php echo $lul_re_row['no_bags'];?></td>
										<td><?php echo $lul_re_row['remarks'];?></td>
										<?php
											if($token!='' || $w_b_token!=''){
										?>
												<td><?php echo $lul_re_row['lul_load_by'];?></td>
												<td><?php echo $lul_re_row['lul_l_name'];?></td>
												<td><?php echo $lul_re_row['lul_bag_loaded'];?></td>
												<td><?php echo $lul_re_row['lul_bag_short'];?></td>
												<td><?php echo $lul_re_row['lul_kgs'];?></td>

												<td><?php echo $lul_re_row['entered_by'];?></td>
												<td><?php echo $lul_re_row['authorize_by'];?></td>
												<td><?php echo $lul_re_row['loading_by'];?></td>
												<td><?php echo $lul_re_row['despatch_by'];?></td>
												<td><?php echo $lul_re_row['lul_a_o_date_time'];?> </td>
												<td><?php echo $lul_re_row['lul_e_o_date_time'];?> </td>
												<td><?php echo $lul_re_row['lul_leo_date_time'];?> </td>
												<td><?php echo $lul_re_row['lul_d_o_date_time'];?> </td>
										<?php		
											}
										?>

									</tr>
							<?php
								}
							?>
						</tbody>
					</table>
				</div>
            </section>
        </div>

    </section>
</div>