<?php require_once('header.php'); ?>
<?php if($allPermissions['pickupentry']['create']=="1"){ ?>
<section class="content-header">
	<div class="content-header-left">
		<h1>Pickup Entry Bulk Upload</h1>
	</div>
	<div class="content-header-right" style="margin-right: 1%;">
		<a href="excel/create_pickup_entry.php?client_id=<?php echo $clientId; ?>&client_type=<?=$clientType?>" target="_blank" class="btn btn-danger btn-sm">Download Sample File Format </a>&emsp;&emsp;&emsp;<a href="delivery.php" class="btn btn-danger btn-sm">List All</a>
	</div>
	<div class="content-header-right" style="margin-right: 1%;">
		
	</div>
</section>

<section class="content">
	<div class="row">
		<div class="col-md-12">

			<?php if($error_message): ?>
			<div class="callout callout-danger">
				<p>
					<?php echo $error_message; ?>
				</p>
			</div>
			<?php endif; ?>

			<?php if($success_message): ?>
			<div class="callout callout-success">
				<p><?php echo $success_message; ?></p>
			</div>
			<?php endif; ?>

			<form class="form-horizontal" action="pickup-entry-bulk-upload-status.php" method="post" enctype="multipart/form-data">
				<div class="box box-info">
					<div class="box-body">
					    <?php if($clientType=="Admin"){ ?>
					    
					    
					     <div class="form-group">
							<label for="" class="col-sm-3 control-label">Select Courier<span>*</span></label>
							<div class="col-sm-6" style="padding-top:5px">
								<select class="form-control" name="courier_id" id="courier_id" required>
							       <!--<option>Select Courier</option>-->
							         <?php
									$statement = $pdo->prepare("SELECT * FROM `courier_company`");
									$statement->execute();
									$result = $statement->fetchAll(PDO::FETCH_ASSOC);	
									foreach ($result as $row) {
										?>
										<option value="<?php echo $row['id']; ?>"><?php echo $row['company_name']; ?></option>
										<?php
									}
									?>
							    </select>
							</div>
						</div>
						
						
						<?php }  ?>
						
						
					    <div class="form-group">
							<label for="" class="col-sm-3 control-label">Select Client Name <span>*</span></label>
							<div class="col-sm-6" style="padding-top:5px">
								 <select name="client_id" id="client_id" class="form-control" required>
							       <?php if($clientType=="Admin"){ ?>
							        <!--<option>--Select Client--</option>-->
							        <?php
							        	$statement = $pdo->prepare("SELECT * FROM tbl_user where (role='client' or role='Modicare') and delete_status!=1");
							         }
							         else{
							        	$statement = $pdo->prepare("SELECT * FROM tbl_user where id=$clientId");
							         }
            							$statement->execute();
            							$result = $statement->fetchAll(PDO::FETCH_ASSOC);
            						 foreach($result as $rows)
            						 {?>
            						     <option value="<?php echo $rows['id']; ?>"><?php echo $rows['full_name']; ?></option>
            						<?php }      ?>
							    </select>
							</div>
						</div>
					    
						<div class="form-group">
							<label for="" class="col-sm-3 control-label">Pickup Entry Bulk Upload <span>*</span></label>
							<div class="col-sm-4" style="padding-top:5px">
								<input type="file" name="file" class="form-control" accept=".csv" required>(Only csv Format)
							</div>
						</div>
						
						
						<div class="form-group">
							<label for="" class="col-sm-3 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 class="box box-info">
		<div class="box-body">
		<center><h4 style="color:red;">Pickup Entry Bulk Upload Terms And Conditions</h4></center>
		<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.If you have more than (multiple values) one value for hsncode or any other columns. Then please add any one from that value. Don't add <b>763873/837837</b> like that.<br>
		5.For quantity,all weights,discount,No.of Boxes it only accepts numerical values, Don't add <b>kg,ton or boxes etc...</b>.</h5>
		
		<center><table border="1px">
		    <tr>
		        <th width="25%" style="text-align: center;">Upload Column</th>
		        <th width="25%"; style="text-align: center;">Description</th>
		        <th width="25%" style="text-align: center;">Key or Values</th>
		    </tr>
		    <tr>
		       <td style="text-align: center;">0.S.No <span style="font-size: 10px;color: #ea09e4;;">(Optional)</span></td>
		       <td style="text-align: center;">its for serial number. if you don't want ,leave it as empty </td>
		       <td style="text-align: center;">Ex : 1</td>
		    </tr> 
		    <tr>
		       <td style="text-align: center;">1.CSCS AWB <span style="font-size: 10px;color: #ea09e4;">(Optional)</span></td>
		       <td style="text-align: center;">Optional - if you don't have , leave it as empty.it will be automatically generated </td>
		       <td style="text-align: center;">Ex : 100054</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">2.3PL AWB <span style="font-size: 10px;color: #ea09e4;">(Optional)</span></td>
		       <td style="text-align: center;">Optional - if you don't have , leave it as empty </td>
		       <td style="text-align: center;">Ex : 1002554</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">3.Ref No <span style="font-size: 10px;color: red;">(Required)</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 1002554</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">4.Order Type <span style="font-size: 10px;color: red;">(Required)</span></td>
		       <td style="text-align: center;">COD<br>PREPAID</td>
		       <td style="text-align: center;">Ex : COD</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">5.Collectable Amount <span style="font-size: 10px;color: red;">(Required)</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex :200</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">6.Business Mode <span style="font-size: 10px;color: red;">(Required)</span></td>
		       <td style="text-align: center;">AIR<br>SURFACE</td>
		       <td style="text-align: center;">Ex : SURFACE</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">7.B2B/B2C <span style="font-size: 10px;color: red;">(Required)</span></td>
		       <td style="text-align: center;">B2B<br>B2C</td>
		       <td style="text-align: center;">Ex : B2C</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">8.Shipper Name <span style="font-size: 10px;color: #ea09e4;;">(Optional)</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : Ajay</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">9.Shipper Address <span style="font-size: 10px;color: #ea09e4;;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : xyz street, xyz.</td>
		    </tr>
		      <tr>
		       <td style="text-align: center;">10.Shipper City <span style="font-size: 10px;color: #ea09e4;;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : xyz.</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">11.Shipper State <span style="font-size: 10px;color: #ea09e4;;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : xyz.</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">12.Shipper Pincode <span style="font-size: 10px;color: #ea09e4;;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 777878.</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">13.Shipper Phone <span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 9876543210</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">14.Consignee Name <span style="font-size: 10px;color: red;">( Required )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : Ajay</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">15.Consignee Address <span style="font-size: 10px;color: red;">( Required )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : xyz street, xyz.</td>
		    </tr>
		      <tr>
		       <td style="text-align: center;">16.Consignee City <span style="font-size: 10px;color:  red;">( Required )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : xyz.</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">17.Consignee State <span style="font-size: 10px;color:  red;">( Required )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : xyz.</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">18.Consignee Pincode <span style="font-size: 10px;color:  red;">( Required )</span></td>
		       <td style="text-align: center;">Consignee Pincode is important for to make sure service is available for consignee location</td>
		       <td style="text-align: center;">Ex : 777878.</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">19.Consignee Phone <span style="font-size: 10px;color: red;">( Required )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 9876543210</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">20.Product Description<span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : Electronics</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">21.Quantity <span style="font-size: 10px;color: red;">(Required)</span></td>
		       <td style="text-align: center;">Only numeric value is accepted. don't add KG or Ton Or Boxes</td>
		       <td style="text-align: center;">Ex : 12.</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">22.Actual Weight <span style="font-size: 10px;color: red;">(Required)</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 12.</td>
		    </tr><tr>
		       <td style="text-align: center;">23.Volumetric Weight <span style="font-size: 10px;color: #ea09e4;">(Optional if you having length,breadth,height)</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 12.</td>
		    </tr><tr>
		       <td style="text-align: center;">24.Volumetric Length <span style="font-size: 10px;color: #ea09e4;">(Optional if you having Volumetric Weight)</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 12.</td>
		    </tr><tr>
		       <td style="text-align: center;">25.Volumetric Breadth<span style="font-size: 10px;color: #ea09e4;">(Optional if you having Volumetric Weight)</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 12.</td>
		    </tr><tr>
		       <td style="text-align: center;">26.Volumetric Height<span style="font-size: 10px;color: #ea09e4;">(Optional if you having Volumetric Weight)</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 12.</td>
		    </tr><tr>
		       <td style="text-align: center;">27.Charged Weight <span style="font-size: 10px;color: #ea09e4;">(Automatically Calculated)</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 12</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">28.Invoice Value <span style="font-size: 10px;color: red;">( required )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 7399</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">29.Taxable Value <span style="font-size: 10px;color: #ea09e4;">(Automatically Calculated)</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 839</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">30.HSN Code <span style="font-size: 10px;color: red;">( required )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 833889.</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">31.Discount <span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 38.</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">32.Gst Type <span style="font-size: 10px;color: red;">( required )</span></td>
		       <td style="text-align: center;">IGST<br>CGST</td>
		       <td style="text-align: center;">Ex : IGST</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">33.Gst Amount <span style="font-size: 10px;color: #ea09e4;">( Automatically Calculated )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 30</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">34.MRP <span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 30</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">35.Ewaybill <span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 30</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">36.Buyer Gst No <span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 123EX</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">37.Seller Gst No <span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 123EX</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">38.RTO Name <span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : Ajay</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">39.RTO Address <span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : xyz street, xyz.</td>
		    </tr>
		      <tr>
		       <td style="text-align: center;">40.RTO City <span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : xyz.</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">41.RTO State <span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : xyz.</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">42.RTO Pincode <span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 777878.</td>
		    </tr>
		     <tr>
		       <td style="text-align: center;">43.RTO Phone <span style="font-size: 10px;color: #ea09e4;">( Optional )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 9876543210</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">44.No.Of Boxes <span style="font-size: 10px;color: red;">( Required )</span></td>
		       <td style="text-align: center;"></td>
		       <td style="text-align: center;">Ex : 0</td>
		    </tr>
		    <tr>
		       <td style="text-align: center;">45.Pickup Entry Date <span style="font-size: 10px;color: red;">( Optional )</span></td>
		       <td style="text-align: center;">Date Format is important(dd-mm-yyyy)(Format should be 23-02-2055 OR 23-02-55)</td>
		       <td style="text-align: center;">Ex : 02-03-2020</td>
		    </tr>
		</table>
	
		</center>
			</div>
				</div>
		</div>
	</div>

</section>


<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">Delete Confirmation</h4>
            </div>
            <div class="modal-body">
                <p>Are you sure want to delete this item?</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                <a class="btn btn-danger btn-ok">Delete</a>
            </div>
        </div>
    </div>
</div>

<?php }else{ ?>
<center><h4 style="color:red;">You don't have permission to view this page </h4></center>
<?php } ?>
<?php require_once('footer.php'); ?>