<?php require_once('header.php'); ?>

<?php if(($session_id ==1 || $allPermissions['booking_bulk_upload']['read']=="1") ){ ?>
<section class="content">
 <div class="row">
		<div class="col-md-5" style="text-align: left;">
			<h4><i class="fa fa-upload"></i> Booking Entry Bulk Upload</h4>
		</div>
		<div class="col-md-7" style="text-align: right;">
		  <?php if($session_id ==1 || $allPermissions['booking_bulk_upload']['create']=="1"){ ?>
		    <a href="shipment-create.php" class="btn btn-success btn-sm"><i class="fa fa-plus"></i> Create New Booking</a>
		  <?php } ?>
		    <a href="excel/booking_entry.php" class="btn btn-info btn-sm"><i class="fa fa-upload"></i> Download Bulk Upload Sheet</a>
		  <?php if($session_id ==1 || $allPermissions['booking_bulk_upload']['read']=="1"){ ?>
		    <a href="booking-list.php" class="btn btn-danger btn-sm"><i class="fa fa-arrow-left"></i> Back to Booking List</a>
		  <?php } ?>
		</div>
	</div>
	<div class="row">
	    <div class="col-md-2"></div>
		<div class="col-md-8">
			<form class="form-horizontal" action="booking-bulk-upload-status.php" method="post" enctype="multipart/form-data">
				<div >
					<div class="box-body">
					    
					    
					    <div class="form-group">
							<label for="" class="col-sm-4 control-label">Select Client  <span>*</span></label>
							<div class="col-sm-6" style="padding-top:5px">
								<select name="new_client" id="new_client" class="form-control select2">
									<?php
									if($UserType==1){
									    $conds="";
									}else{
									    $conds=" and id in ($session_client_ids)";
									}
									$statement = $pdo->prepare("SELECT * FROM `tbl_client_new` WHERE 1=1 and status=1 $conds");
                                    $statement->execute();
                                    $client_result = $statement->fetchAll(PDO::FETCH_ASSOC);
                                    foreach($client_result as $cr){ ?>
                                        <option value="<?=$cr['id']?>"><?=$cr['name']?></option>
                                   <?php } ?>
									
							    </select>
							</div>
						</div>
					    
						<div class="form-group">
							<label for="" class="col-sm-4 control-label">Bulk Upload Sheet <span>*</span></label>
							<div class="col-sm-8" style="padding-top:5px">
								<input type="file" name="file" accept=".csv" required style="border:1px solid #dcdcdc;padding:7px;min-width:74%;background:#fff">(Only CSV Format)
							</div>
						</div>
						<div class="form-group">
							<label for="" class="col-sm-2 control-label"></label>
							<div class="col-sm-6">
								<button type="submit" class="btn btn-success pull-left" name="Import">Submit</button>
							</div>
						</div>
					</div>
				</div>
			</form>
			
		</div>
		<div class="col-md-12">
		    <center>
			    	<h4 style="color:green;"><i class="fa fa-upload"></i> Booking Entry Bulk Upload Column's Instruction</h4>
			 	</center> 
		
		
			 	<div class="col-md-2"></div><div class="col-md-6">
			 	    
			 	    <h4  style="color:red;">Important Notes:</h4>
		<h5>1.In pickup Entry, The columns which is denoted as <b>Required</b> must have a data, without data.bulkupload won't work.<br>
		 2.If the data is empty, then leave that data as empty. Don't add keyword like <b>NA, NULL, Not Available</b>.<br>
		3.If the data is numeric value. then add enter a digit value. Don't add <b>24+1, 55+1</b> like that.<br>
		4.For quantity,all weights,No.of Boxes it only accepts numerical values, Don't add <b>kg,ton or boxes etc...</b>.<br>
		5.<b>COURIER NAME</b> and <b>SHIPPER NAME</b> should be  already added only taken else showing error</h5>
			 	    
		 	     <b>
		    	    1. S.NO - <span style='color:green;'>(Optional)</span><br>
		    	    2. COURIER ID - <span style='color:green;'>(Optional)</span><br>
		    	    3. BOOKING DATE - <span style='color:red;'>* Required</span><br>
		    	    4. EXPIRY DATE - <span style='color:red;'>* Required</span><br>
		    	    5. AWB NO - <span style='color:red;'>* Required</span><br>
		    	    6. SHIPPER ID - <span style='color:red;'>* Required</span><br>
		    	    7. CONSIGNEE NAME - <span style='color:red;'>* Required</span><br>
		    	    8. ORIGIN CITY - <span style='color:red;'>* Required</span><br>
		    	    9. DESTINATION CITY - <span style='color:red;'>* Required</span><br>
		    	    10. DESTINATION STATE - <span style='color:red;'>* Required</span><br>
		    	    11.DESTINATION PINCODE - <span style='color:red;'>* Required</span><br>
		    	    12.DIMENTION NO OF BOX - <span style='color:red;'>* Required</span><br>
		    	    13.DIMENTION ACTUAL WEIGHT - <span style='color:red;'>* Required</span><br>
		    	    14.LENGHT - <span style='color:red;'>* Required</span><br>
		    	    15.WIDTH - <span style='color:red;'>* Required</span><br>
		    	    16.HEIGHT - <span style='color:red;'>* Required</span><br>
		    	    17.TOTAL NO OF BOX - <span style='color:red;'>* Required</span><br>
		    	    18.CHARGED WEIGHT - <span style='color:red;'>* Required</span><br>
		    	    19.INVOICE VALUE - <span style='color:red;'>* Required</span><br>
		    	    20.INVOICE DATE - MUST BE IN (YYYY-MM-DD) - <span style='color:red;'>* Required</span><br>
		    	    21.TRANSPORT MODE - <span style='color:red;'>* Required</span><br>
		    	    22.QTY - <span style='color:red;'>* Required</span><br>
		    	    23.DESTINATION STATE - <span style='color:red;'>* Required</span><br>
		    	    24.SC CODE - <span style='color:red;'>* Required</span><br>
		    	    25.REF NO - <span style='color:red;'>* Required</span><br>
		    	  
		    	</b>
		</div>
		</div>
	</div>

</section>

<?php }else{ 
    //echo $page_not_access;
    echo '<center style="margin-top:20%;"><b>..coming soon...</b></center>';} ?>
<?php require_once('footer.php'); ?>