<?php
  session_start();
  include('includes/connection.php');
  include('includes/checklogin.php');
  check_login(); 
  $userid = $_SESSION['loginid'];
?>

<!DOCTYPE html>
<html>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<?php include("includes/head.php"); ?>

<body class="hold-transition sidebar-mini">
  <div class="wrapper">
    <?php include("includes/nav.php"); ?>
    <?php include("includes/sidebar.php"); ?>

    <div class="content-wrapper">
      <section class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="col-sm-4">
              <h1>Stock Details Reports </h1>
            </div>
            <div class="col-sm-2">
                
            </div>            
            <div class="col-sm-6">
              <ol class="breadcrumb float-sm-right">
                <li class="breadcrumb-item"><a href="dashboard.php">Dashboard</a></li>
                <li class="breadcrumb-item"><a href="sales_return_manage.php">Stock Details Creation</a></li>
                <li class="breadcrumb-item active">Manage Stock Details</li>
              </ol>
            </div>
          </div>
        </div>
      </section>

      <section class="content">
        <div class="row">
          <div class="col-12">
            <div class="card">&nbsp;&nbsp;&nbsp;&nbsp;

    <form class="form" id="data" action="stockdetails_report_end.php" method="post">

      <div class="row">&nbsp;&nbsp;&nbsp;&nbsp;
          <div class="col-md-5 form-group">
              <label for="salesreturn_productname">Sales Return Name</label>  
              <select name="salesreturn_productname" id="salesreturn_productname" class="form-control">
                  <option> Select Sales Return Name</option>&nbsp;&nbsp;&nbsp;&nbsp;
                  <?php 
                      $sqlsss = "SELECT salesreturn_productname FROM trn_salesreturn ORDER BY salesreturn_productname";
                      $result = $mysqli->query($sqlsss);
                      while($row = mysqli_fetch_array($result)) 
                      {
                  ?>
                  <option value="<?php echo $row['salesreturn_productname']; ?>"> <?php echo $row['salesreturn_productname'];?></option>
                  <?php  
                      }
                  ?>
              </select>
          </div>  

          <div class="col-md-5 form-group">
              <label for="salesreturn_product">Sales Return Product</label>  
              <select name="salesreturn_product" id="salesreturn_product" class="form-control">
                  <option>Select Sales Return Product</option>&nbsp;&nbsp;&nbsp;&nbsp;
                  <?php 
                      $sqlsss = "SELECT salesreturn_product FROM trn_salesreturn ORDER BY salesreturn_product";
                      $result = $mysqli->query($sqlsss);
                      while($row = mysqli_fetch_array($result)) 
                      {
                  ?>
                  <option value="<?php echo $row['salesreturn_product']; ?>"> <?php echo $row['salesreturn_product'];?></option>
                  <?php  
                      }
                  ?>
              </select>
          </div>
      </div>

      <div class="row">&nbsp;&nbsp;&nbsp;&nbsp;
          <div class="col-md-5 form-group">
              <label for="salesreturn_model">Sales Return Model</label>  
              <select name="salesreturn_model" id="salesreturn_model" class="form-control">
                  <option>Select Sales Return Model</option>&nbsp;&nbsp;&nbsp;&nbsp;
                  <?php 
                      $sqlsss = "SELECT salesreturn_model FROM trn_salesreturn ORDER BY salesreturn_model";
                      $result = $mysqli->query($sqlsss);
                      while($row = mysqli_fetch_array($result)) 
                      {
                  ?>
                  <option value="<?php echo $row['salesreturn_model']; ?>"> <?php echo $row['salesreturn_model'];?></option>
                  <?php  
                      }
                  ?>
              </select>
          </div>
     
          <div class="col-md-5 form-group">
              <label for="salesreturn_costprice">Sales Return CostPrice</label>  
              <select name="salesreturn_costprice" id="salesreturn_costprice" class="form-control">
                  <option>Select Sales Return CostPrice</option>&nbsp;&nbsp;&nbsp;&nbsp;
                  <?php 
                      $sqlsss = "SELECT salesreturn_costprice FROM trn_salesreturn ORDER BY salesreturn_costprice";
                      $result = $mysqli->query($sqlsss);
                      while($row = mysqli_fetch_array($result)) 
                      {
                  ?>
                  <option value="<?php echo $row['salesreturn_costprice']; ?>"> <?php echo $row['salesreturn_costprice'];?></option>
                  <?php  
                      }
                  ?>
              </select>
          </div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

          <a href="stockdetails_report_end.php"><button type="show" class="btn btn-success" style="height:40px;" id="show" name="show">SHOW</button></a>  

      </div>
    </form>
  
    <div class="card-body">
    </tfoot> 
      </div>
     </div>
    </div>
   </div>
  </section><br>
</div>

  <?php include("includes/footer.php"); ?>
  <aside class="control-sidebar control-sidebar-dark"></aside>
</div>
  
  <script src="plugins/jquery/jquery.min.js"></script>
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="plugins/datatables/jquery.dataTables.js"></script>
  <script src="plugins/datatables-bs4/js/dataTables.bootstrap4.js"></script>
  <script src="dist/js/adminlte.min.js"></script>
  <script src="dist/js/demo.js"></script>

  <script>
    $(function() 
    {
      $("#table1").DataTable();
      $('#table2').DataTable
      ({
        "paging": true,
        "lengthChange": false,
        "searching": false,
        "ordering": true,
        "info": true,
        "autoWidth": false,
      });
    });
  </script>

</body>
</html>
