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


    $identifiant=$_GET['identifiant'];
    
    
    
    $tt=$db->prepare('SELECT SUM(nap) AS tot FROM tbl_invoice WHERE id_point_journalier=?');
    $tt->execute(array($identifiant));
    while($tts=$tt->fetch()) {
        $tot=$tts['tot'];
    }
    

   
?>

<!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>Récette</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">Point des recettes de la caisse <?php echo $identifiant; ?></h5>

                        <div class="table-responsive">
                            <table class="table align-middle table-nowrap table-centered mb-0">
                                <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>N° Commande</th>
                                        <th>Date</th>
                                        <th class="text-end">Montant</th>
                                    </tr>
                                </thead><!-- end thead -->
                                <tbody>
                                    
                                    <?php
                                        $ver=$db->prepare('SELECT * FROM tbl_invoice WHERE id_point_journalier=?');
                                        $ver->execute(array($identifiant));
                                        while($vers=$ver->fetch()) {
                                            echo('
                                                <tr>
                                                    <td>'.$vers['id_point_journalier'].'</td>
                                                    <td>'.$vers['num_cmd'].'</td>
                                                    <td>'.$vers['order_date'].'</td>
                                                    <td class="text-end">'.$vers['nap'].' F</td>
                                                </tr>
                                            ');
                                        }
                                    
                                    ?>
                                    
                                    <tr>
                                        <th scope="row" colspan="3" class="border-0 text-end">Total</th>
                                        <td class="text-end" colspan="4"><h4 class="fw-semibold"><?php echo $tot; ?> F CFA</h4></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>