<?php
session_start();
$ruta='../';
require_once("covensol_apr_c_cxp.php");
$objcxp = new covensol_apr_c_cxp();
$objcxp->io_conexiones->decodificar_post();
$datos = $objcxp->io_conexiones->asignar_post();
$rsSolic = $objcxp->SelecSolicitudes($datos);
?>
<link href="../shared/css/catalogos.css" rel="stylesheet" type="text/css">
<?php 
$ancho[0] = 30;
$ancho[10] = 30;
$ancho[1] = 100;
$ancho[2] = 30;
$ancho[3] = 350;
$ancho[4] = 50;
$ancho[5] = 70;
$ancho[6] = 70;
$ancho[7] = 70;
$ancho[8] = 70;
$ancho[8] = 50;
$ancho_total = array_sum($ancho);
$i=0;
?>

<table width="<?php echo $ancho_total; ?>" border="0" cellpadding="0" cellspacing="0"  class='fondo-tabla'>
  <tr class="titulo-celda">
     <td width="<?php echo $ancho[0]; ?>"><input type="checkbox" name="chktodas" id="chktodas" value="0" checked="checked" onclick="marcar_todas(this)"></td>
     <td width="<?php echo $ancho[10]; ?>"></td>
     <td width="<?php echo $ancho[1]; ?>"><div align="center">N°</div></td> 
     <td width="<?php echo $ancho[2]; ?>"><div align="center">TIPO</div></td> 
     <td width="<?php echo $ancho[3]; ?>"><div align="center">NOMBRE</div></td>   
     <td width="<?php echo $ancho[4]; ?>"><div align="center">ESTATUS</div></td>   
     <td width="<?php echo $ancho[5]; ?>"><div align="center">MONTO</div></td>   
     <td width="<?php echo $ancho[6]; ?>"><div align="center">BRUTO</div></td>   
     <td width="<?php echo $ancho[7]; ?>"><div align="center">PAGADO</div></td>   
     <td width="<?php echo $ancho[8]; ?>"><div align="center">PENDIENTE</div></td>
     <td width="<?php echo $ancho[8]; ?>"><div align="center">AŅO</div></td>   
       
     
  </tr>
  <?php foreach($rsSolic as $fila) { ?>
          <?php
		  	$seguridad = true;	
			if($seguridad){	
			
			//$aceptar="aceptar('".$fila['sc_cuenta']."','".$fila['status']."')";
			$colorfila = ($fila['estprosol']=='C')?'class="celdas-blancas"':'class="celdas-azules"';
			$i++;
		   // $aceptar = ($fila['status']=='S')?"alert('No es una Cuenta de Movimiento !');":$aceptar;
			
			    switch ($fila['estprosol'])
				{
					case 'E':
						$estatus='Emitida';
						break;
					case 'C':
						$estatus='Contabilizada';
						break;
					case 'A':
						$estatus='Anulada';
						break;
					case 'S':
						$estatus='Prog. Pago';
						break;
					case 'P':
						$estatus='Pagada';
						break;
					case "N":
						$estatus="Anulada sin Afectacion";
						break;
				}
			
		   ?>    
                  <tr <?php echo $colorfila; ?> >
                    <td width="<?php echo $ancho[0]; ?>" ><input type="checkbox" name="chksolic" id="chksolic" value="<?php echo $fila['numsol'];?>" checked="checked" ></td>
                    <td width="<?php echo $ancho[10]; ?>"><div align="right"><?php echo $i;?></div></td>
                    <td width="<?php echo $ancho[1]; ?>"><div align="center" style="color:#0000CC"><?php echo $fila['numsol'];?></div></td>
                    <td width="<?php echo $ancho[2]; ?>"><div align="center"><?php echo $fila['tipproben'];?></div></td>
                    <td width="<?php echo $ancho[3]; ?>"><div align="left"><?php echo $fila['nombre'];?></div></td>
                    <td width="<?php echo $ancho[4]; ?>"><div align="center"><?php echo $estatus;?></div></td>
                    <td width="<?php echo $ancho[5]; ?>"><div align="right"><?php echo $fila['monsol'];?></div></td>
                    <td width="<?php echo $ancho[6]; ?>"><div align="right"><?php echo $fila['monbruto'];?></div></td>
                    <td width="<?php echo $ancho[7]; ?>"><div align="right"><?php echo $fila['monpag'];?></div></td>
                    <td width="<?php echo $ancho[8]; ?>"><div align="right"><?php echo $fila['monsol']-$fila['monpag'] ;?></div></td>
                    <td width="<?php echo $ancho[9]; ?>"><div align="center"><?php echo $fila['ano'];?></div></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#BBBBBB" colspan="3">
                    			<input name="hdenominacion<?php echo $fila['sc_cuenta'];?>" type="hidden" id="hdenominacion<?php echo $fila['sc_cuenta'];?>"  value="<?php echo $fila['denominacion']; ?>"/>
                      	</td>
                  </tr>
          <?php } ?>
  <?php }  ?>
</table>
    