<?php
ini_set("session.cookie_lifetime",60*60*10);
ini_set("session.gc_maxlifetime", 60*60*10);
	session_start();	
	//-------------------------	
	include("cls_conexion.php");$CNN=new ClsMySQL();include("conexion23.php");
	if(strlen($_SESSION['SYS_USER_ID'])==0){JsDir("login.php");	return;}
	//
if(vbval($_SESSION['SYS_USER_GI'])!=USU_GET_GI($_SESSION['SYS_USER_ID'])){
	JsDir("cerrar.php");	
	return;
}
//	
	$StrGT="";
	$LStrMsg="";
	$LStrFoc="";
	$LStrMM="";
	$StrAlm=V($_POST['CboAlm']);
	$StrDex=V($_POST['TxtDex']);
	$StrHax=V($_POST['TxtHax']);
	if($_SESSION['SYS_USER_ALM']=="%"){
		if(strlen($StrAlm)==0)$StrAlm=GetSO("alm_obs","almacenes","id_almacen>0","alm_obs");
	}else{
		$StrAlm=$_SESSION['SYS_USER_ALM'];
	}
	if(strlen($StrDex)==0) $StrDex=date("d-m-y");
	if(strlen($StrHax)==0) $StrHax=date("d-m-y");
	include("resumen_fun.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=utf-8" />
<title>Cuadre de caja (En soles)</title>
<script type="text/javascript" src="fe/funciones.js"></script>
<script type="text/javascript" src="fe/resumen.js"></script>
<style type="text/css">
<!--
#TAB_CAPTION .estilo888 {
	color: #000;
}
-->
</style><style type="text/css">
<!--
body {
	background-color: #CCC;
	background-image: url();
}
#Layer1 {
	position:absolute;
	left:345px;
	top:115px;
	width:123px;
	height:35px;
	z-index:1;
}
.centrarFrm{
	width:800px;
	height:800px;
	position:absolute;
	left:50%;
	top:30%;
	background-color:#006699;
	margin:-200px 0 0 -400px;
}
#Layer2 {
	position:absolute;
	left:409px;
	top:205px;
	width:82px;
	height:24px;
	z-index:1;
}
.Estilo1 {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #FFFFFF;
}
.f2 {font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: #FFFFFF; font-size: 12px; }
.Estilo3 {color: #FFFFFF; font-size: 12px; font-family: Arial, Helvetica, sans-serif;}
.Estilo4 {color: #000099}
.Estilo5 {color: #000000}
#Frm center #DivFRM #layer .Estilo1 strong {
	color: #900;
}
#Frm center #DivFRM #layer3 .f2 table tr td {
	color: #000;
}
#Frm center #DivFRM #layer3 .f2 table tr td table tr td {
	color: #FFF;
}
.sFA {	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #FF3;
	font-size: 12px;
}

-->
</style>

</head>
<body  <?php echo $LStrMsg;?>>
<form id="Frm" name="Frm" method="post" action="resumen.php">
<center> 
  <div Id="DivFRM"  class="centrarFrm"  >
    <div id="layer4" style="position:absolute; left: 31px; top: 85px; width: 672px; height: 26px;">
      <div align="left" class="f2">
<input name="CmdB" type="button" id="CmdG" value="Procesar" 
onclick="fGuardar();" style="width:80px" tabindex="17"/>
<input name="CmdB" type="button" id="CmdZ" 
value="Menu" onclick="fBuscar('menu.php');"  tabindex="22"/>
      </div>
  </div>
    <div id="layer" style="position:absolute; left: 116px; top: 21px; width: 412px; height: 45px; z-index: 100;">
      <div align="left" class="Estilo1">
        <input name="TxtId" type="hidden" id="TxtId" value="<?php echo $StrId;?>"/>
		<input name="TxtAc" type="hidden" id="TxtAc" value="" />
		<input name="TxtPag" type="hidden" id="TxtPag" value="<?php echo $LStrPag; ?>" />
        <input name="TxtRuc_" type="hidden" id="TxtRuc_"  />        
        <input name="TxtIdCliente" type="hidden" id="TxtIdCliente" 
        value="<?php echo $StrIdCliente; ?>"   />        
      <strong>CUADRE DE CAJA (En soles)</strong>
      </div>
      <div id="DivDatosProd">
      	<input name="Pro_TxtId" type="hidden" id="Pro_TxtId" value=""/>
        <input name="Pro_TxtDes" type="hidden" id="Pro_TxtDes" value=""/>
        <input name="Pro_TxtPre" type="hidden" id="Pro_TxtPre" value=""/>
        <input name="Pro_TxtPreM" type="hidden" id="Pro_TxtPreM" value=""/>
        <input name="Pro_TxtCod" type="hidden" id="Pro_TxtCod" value=""/>
      </div>
  </div>
    <div id="LblTit" style="position:absolute; left: 52px; top: 15px; width: 64px; z-index: 100;">
      <div align="left" class="Estilo1">
      <img src="img/ventas.png" width="64" height="53" / onclick="fGetProdDatos_Id('2');"></div>
</div>
    <div id="layer8" style="position:absolute; left: 0px; top: 0px; width: 800px; height: 79px; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000; z-index: 0;">
      <div align="left" class="Estilo1">        
      </div>
</div>
    <div id="layer6" style="position:absolute; left: 171px; top: 122px; width: 54px;">
      <div align="left" class="f2">DESDE </div>
    </div>
        <input name="TxtDex" type="text" id="TxtDex" style="position:absolute; left: 170px; top: 156px; width: 83px;" 
          value="<?php echo $StrDex;?>"  
          onkeydown="return SoloFec(this,event,'TxtHax');" 
          tabindex="2" />

    <div id="layer25" style="position:absolute; left: 31px; top: 137px; width: 79px;">
      <div align="left" class="f2">ALMACEN</div>
</div>
        <select name="CboAlm" id="CboAlm" style="position:absolute; left: 31px; top: 156px; width: 130px;" 
onkeydown="return SoloTextoEx(event,'TxtDex');" tabindex="0">
        <?php echo ListALM($StrAlm); ?>
        </select>

    <div id="layer27" style="position:absolute; left: 171px; top: 137px; width: 79px;">
      <div align="left" class="f2">(dd-mm-yy)</div>
    </div>
    <div id="layer2" style="position:absolute; left: 273px; top: 122px; width: 54px;">
      <div align="left" class="f2">HASTA </div>
</div>
<div id="layer3" style="position:absolute; left: 275px; top: 137px; width: 79px;">
  <div align="left" class="f2">(dd-mm-yy)</div>
</div>
<input name="TxtHax" type="text" id="TxtHax" style="position:absolute; left: 276px; top: 156px; width: 95px;" 
value="<?php echo $StrHax;?>"  
onkeydown="return SoloFec(this,event,'CmdB');" 
tabindex="2" />

<div id="layer9" style="position:absolute; left: 31px; top: 188px; width: 360px; height: 572px; background-color: #666666; layer-background-color: #666666; border: 1px none #000000;">
  <div align="left" class="f2">
    <table width="358" border="0">
      <tr>
        <td colspan="2">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td colspan="2">CUADRO GENERAL</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td colspan="2">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td colspan="2" style="color:#FF0">INGRESOS</td>
        <td width="73">&nbsp;</td>
        <td width="28">&nbsp;</td>
        </tr>
      <tr>
        <td width="30">&nbsp;</td>
        <td width="209" style="background:#999; color:#000">CAJA CHICA</td>
        <td align="right" style="background:#999; color:#000"><?php echo $_CAJ_CHI; ?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>VENTAS AL CONTADO</td>
        <td align="right"><?php echo $_VEN_CON;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>VENTAS AL CREDITO</td>
        <td align="right"><?php echo $_VEN_CRE;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>VENTAS CON DEPOSITO</td>
        <td align="right"><?php echo $_VEN_DEP;?></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>VENTAS CON TARJETA</td>
        <td align="right"><?php echo $_VEN_TAR;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td  style="background:#999; color:#000">TOTAL VENTAS</td>
        <td align="right" style="background:#999; color:#000"><?php echo $_VEN_TOT;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td align="right">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td style="background:#999; color:#000">OTROS INGRESOS</td>
        <td align="right" style="background:#999; color:#000"><?php echo $_OTR_ING;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td style="background:#999; color:#000">COBROS DE VENTAS AL CREDITO</td>
        <td align="right" style="background:#999; color:#000"><?php echo $_COB_CRE;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td style="color:#FF0">TOTAL INGRESOS</td>
        <td align="right" style="color:#FF0"><?php echo $_TOT_ING;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td colspan="2" style="color:#FC0">EGRESOS</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>COMPRAS AL CONTADO</td>
        <td align="right"><?php echo $_COM_CON;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>COMPRAS AL CREDITO</td>
        <td align="right"><?php echo $_COM_CRE;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>COMPRAS CON TARJETA</td>
        <td align="right"><?php echo $_COM_TAR;?></td>
        <td>&nbsp;</td>
        </tr>
       <tr>
        <td>&nbsp;</td>
        <td  style="background:#999; color:#000">TOTAL COMPRAS</td>
        <td align="right" style="background:#999; color:#000"><?php echo $_COM_TOT;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td align="right">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td style="background:#999; color:#000">OTROS EGRESOS</td>
        <td align="right" style="background:#999; color:#000"><?php echo $_OTR_EGR;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td style="background:#999; color:#000">PAGOS DE COMPRAS AL CREDITO</td>
        <td align="right" style="background:#999; color:#000"><?php echo $_PAG_CRE;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td style="color:#FC0">TOTAL EGRESOS</td>
        <td align="right" style="color:#FC0"><?php echo $_TOT_EGR;?></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
    </table>
  </div>
</div>
<div id="layer10" style="position:absolute; left: 411px; top: 188px; width: 360px; height: 572px; background-color: #666666; layer-background-color: #666666; border: 1px none #000000;">
  <div align="left" class="f2">
    <table width="358" border="0">
      <tr>
        <td colspan="2">&nbsp;</td>
        <td width="73">&nbsp;</td>
        <td width="28">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2">RESUMEN GENERAL DE NETOS</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td width="30">&nbsp;</td>
        <td width="209" style="color:#FF0">TOTAL INGRESOS</td>
        <td align="right" style="color:#FF0"><?php echo $_TOT_ING;?></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td align="right">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>(VENTAS AL CREDITO)</td>
        <td align="right">(<?php echo $_VEN_CRE;?>)</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>(VENTAS CON DEPOSITO)</td>
        <td align="right">(<?php echo $_VEN_DEP;?>)</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>(VENTAS CON TARJETA)</td>
        <td align="right">(<?php echo $_VEN_TAR;?>)</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td align="right">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td style="color:#FF0">TOTAL INGRESOS NETO</td>
        <td  align="right" style="color:#FF0"><?php echo $_TOT_ING_NET;?></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td style="color:#FC0">TOTAL EGRESOS</td>
        <td align="right" style="color:#FC0"><?php echo $_TOT_EGR;?></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>(COMPRAS AL CREDITO)</td>
        <td align="right">(<?php echo $_COM_CRE;?>)</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>(COMPRAS CON TARJETA)</td>
        <td align="right">(<?php echo $_COM_TAR;?>)</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td style="color:#FC0">TOTAL EGRESOS NETO</td>
        <td align="right" style="color:#FC0"><?php echo $_TOT_EGR_NET;?></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td bgcolor="#333333" style="color:#FF0">TOTAL INGRESOS NETO</td>
        <td align="right" bgcolor="#333333" style="color:#FF0"><?php echo $_TOT_ING_NET;?></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td bgcolor="#333333" style="color:#FC0">(TOTAL EGRESOS NETO)</td>
        <td align="right" bgcolor="#333333" style="color:#FC0">(<?php echo $_TOT_EGR_NET;?>)</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td bgcolor="#333333">SALDO NETO EN EFECTIVO</td>
        <td align="right" bgcolor="#333333"><?php echo $_NETO;?></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
  </div>
</div>
  </div>
</center>	
        </form>
</body>
</html>
