<?php
include "../session.php"; 

if($role!="ADMIN"){
  header("Location:index.php");
  die();
}

include "conect.php";


//error_reporting(0);


//$tipo=$_GET["tipoCobro"];

 ?>
 <!--<input type="hidden" name="" id="tipo_cobro" value="">

  <button onClick="window.location.reload();">Refresh Page</button>-->



 <!DOCTYPE html>
<html>
<head>
  <link rel="shortcut icon" href="../img/icon.ico" type="image/x-icon"/>

  
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=no">
  
  <link rel="stylesheet"   href="../css/style.css?n=1">
  <script src="https://kit.fontawesome.com/e027a9c2a4.js" crossorigin="anonymous"></script>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
  

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  <script src="../js/functions.js"></script>
  <script type="text/javascript" src="../js/jquery_3.6.0.min.js"></script>
  <script src="../plugins/sweetalert2/sweetalert2.all.min.js "></script>


  

  <title>
      Consultar Ventas Du
   </title>

 
</head>
<body>

  <?php 


date_default_timezone_set('America/Guatemala');
$today="2022-06-01";
$lastday="2022-06-30";



$consulta = mysqli_query($con, "SELECT * FROM ventas WHERE DATE_ING BETWEEN '$today' AND '$lastday'");
$conteo   = mysqli_num_rows($consulta);

if ($conteo>0) {




while ($row3 = mysqli_fetch_array($consulta)) {

                   echo $user    = $row3['CODIGO_AS'];
                   echo  $fechaIngreso = $row3['COD_PROD_V'];
                   echo  $horaIngreso      = $row3['TOTAL'];
                    

                }

  
}


   ?>

   <a href="excel.php">Descargar</a>

        
</body>
</html>

