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

    <div class="card-body">
        
        <table id="report_table" name="report_table" class="table table-hover table-bordered table-striped"> 
            <thead>
                <tr>
                    <th style="width:7%">SL No</th>
                    <th style="width:10%">Sales Return Name</th>
                    <th style="width:13%">Sales Return Product</th>
                    <th style="width:13%">Sales Return Model</th>
                    <th style="width:13%">Sales Return CostPrice</th>
                </tr>
            </thead>

        <?php
          $ret = "SELECT * FROM trn_salesreturn";           
          $stmt = $mysqli->prepare($ret);
          $stmt->execute();
          $res = $stmt->get_result();       
          $cnt=1;
          while ($rows = $res->fetch_object())        
          {   
        ?> 
       
        <tbody>
          <tr> 
              <td> <?php echo $cnt;?> </td>
              <td> <?php echo $rows->salesreturn_productname;?> </td>
              <td> <?php echo $rows->salesreturn_product;?> </td>
              <td> <?php echo $rows->salesreturn_model;?> </td> 
              <td> <?php echo $rows->salesreturn_costprice;?> </td>
          </tr>

        <?php 
            $cnt=$cnt+1;
            } 
        ?>        
        </tbody>
     </tfoot> 
  </table>   
            
    </div>
   </div>
  </div>
 </div>
 
    <a href="stockdetailst_report_start.php"><button type="back" class="btn btn-primary" style="height:40px;float:right;">BACK</button></a> 

</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>

