<!DOCTYPE html>
<html lang="es-ES">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Parametros Reporte Balance de Sumas y Saldos</title>
<link href="../../maincss.css" rel="stylesheet" type="text/css" />
<link href="../../chosen/chosen.css" rel="stylesheet" />
<link href="../../tcal.css" rel="stylesheet" type="text/css" />
<!--
<script language="javascript" src="js/jquery-1.3.min.js"></script>
-->
<script language="javascript" src="../../js/tcal.js" type="text/javascript"></script>
<script language="javascript" src="../../js/jquery-3.4.1.js"></script>
<script type="text/javascript" src="../../chosen/chosen.jquery.js"></script>
<script language="javascript" src="../../js/validar.js"></script>

</head>
<?php
include "../../conn.php";
include "../../general.php";
$usuario = $_GET["user"];

//tipo de cc
$result2 = mysqli_query($link, "select pkyCostCenterType as codigo, fldName as nombre 
from 
actCostCenterType 
where 
sysEnabled = 1 and sysAuthorized = 1;");

//tipo de cc agrupar
$result22 = mysqli_query($link, "select pkyCostCenterType as codigo, fldName as nombre 
from 
actCostCenterType 
where 
sysEnabled = 1 and sysAuthorized = 1;");

//lista contexto
$result3 = mysqli_query($link, "select pkyContext as cod_contexto, fldName as contexto, codCostCenter as cod_cc 
from srvContext
where 
sysEnabled = 1 and sysAuthorized = 1;");

?>
<body>
	<?php

//inicio del reporte Balance de Sumas y Saldos 

?>
<table border="0" align="left" width="100%" cellpadding="5">
<tr><td><b>Empresa: <?php echo $nombre_empresa; ?><br/>NIT: <?php echo $mi_nit; ?></b>
</td><td align="right"><b>Fecha: <?php echo date("Y-m-d"); ?><br/>Hora: <?php echo date("H:i:s"); ?><br/>Usuario: <?php echo $usuario; ?><br/>F</b>
</td></tr></table><br/>
<table border="0" align="center" cellpadding="5"><tr><td colspan="2" align="center">
<b>Par&aacute;metros Reporte Balance de Sumas y Saldos</b></td></tr><tr><td>
<form id="miform" name="miform" method="post" action="report.php?rep=3&tipo=1" onsubmit="return Validar()">
<br/><b>Usuario: </b></td><td> <br/><input type="text" name="usuario" value="<?php echo $usuario; ?>" size="20" readonly="readonly" class="formulario" style="color:#999;">
</td></tr><tr><td>
<br/><b>Mostrar 4 columnas: </b></td><td> <br/><input type="radio" name="columnas4" checked="checked" value="0" class="formulario"> No
<br/><input type="radio" name="columnas4" value="1" class="formulario"> Si
</td></tr><tr><td>
<br/><b>Contexto: </b></td><td> <br/><!--<SELECT NAME="concepto_pago" class="formulario">-->
	<select data-placeholder="Seleccione..." class="chzn-select" style="width:300px;" NAME="contexto">
    <option value="-1">Todos</option>
	<?php 
	while ($row = mysqli_fetch_array($result3)) {   
	?> 
	<option value="<?php echo $row['cod_contexto']?>"><?php echo $row['cod_contexto']?> - <?php echo $row['contexto']?></option> 
	<?php 
	}  
	mysqli_free_result($result3);
	?> 
    </select>
</td></tr><tr><td>
<br/><b>Centros de Costo: </b></td><td><br/><!--<SELECT NAME="cliente" class="formulario">-->
<select data-placeholder="Seleccione..." class="chzn-select" style="width:300px;" NAME="centrocosto">
	<option value="-1">Ninguno</option>
	<?php 
	while ($row = mysqli_fetch_array($result2)) {   
	?> 
	<option value="<?php echo $row['codigo']?>"><?php echo $row['codigo']?> - <?php echo $row['nombre']?></option> 
	<?php 
	}  
	mysqli_free_result($result2);
	?>
    </select>
</td></tr><tr><td>
<br/><b>Centros de Costo <br />(para Agrupar): </b></td><td><br/><!--<SELECT NAME="cliente" class="formulario">-->
<select data-placeholder="Seleccione..." class="chzn-select" style="width:300px;" NAME="centrocosto_agrupar">
	<option value="-1">Ninguno</option>
	<?php 
	while ($row = mysqli_fetch_array($result22)) {   
	?> 
	<option value="<?php echo $row['codigo']?>"><?php echo $row['codigo']?> - <?php echo $row['nombre']?></option> 
	<?php 
	}  
	mysqli_free_result($result22);
	?>
    </select>
	<br />Solamente seleccionar cuando se tenga DOS tipos de  
	<br />Centros de Costo, asignados a las mismas cuentas contables.
	<br />Este será el Centro de Costo de <b>agrupación principal</b>.
</td></tr><tr><td>
<br/><b>Asiento con CC: </b></td><td> <br/><input type="radio" name="asientocc" checked="checked" value="0" class="formulario"> No
<br/><input type="radio" name="asientocc" value="1" class="formulario"> Si
</td></tr><tr><td>
<br/><b>Niveles: </b></td><td> <br/><!--<SELECT NAME="niveles" class="formulario">-->
<select data-placeholder="Seleccione..." class="chzn-select" style="width:90px;" NAME="niveles">
	<option value="<?php echo $numero_niveles ?>">Todos</option>
    <?php 
	$i = 1;
	while ($i <= $numero_niveles) {   
	?> 
    <option value="<?php echo $i ?>">Nivel <?php echo $i?></option> 
	<?php 
	$i++;
	}  
	?> 
    </SELECT>
</td></tr><tr><td>
<br/><b>Mostrar saldos en cero: </b></td><td> <br/><input type="radio" name="muestra_cero" checked="checked" value="0" class="formulario"> No
<br/><input type="radio" name="muestra_cero" value="1" class="formulario"> Si

</td></tr><tr><td>
<br/><b>Mostrar columna <br />Sin Centro de Costo,<br /> cuando todos los CC <br />son cero: </b></td><td> <br/><input type="radio" name="muestra_sin_cc" checked="checked" value="1" class="formulario"> Si
<br/><input type="radio" name="muestra_sin_cc" value="0" class="formulario"> No

</td></tr><tr><td>
<br/><b>De Fecha: </b></td><td> <br/><div><input type="text" id="fechaini" name="fechaini" value="<?php echo $fechaini_gest; ?>" length="10" maxlength="10" class="tcal" title="aaaa-mm-dd"> </div>aaaa-mm-dd
</td></tr><tr><td>
<br/><b>A Fecha: </b></td><td> <br/><div><input type="text" id="fechafin" name="fechafin" value="<?php echo $fecha_hoy; ?>" length="10" maxlength="10" class="tcal" title="aaaa-mm-dd"> </div>aaaa-mm-dd
</td></tr><tr><td colspan="2" align="center">
<br/><br/><INPUT TYPE="submit" VALUE="Generar Reporte" class="boton_generar"></td></tr>
<script type="text/javascript"> $(".chzn-select").chosen({no_results_text: "No se encontraron resultados con "}); $(".chzn-select-deselect").chosen({allow_single_deselect:true}); </script>
</form>
</table>

</body>
</html>
