<?php
 ob_start();
    
    include('db.php');


    $deb=$_GET['deb'];
    
    $fin=$_GET['fin'];
    
    $deb1=date("d-m-Y", strtotime($deb));
        
    $fin1=date("d-m-Y", strtotime($fin));
    

   
?>

<!doctype html>
<html lang="en">
  
<!-- Mirrored from templates.iqonic.design/posdash/html/backend/page-add-sale.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 10 Mar 2023 13:27:37 GMT -->
<head>
    <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
      <title>Stock périodique</title>
      
      <!-- Favicon -->
      <link rel="shortcut icon" href="images/lo.png" />
      <link rel="stylesheet" href="assets/css/backend-plugin.min.css">
      <link rel="stylesheet" href="assets/css/backende209.css?v=1.0.0">
      <link rel="stylesheet" href="assets/vendor/%40fortawesome/fontawesome-free/css/all.min.css">
      <link rel="stylesheet" href="assets/vendor/line-awesome/dist/line-awesome/css/line-awesome.min.css">
      <link rel="stylesheet" href="assets/vendor/remixicon/fonts/remixicon.css">  
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
      
      <style>
          body{margin-top:20px;
            background-color:#eee;
            }
            
            .card {
                box-shadow: 0 20px 27px 0 rgb(0 0 0 / 5%);
            }
            .card {
                position: relative;
                display: flex;
                flex-direction: column;
                min-width: 0;
                word-wrap: break-word;
                background-color: #fff;
                background-clip: border-box;
                border: 0 solid rgba(0,0,0,.125);
                border-radius: 1rem;
            }
      </style>
      </head>
  <body class="  ">
    <!-- loader Start -->
    
    <!-- loader END -->
    <!-- Wrapper Start -->
    <div class="wrapper">
      
      
     <div class="container">
<div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-body">
                    <div class="invoice-title">
                        <h4 class="float-end font-size-15">RESTAURANT 12/17 </h4>
                        
                        <div class="text-muted">
                            <p class="mb-1">Adresse : Rue 391, Cotonou, BENIN</p>
                        </div>
                    </div>

                    <hr class="my-4">

                    
                    
                    <div class="py-2">
                        <h5 class="font-size-15">Inventaire des repas du <?php echo $deb1; ?> au <?php echo $fin1; ?></h5>

                        <div class="table-responsive">
                            <table class="table align-middle table-nowrap table-centered mb-0">
                                <thead>
                                    <tr>
                                        <th>Désignation</th>
                                        <th>Quantité ajoutée</th>
                                        <th>Date d'ajout</th>
                                        <th>Ajoutée par</th>
                                        <th>Quantité en stock</th>
                                    </tr>
                                </thead><!-- end thead -->
                                <tbody>
                                    
                                    <?php
                                        $ver=$db->prepare('SELECT stock_repas.*, repas.nom, prix_repas.designation, prix_repas.qte_stock, tbl_user.username FROM prix_repas, repas, stock_repas, tbl_user WHERE stock_repas.prix_repas=prix_repas.id AND prix_repas.repas=repas.id AND tbl_user.id=stock_repas.user AND stock_repas.datt BETWEEN ? AND ? AND stock_repas.valid=? ORDER BY stock_repas.id DESC');
                                        $ver->execute(array($deb,$fin,1));
                                        while($vers=$ver->fetch()) {
                                            echo('
                                                <tr>
                                                    <td>'.$vers['nom'].' '.$vers['designation'].'</td>
                                                    <td>'.$vers['qte'].'</td>
                                                    <td>'.$vers['dat'].'</td>
                                                    <td>'.$vers['username'].'</td>
                                                    <td>'.$vers['qte_stock'].'</td>
                                                </tr>
                                            ');
                                        }
                                    
                                    ?>
                                    
                                   
                                    <!-- end tr -->
                                </tbody><!-- end tbody -->
                            </table><!-- end table -->
                        </div><!-- end table responsive -->
                        <div class="d-print-none mt-4">
                            <div class="float-end">
                                <a href="javascript:window.print()" class="btn btn-success me-1"><i class="fa fa-print"></i></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div><!-- end col -->
    </div>
</div>
    </div>
    <!-- Wrapper End-->


    
    <!-- Backend Bundle JavaScript -->
    <script src="assets/js/backend-bundle.min.js"></script>
    
    <!-- Table Treeview JavaScript -->
    <script src="assets/js/table-treeview.js"></script>
    
    <!-- Chart Custom JavaScript -->
    <script src="assets/js/customizer.js"></script>
    
    <!-- Chart Custom JavaScript -->
    <script async src="assets/js/chart-custom.js"></script>
    
    <!-- app JavaScript -->
    <script src="assets/js/app.js"></script>
  </body>

<!-- Mirrored from templates.iqonic.design/posdash/html/backend/page-add-sale.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 10 Mar 2023 13:27:37 GMT -->
</html>