<?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);

?>
<?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))
	                                              	{
													  $full_name = $row['full_name'];
													   $region = $row['region'];
													  $avatar = $row['avatar'];
													  $department_name = $row['department_name'];
													  $staff_id  = $row['id'];
													  $username = $row['username'];
													   $our_company = $row['our_company'];
													    $designation = $row['designation'];
													 $sales_region = $row['region'];
$sales_group = $row['sales_group']; 
 //echo $Branch;
													  }	
													   ?>	
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>WARPP ENGINEERS PVT. LTD.</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">
  <!-- jvectormap -->
  <link rel="stylesheet" href="../plugins/jvectormap/jquery-jvectormap-1.2.2.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="../dist/css/AdminLTE.min.css">
  <link rel="stylesheet" href="../dist/css/skins/_all-skins.min.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="../jquery.min.js"></script>
   <script src="../jquery-ui.js"></script>
   <link rel="stylesheet" href="../jquery-ui.css">
   
    <script type="text/javascript">
function fillsale(Value)
{
$('#customer_id').val(Value);
$('#displaysale').hide();
}

$(document).ready(function(){
$("#customer_id").keyup(function() {
var name = $('#customer_id').val();
if(name=="")
{
$("#displaysale").html("");
}
else
{
$.ajax({
type: "POST",
url: "ajax_plan.php",
data: "customer_id="+ name ,
success: function(html){
$("#displaysale").html(html).show();
}
});
}
});
});</script>	

</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<?php include 'header.php';?>


  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">    </section>
<? include('fy_dd.php');?>

    <!-- Main content -->
    <section class="content">
      <!-- Info boxes -->
      <div class="row">
        <div>
		
		<form name="empdetali" action="product_dispatched_form1.php" method="post">
		<input type="hidden" name="customer_id01" value="<? echo $_REQUEST['customer_id01']?>" >
		<input type="hidden" name="inv_id" value="<? echo $_REQUEST['inv_id']?>" >




<!-- Details -->
 <? include('sahavas_dropdown_function.php');?>
<!-- Details -->

			
			<div class="col-sm-5">
				<div class="filter-view">
					<div>
						<table class="table table-bordered">
														
							<div class="col-xs-12" style="background:#367FA9;">
							<h5 style="color:#FFFFFF"><span class="glyphicon glyphicon-list"></span>&nbsp;&nbsp;Details&nbsp;</h5>
					
					  </div>
								
							  
							  
						     <tr>
							<td>
							  
							  <? if($_REQUEST['customer_id01']!='') { ?>
							  
			<label style="font-weight:normal; font-size:15px;">Customer Name</label>
							   <?php 
							   
						 $query2 = "select * from customer_master where dealer_id='".$_REQUEST['customer_id01']."'";
		                 $result2 = mysql_query($query2,$conn);		?>
   						<select name="customer_id"class="form-control"  onchange='this.form.submit()'>
						 <option value="" selected="selected">Select Customer</option>
						 <option value="NEW">New Customer </option>
                        <?php
													while($row=mysql_fetch_array($result2))
	                                              	{
													$customer_name = $row['customer_name'];
													$customer_id = $row['customer_id'];
													  ?>
                        <option value="<?php echo $customer_id ?>"><?php echo $customer_name ?></option>
                        <?php } ?>
                      </select><noscript><input type="submit" value="Submit"></noscript>  <? } ?>
				   </td>
				 </tr>
			</table>
		  </form>
		<div>
			
		</div>
	</div>
</div>
    </section></div>
    <!-- /.content -->
  <!-- /.content-wrapper -->

    <? include'footer.php'; ?>


</body>
</html>
