<?php include 'sesion_user.php';?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=gb18030">

<title>Sistema Stock</title>


<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">


<meta name="viewport" content="width=device-width, initial-scale=1.0">


  <style>
    /* Estilos del modal */
    .modal {
      display: none;
      position: fixed;
      z-index: 1;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0,0,0,0.4);
    }

    .modal-content {
      background-color: #fefefe;
      margin: 10% auto;
      padding: 20px;
      border: 1px solid #888;
      width: 80%;
      max-width: 600px;
    }

    /* Estilos del botón de cierre */
    .close {
      color: #aaa;
      float: right;
      font-size: 28px;
      font-weight: bold;
    }

    .close:hover,
    .close:focus {
      color: black;
      text-decoration: none;
      cursor: pointer;
    }

    /* Estilos del spinner de carga */
    .spinner {
      border: 16px solid #f3f3f3;
      border-top: 16px solid #3498db;
      border-radius: 50%;
      width: 80px;
      height: 80px;
      animation: spin 2s linear infinite;
      margin: 20px auto;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
  </style>

</head>

<body onload="document.forms['form14']['busqueda'].focus()">

<div class="container-fluid">


<div class="row">

<div class="col-lg-3 col-md-3 col-sm-12" style="background-color: #C8C8C8; border-right: solid;
    border-right-width: medium;
border-width: 1px;">


<?php
include 'nav.php';?>

</div>

<div class="col-lg-9 col-md-9 col-sm-9" style="border-right: solid; 
    border-right-width: medium;
border-width: 1px;">


<div class="container">


<button class="btn btn-success">ABRIR CAJA</button>


<HR>
    
    ESTA A PUNTO DE ABRIR LA CAJA DEL <b>DIA <? echo date(d) ?> DEL MES <? echo date(m) ?> A LAS <? echo date(H) ?>:<? echo date(i) ?> HS.</b> CON UN TOTAL EN LA CAJA FISICA DE $<b><? echo $total_caja ?></b>

<HR>
    SI NO TIENE $<b><? echo $total_caja ?></B> EN SU CAJA FISICA PUEDE HACER UN <a href="nuevo_mov_caja.php"><B>MOVIMIENTO DE CAJA</B></a> PARA RESTAR O SUMAR SEGUN CORRESPONDA Y ACOMODAR EL NUMERO.
<HR>

<a href="abrir_caja_confirmacion.php"><button class="btb btn-primary">ABRIR CAJA</button></a>

</div>
</div>






<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-146398018-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-146398018-1');
</script>



  <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>


  <script type="text/javascript">window.setInterval(function(){
  $('.grid').isotope({
  itemSelector: '.grid-item'
});
}, 2000);
</script>

<script language=javascript>
function ventanaSecundaria56 (URL){
   window.open(URL,"ventana1","width=600,height=500,scrollbars=NO")
}







  </script>
  
  
  
  
      <script language="javascript">
    function PulsarTecla(event)
    {
        tecla = event.keyCode;
     
        if(tecla==113)
        {
            location.href ='nueva_venta.php';
        }
        
        
        
        
    }
     
    window.onkeydown=PulsarTecla;
    </script>
   
<!-- Modal -->
<div id="myModal" class="modal">
  <div class="modal-content">
    <span class="close">&times;</span>
    <div id="spinner" class="spinner"></div>
    <iframe id="myIframe" src="" style="width: 100%; height: 400px;"></iframe>
  </div>
</div>

<script>
  // Obtener elementos del DOM
  var modal = document.getElementById("myModal");
  var btns = document.getElementsByClassName("openModal");
  var closeBtn = document.getElementsByClassName("close")[0];
  var iframe = document.getElementById("myIframe");
  var spinner = document.getElementById("spinner");

  // Funci��n para abrir el modal y actualizar el iframe
  function openModal(url) {
    modal.style.display = "block";
    spinner.style.display = "block";
    iframe.style.display = "none";
    iframe.src = url;
  }

  // Funci��n para cerrar el modal
  function closeModal() {
    modal.style.display = "none";
    spinner.style.display = "none";
    iframe.src = "";
  }

  // Asignar eventos a los botones
  for (var i = 0; i < btns.length; i++) {
    btns[i].addEventListener("click", function() {
      var url = this.getAttribute("data-url");
      openModal(url);
    });
  }

  closeBtn.addEventListener("click", closeModal);
  window.addEventListener("click", function(event) {
    if (event.target == modal) {
      closeModal();
    }
  });

  // Evento de carga completada del iframe
  iframe.addEventListener("load", function() {
    spinner.style.display = "none";
    iframe.style.display = "block";
  });
</script>
</body>
</html>
