<?php 
if(!isset($_SESSION)) { 
  session_start(); 
  include('../includes/dbcon.php');
}
if(empty($_SESSION['rm_id'])):
header('Location:../index.php');
endif;




?>
<!DOCTYPE html>
<html lang="en">


<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>saleshub | Customer Management </title>
  <!-- plugins:css -->
  <?php include('../includes/commonheader.php');?>



</head>
<body>
 <?php include('../includes/header.php');?>
 <?php include('../includes/leftsidebar.php');?>
           <!-- partial -->
 <div class="main-panel">        
        <div class="content-wrapper">

          <div class="page-header">
            <h3 class="page-title">
                Customer Registration
            </h3>
           
          </div>
          <div class="col-12 grid-margin">
              <div class="card">
                <div class="card-body">

              
         
                 
    <form class="needs-validation" novalidate method="post" action="admin_customer_add.php" enctype="multipart/form-data" onsubmit="return validateForm()"> 
                  
                    <div class="row">
                      <div class="col-md-6">
                        <div class="form-group row">
                          <label class="col-sm-3 col-form-label">Cuatomer Name <span style="color:red;font-size: 15px;font-weight:bold;">*</span> </label>
                          <div class="col-sm-9">
                            <input type="text" class="form-control" id="cusname" name="cusname" placeholder="Name">
                          </div>
                        </div>
                      </div>
                      <div class="col-md-6">
                        <div class="form-group row">
                          <label class="col-sm-3 col-form-label">Address <span style="color:red;font-size: 15px;font-weight:bold;">*</span></label>
                          <div class="col-sm-9">
                            <input type="text" class="form-control" id="address" name="address" placeholder="User Name">
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-6">
                        <div class="form-group row">
                          <label class="col-sm-3 col-form-label">Telephone</label>
                          <div class="col-sm-9">
                            <input type="text" class="form-control" id="tel" name="tel" placeholder="Contact Detail">
                          </div>
                        </div>
                      </div>
                      <div class="col-md-6">
                        <div class="form-group row">
                          <label class="col-sm-3 col-form-label">Email</label>
                          <div class="col-sm-9">
                            <input type="text" class="form-control" id="email" name="email" placeholder="Email">
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-6">
                        <div class="form-group row">
                          <label class="col-sm-3 col-form-label">City</label>
                          <div class="col-sm-9">
                            <input type="text" class="form-control" id="city" name="city" placeholder="City">
                          </div>
                        </div>

                     
                        </div>
            <div class="col-md-6">
                        <div class="form-group row">
                          <label class="col-sm-3 col-form-label">Note</label>
                          <div class="col-sm-9">
                            <input type="text" class="form-control" id="notes" name="notes" placeholder="Note or Remarks">
                          </div>
                        </div>
                      </div>
                      
                      
                      

</div>
 <div class="row">
                      <div class="col-md-6">
                        <div class="form-group row">
                          <label class="col-sm-3 col-form-label">Customer Code</label>
                          <div class="col-sm-9">
                            <input type="text" class="form-control" id="custcode" name="custcode" placeholder="Code">
                          </div>
                        </div>
                        </div>
                 <div class="col-md-6">
                        <div class="form-group row">
                          <label class="col-sm-3 col-form-label"> VAT No:</label>
                          <div class="col-sm-9">
                           <input type="checkbox" id="vat_invoice" name="vat_invoice" >
                            <input type="text" class="form-control" id="custvat" name="custvat" placeholder="VAT Registration Number">
                          </div>
                        </div>
                      </div>
                      </div>
                        
                        
                        
                        
                                    
                 
                     <button type="submit" class="btn btn-primary">Save</button>
                    <button class="btn btn-light">Cancel</button>
                  </form>
                </div>
              </div>
            </div>


  



        </div>  <!----- <div class="content-wrapper">------>
  </div> 
</div>


</div>  <!----- <div class="content-wrapper">------>
  

 </div><!-----End of main panel--~~~~~~~~~~~~~~~~~~~~~~~--------------->
 </div><!-----Dont Delete this DIV--~~~~~~~~~~~~~~~~~~~~~~~--------------->
  <!-- container-scroller -->
<?php include('../includes/footer.php');?>
<?php include('../includes/commonjs.php');?>
 
</body>


</html>

<script>
    $( document ).ready(function() {
         // alert("Please Select Order Type");

    });

function validateForm() { 

    //````````route````````````````````````````````````
    if($('#vroute').val().trim().length == 0) {
           alert("Please enter the route you visited !!!");               
            return false;
    } ////``````````````````````````````````````````

     //````````start mileage````````````````````````````````````
    if ($('#sm').val() == 0){
           alert("Please enter the start mileage !!!");               
            return false;
    } ////``````````````````````````````````````````


 //````````end mileage````````````````````````````````````
    if ($('#em').val() == 0){
           alert("Please enter the end mileage !!!");               
            return false;
    } ////``````````````````


//````````fuel charge````````````````````````````````````
    if ($('#fg').val() == 0){
           alert("Please enter the fuel charge !!!");               
            return false;
    } ////``````````````````


//````````bata````````````````````````````````````
    if ($('#bata').val() == 0){
           alert("Please enter the bata !!!");               
            return false;
    } ////``````````````````

//````````Customer````````````````````````````````````
    if($('#cus').val().trim().length == 0) {
           alert("Please enter visited customer code and name");               
            return false;
      }///``````````````````



 } ///validateForm() { 

</script>

 <!-- End custom js for this page-->
  <script>
  $(function () {
    //Initialize Select2 Elements
    $('.select2').select2()

    //Initialize Select2 Elements
    $('.select2bs4').select2({
      theme: 'bootstrap4'
    })
  })

</script>



