<?php include 'connection.php';
session_start();
if (!isset($_SESSION['is_logged_in'])) {
    header("Location:login.php");
    die();
    }
date_default_timezone_set('Asia/Calcutta');
$today = date("d/m/Y");
$today1 = date("d/m");
$currentmonth = date(m);

?>
<? include('sahavas_dropdown_function.php');?>

<?php 

$query = "select * from users where username = '". $_SESSION["LOGIN_NAME"]."' AND password = '".$_SESSION["EMPLOYEE_PASSWORD"]."'";
//echo $query;
		                 $result = mysql_query($query,$conn);
						 while($row=mysql_fetch_array($result))
	                                              	{
													  $staff_name = $row['full_name'];
													  $full_name = $row['full_name'];
													  $avatar = $row['avatar'];
													   $department_name = $row['department_name'];
													  $staff_id  = $row['id'];
													  $username = $row['username'];
													  $our_company = $row['our_company'];
													  $designation = $row['designation'];
													  $sales_group = $row['sales_group'];
													  $head = $row['head'];
													  $region = $row['region'];
													  $district = $row['district'];
													  $email = $row['email'];
													  $mobile_no = $row['mobile_no'];
													  $staff_id_self  = $row['id'];
													  $back_office_region=$row['back_office_region'];
													   	$back_office_login=$row['back_office_login'];

													  //echo $Branch;
													  }	
													   ?>	
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>THREESTAR - CRM</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.6 -->
  <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
  <!-- daterange picker -->
  <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker.css">
  <!-- bootstrap datepicker -->
  <link rel="stylesheet" href="plugins/datepicker/datepicker3.css">
  <!-- iCheck for checkboxes and radio inputs -->
  <link rel="stylesheet" href="plugins/iCheck/all.css">
  <!-- Bootstrap Color Picker -->
  <link rel="stylesheet" href="plugins/colorpicker/bootstrap-colorpicker.min.css">
  <!-- Bootstrap time Picker -->
  <link rel="stylesheet" href="plugins/timepicker/bootstrap-timepicker.min.css">
  <!-- Select2 -->
  <link rel="stylesheet" href="plugins/select2/select2.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">
 <link rel="stylesheet" href="public/css/default.css" type="text/css">
 <script src="jquery.min.js"></script>
<script src="jquery-ui.js"></script>

<link rel="stylesheet" href="jquery-ui.css">

<link rel="stylesheet" href="jquery-ui.css">
  <style>
  table {
  border: 1px solid #ccc;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
  table-layout: fixed;
}
table caption {
  font-size: 1.2em;
  margin: .5em 0 .75em;
}
table tr {
  
  border: 1px solid #ddd;
  padding: .35em;
}
table th,
table td {
  padding: .625em;
  
}
table th {
  font-size: .9em;
  letter-spacing: .0em;
  text-transform: uppercase;
}
@media screen and (max-width: 600px) {
  table {
    border: 0;
  }
  table caption {
    font-size: 1.8em;
  }
  table thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  table tr {
    border-bottom: 3px solid #ddd;
    display: block;
    margin-bottom: .625em;
  }
  table td {
    border-bottom: 1px solid #ddd;
    display: block;
    font-size: .9em;
    
  }
  table td:before {
    /*
    * aria-label has no advantage, it won't be read inside a table
    content: attr(aria-label);
    */
    content: attr(data-label);
    float: left;
    font-weight: bold;
    text-transform: uppercase;
  }
  table td:last-child {
    border-bottom: 0;
  }
}

</style>	
											   
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#name").keyup(function() {
var name = $('#name').val();
if(name=="")
{
$("#disp").html("");
}
else
{
$.ajax({
type: "POST",
url: "user_check.php",
data: "name="+ name ,
success: function(html){
$("#disp").html(html);
}
});
return false;
}
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#name1").keyup(function() {
var name1 = $('#name1').val();
if(name1=="")
{
$("#disp1").html("");
}
else
{
$.ajax({
type: "POST",
url: "user_check1.php",
data: "name="+ name1 ,
success: function(html){
$("#disp1").html(html);
}
});
return false;
}
});
});
</script>		
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<? depat_check($department_name,$designation);?>
<script type="text/javascript" src="jquery.min.js"></script>
   <script src="jquery-ui.js"></script>
   <link rel="stylesheet" href="jquery-ui.css">
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        New Account &nbsp;&nbsp;&nbsp;&nbsp; <? back_toindex($department_name,$designation);?>
       
      </h1>
      <ol class="breadcrumb">
        <li><a href="index.php"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class="active">Dashboard</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
      <!-- Info boxes -->
        <div>
<form action="insert_challan_form2.php" method="post" name="myform">
<input type="hidden" value="<? echo $challan_id ?>" name="challan_id">
<!-- <input type="hidden" value="<? echo $_REQUEST['imp_job_main_id'] ?>" name="imp_job_main_id"> -->

 		<div>
			<div class="col-xs-12">
				<div class="col-xs-12" style="background:#BBC433;">
							<h5 style="color:#FFFFFF"><span class="glyphicon glyphicon-map-marker"></span>&nbsp; Challan Form&nbsp; <? echo $customer_name  ?></h5>
					  </div>
												

						  	
						  	<table class="table table-bordered">
								<tbody>
									
									 
									</tbody>
						     	<tbody>


						     		<tr><td colspan="2">
									
						        		<table width="100%">
									<tr><td>
									<div class="form-group">
												<label for="scity">&nbsp;Consignor Name &nbsp;</label>
												
<input type="text" name="consignor_name" class="form-control"  readonly="readonly">


												</div>
									</td>
									
									<td>
									<div class="form-group">
												<label for="scity">&nbsp;Consignor GST No &nbsp;</label>
												<input type="text" name="consignor_gstno" class="form-control" value="<?php echo $consignor_gstno?>" readonly="readonly">
												
																			</div>
									</td></tr><tr>
									<td colspan="2">
												
									
									<div class="form-group">
												<span class="glyphicon glyphicon-user"></span>&nbsp; Consignor Address &nbsp;
												<textarea name="consignor_address" class="form-control"><? echo $consignor_address?></textarea>
												</div>
									</td>
									</tr>
									
									
									
										</table>
						        	</td>
									
									<td colspan="2">
									<table width="100%">
									<tr><td>
									<div class="form-group">
												<label for="scity">&nbsp;Consignee Name &nbsp;</label>
												
<input type="text" name="consignee_name" class="form-control"  readonly="readonly">


												</div>
									</td>
									
									<td>
									<div class="form-group">
												<label for="scity">&nbsp;Consignee GST No &nbsp;</label>
												<input type="text" name="consignee_gstno" class="form-control" value="<?php echo $consignee_gstno?>" readonly="readonly">
												
																			</div>
									</td></tr><tr>
									<td colspan="2">
												
									
									<div class="form-group">
												<span class="glyphicon glyphicon-user"></span>&nbsp; Consignee Address &nbsp;
												<textarea name="consignee_address" class="form-control"><? echo $consignee_address?></textarea>
												</div>
									</td>
									</tr>
									
									
									
										</table>
						        	</td>
						        		
						        	</tr>
								
								<tr>

									<td>
									<div class="form-group">
												<label for="scity">&nbsp; From &nbsp;</label>
												<input type="hidden" name="challan_from" class="form-control" value="<? echo $challan_from?>">
												<input type="text" name="challan_from" class="form-control" >
</div>
									</td>

									<td>
									<div class="form-group">
												<label for="scity">&nbsp; To &nbsp;</label>
												<input type="hidden" name="challan_to" class="form-control" value="<? echo $challan_to?>">
												<input type="text" name="challan_to" class="form-control" >
</div>
									</td>
								
									
									
									<td>
									<div class="form-group">
												<label for="scity">&nbsp;Vehicle No.:&nbsp;</label>
												<input type="text" name="vehicle_no" class="form-control" value="<? echo $vehicle_no?>" >
												</div>
									</td>
								</tr>




								<tr><td>
									<div class="form-group">
												<label for="scity">&nbsp; Articles No. &nbsp;</label>
												<input type="hidden" name="articles_no" class="form-control" value="<? echo $articles_no?>">
												<input type="text" name="articles_no" class="form-control" >
</div>
									</td>

									<td colspan="3">
									<div class="form-group">
												<label for="scity">&nbsp;Description  &nbsp;</label>
												<textarea name="description" class="form-control"><? echo $description?></textarea>
									</td>

								</tr>




								
								
								
								
						        	<tr><td colspan="2">
									
						        		<table width="100%">
									<tr><td>
									<div class="form-group">
												<label for="scity">&nbsp;Actual Weight &nbsp;</label>
												<input type="text" name="actual_weight" class="form-control" value="<?php echo $actual_weight?>" >
												</div>
									</td>
									
									<td>
									<div class="form-group">
												<label for="scity">&nbsp;Charge Weight &nbsp;</label>
												<input type="text" name="charge_weight" class="form-control" value="<?php echo $charge_weight?>" >
												
																			</div>
									</td>

									<td >
									<div class="form-group">
												<label for="scity">&nbsp;To Pay &nbsp;</label>
												<input type="text" name="to_pay" class="form-control" value="<?php echo $to_pay?>" >
												
																			</div>
									</td>
									<td>
									<div class="form-group">
												<label for="scity">&nbsp;Paid &nbsp;</label>
												<input type="text" name="paid" class="form-control" value="<?php echo $paid?>" >
												
																			</div>
									</td>
								</tr>



										</table>
						        	</td>
									
									<td colspan="2">
									
									<table width="100%">
									<tr><td>
									<div class="form-group">
												<label for="scity">&nbsp;Transportation Service
 &nbsp;</label>
<input type="text" name="transportation" class="form-control" value="<?php echo $transportation?>" >
												</div>
									</td>


									<td>
									<div class="form-group">
												<label for="scity">&nbsp;Loaded &nbsp;</label>
<select class="form-control" name="loaded" style="width:220px;" required>

												<option value="">Select </option>
												<option value="EXPORT">Export</option>
												<option value="IMPORT">Import</option>
												<option value="LOCAL">Local</option>
												</select>
												</div>
									</td>
									
									</tr></tr>
										</table>
									
									</td>
						        		
						        	</tr>
									
									<tr><td>
									<div class="form-group">
												<label for="scity">&nbsp;Container No.:  &nbsp;</label>
												<input type="text" name="container_no" class="form-control" value="<? echo $container_no?>" >
									  </div>
									</td> 
									
									<td>
									<div class="form-group">
												<label for="scity">&nbsp;Seal No.: &nbsp;</label>
												<input type="text" name="seal_no" class="form-control" value="<? echo $seal_no?>" >
												</div>
									</td>

									<td>
									<div class="form-group">
												<label for="scity">&nbsp;Destination : &nbsp;</label>
												<input type="text" name="destination" class="form-control" value="<? echo $destination?>" >
									  </div>
									</td> 
									
									<td>
									<div class="form-group">
												<label for="scity">&nbsp;Shipping Agent: &nbsp;</label>
												<input type="text" name="shipping_agent" class="form-control" value="<? echo $shipping_agent?>" >
												</div>
									</td>
									
									</tr>
									<tr><td>
									<div class="form-group">
												<label for="scity">&nbsp; Booking No.: &nbsp;</label>
												<input type="text" name="booking_no" class="form-control" value="<? echo $booking_no?>" >
												</div>
									</td>
								
									<td colspan="2">
									
						        		<table width="100%">
									<tr><td>
									<div class="form-group">
												<label for="scity">&nbsp;IN TIME &nbsp;</label>
												<input type="time" name="in_time" class="form-control" value="<?php echo $in_time?>" >
												</div>
									</td>
									
									<td>
									<div class="form-group">
												<label for="scity">&nbsp;IN Date &nbsp;</label>
												<input type="date" name="in_date" class="form-control datepicker_des" value="<?php echo $in_date?>" >
												
																			</div>
									</td>

									<td >
									<div class="form-group">
												<label for="scity">&nbsp;Out Time &nbsp;</label>
												<input type="time" name="out_time" class="form-control" value="<?php echo $out_time?>" >
												
																			</div>
									</td>
									<td>
									<div class="form-group">
												<label for="scity">&nbsp;Out Date &nbsp;</label>
												<input type="date" name="out_date" class="form-control datepicker_des" value="<?php echo $out_date?>" >
												
																			</div>
									</td>
								</tr>



										</table>
						        	</td>
									
								
									<td>
									<div class="form-group">
												<label for="scity">&nbsp; Receiver Signature with seal &nbsp;</label>
												<input type="text" name="receiver_sign" class="form-control" value="<? echo $receiver_sign?>" >
												</div>
											</td>
										</tr>


									<tr>
									
									
								<td>
									<div class="form-group">
												<label for="scity">&nbsp; Delivery At:  &nbsp;</label>
												<input type="text" name="delivery_at" class="form-control" value="<? echo $delivery_at?>" >
												</div>
								
									
									</td>
								</tr>
								
									
						   		</tbody>
						  	</table>
							
							 
						</div>	
					</div>	
			
			<div>
		</div>
			
			
			
			<script>$( ".datepicker_des").datepicker({
  inline: true,
 
  nextText: '&rarr;',
  prevText: '&larr;',
  showOtherMonths: true,
  changeMonth: true,
        changeYear: true,
  dateFormat: 'dd/mm/yy',
  dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
      showAnim: "slide"
 });</script>

					
	
		<div class="row">
			<div class="col-sm-12">
				<div class="filter-header">
					<div class="col-sm-12 " >
						
	          			
          				<input type="submit" name="Submit" value="Save" class="btn bg-btn-save" style="float:right"/>
	          			
					
						 
					</div>
				</div>
			</div>
		</div>		 

</form>
	</div>
		
		</div>
    </section>
    <!-- /.content -->
  <!-- /.content-wrapper -->
<script type="text/javascript" src="../js/date-time-picker.js"></script>

   <? include'../footer.php'; ?>


</body>
</html>
