<?php
// tiene que ir aqui para la coneccion
require_once("../includes/connection.php");
// incluye los jquery, los js, los estilos,
// codigos de error...
include("../includes/header.php");
require_once("e:/nombre_caja.php");
?>
<style>
.btmostrar {
display: inline-block;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
cursor: pointer;
padding: 10px 20px;
border: 1px solid #018dc4;
-webkit-border-radius: 3px;
border-radius: 3px;
font: normal 16px/normal Verdana, Geneva, sans-serif;
color: rgba(255,255,255,0.9);
-o-text-overflow: clip;
text-overflow: clip;
background: #0199d9;
-webkit-box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.2) ;
box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.2) ;
text-shadow: -1px -1px 0 rgba(15,73,168,0.66) ;
-webkit-transition: all 300ms cubic-bezier(0.42, 0, 0.58, 1);
-moz-transition: all 300ms cubic-bezier(0.42, 0, 0.58, 1);
-o-transition: all 300ms cubic-bezier(0.42, 0, 0.58, 1);
transition: all 300ms cubic-bezier(0.42, 0, 0.58, 1);
}
.btmostrar:hover {
background: rgba(136,194,216,0.9);
}
.btmostrar:active {
background: rgba(30,2,216,0.9);
}
.dineros {
display: inline-block;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
padding: 10px 20px;
border: 4px solid rgba(1,153,217,1);
-webkit-border-radius: 5px;
border-radius: 5px;
font: normal normal bold 17px/normal Verdana, Geneva, sans-serif;
color: rgba(0,0,0,1);
text-align: right;
-o-text-overflow: clip;
text-overflow: clip;
-webkit-box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.2) inset;
box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.2) inset;
text-shadow: 1px 1px 0 rgba(255,255,255,0.66);
-webkit-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1);
-moz-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1);
-o-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1);
transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1);
background-color: rgba(252,245,122,1);
}
.etiqueta {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
border: none;
font: normal normal bold 20px/1 Verdana, Geneva, sans-serif;
color: rgba(43,107,191,1);
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
</style>
<script type="text/javascript" src="../jquery/jquery-3.1.0.js"></script>
<link rel="stylesheet" href="../css/estilos_informe.css"/>
<div class="ancho centrado">
<table width="100%" border="1">
<tr>
<td><div id="titulo" class=" titulo" >Cierre de Caja</div></td>
</tr>
<tr>
<td><?php include("../menu.html"); ?></td>
</tr>
</table>
<table width="100%" border="1">
<tr>
<td height="126"><div class="borde_redondo">
<p> <label class="mensaje_inicio" >Caja número </label>
<label id="cajan" class="caja_numero"><?php echo $cajanumero; ?></label></p>
<p>Este procedimiento cerrará las operaciones de la caja. Se guardarán los totales de: </p>
<p>1.- Cantidad total de dinero del fondo en caja.</p>
<p>2.- Cantidad de dinero en documentos (por ejemplo Cheques).</p>
<p>3.- Cantidad de dinero ventas con tarjetas.</p>
<p>4.- Total de retiros particulares.</p>
<p>Compruebe que el total general coincida con el <strong>fondo total</strong>.</p>
<div class="centrado">
<form id="form1" name="form1" method="post" action="">
<input name="btmostrar" type="button" id="btmostrar" value="MOSTRAR"
class="btmostrar"/>
</form>
</div>
</div></td>
</tr>
</table>
<div id="resultados"class="borde_redondo">
<form id="enviando_resultados" name="enviando_resultados" method="post" action="">
<table width="100%" border="1">
<tr>
<td width="24%"> </td>
<td width="30%" class="etiqueta">total de dinero</td>
<td><input name="txtcantidadtotal"
type="text" class="dineros" id="txtcantidadtotal"
value="12" size="9" readonly="readonly"/></td>
</tr>
</table>
<p>
<table width="100%" border="1">
<tr>
<td width="24%"> </td>
<td width="30%" class="etiqueta">en efectivo</td>
<td><input name="txtdineroefectivo"
type="text" class="dineros" id="txtdineroefectivo"
value="12"size="9" readonly="readonly" /></td>
</tr>
</table>
<p>
<table width="100%" border="1">
<tr>
<td width="24%"> </td>
<td width="30%" class="etiqueta">ventas con tarjetas</td>
<td><input name="txtdinerotarjetas"
type="text" class="dineros" id="txtdinerotarjetas"
value="12" size="9" readonly="readonly" /></td>
</tr>
</table>
<p>
<table width="100%" border="1">
<tr>
<td width="24%"> </td>
<td width="30%" class="etiqueta">en documentos</td>
<td><input name="txtdinerodocumentos"
type="text" class="dineros" id="txtdinerodocumentos"
value="12" size="9" readonly="readonly" /></td>
</tr>
</table>
<p>
<table width="100%" border="1">
<tr>
<td width="24%"> </td>
<td width="30%" class="etiqueta">retiros particulares</td>
<td><input name="txtdineroparticular"
type="text" class="dineros" id="txtdineroparticular"
value="12" size="9" readonly="readonly" /></td>
</tr>
</table>
</form>
<p>
<div class="centrado">
<form id="form2" name="form2" method="post" action="">
<input name="btimprimir" type="button" class="btmostrar" id="btimprimir" value="Imprimir" />
</form>
</div>
</div>
<p><?php include("../includes/footer.php") ?></p>
</div>
<script>
$(function(){
inicio()
function inicio(){
$("#btmostrar").focus() // se pone el foco para ENTER en Mostrar
$("#resultados").hide() // se oculta la tabla de resultados
}
/////////////////////////
$("#btmostrar").click(function(){
// cuando se hace Click en Mostrar
// se muestran los resultados y
// se lleva el foco al boton de Imprimir.
// la impresion se hace en la impresora de boletas
$("#resultados").show(500,function(){
recupera_datos()
$("#btimprimir").focus()
})
})
////////////////////
$("#btimprimir").click(function(){
// se imprime y se devuelve al inicio de sesion
// para empezar de nuevo con la caja cerrada
// o simplemente se cierra la ventana
$('#enviando_resultados').attr('action', 'codigo.php');
$("#enviando_resultados").submit()
//$("#enviando_resultados").attr('action','')
/*window.open("codigo.php", "leyenda", +
"directories=no, location=no, menubar=no, scrollbars=yes, " +
"statusbar=no, tittlebar=no, width=1000, height=600") */
//$(location).attr('href','../index.php' );
})
///////////////////////
function recupera_datos(){
//recupera los datos desde la base de datos
$.ajax({
type: "POST",
url: "recupera.php", //url: 'resultados.php?nombre='+nombre,
//data: "cajan="+$("#cajan").text(),
success: function(data)
{
alert("hola " + data.totalgeneral) // en la ejecucion dice "undefined"
$("#txtcantidadtotal").val(data.totalgeneral)
$("#txtdineroefectivo").val(data.totalefectivo)
$("#txtdinerotarjetas").val(data.totaltarjeta)
$("#txtdinerodocumentos").val(data.totalcheques)
$("#txtdineroparticular").val(data.totalparticular)
}
});
}
})//cuierra el jquery
</script>