<?php
session_start();
require_once($ruta."clases/covensol_cxc_c_cuentasxcobrar.php");
$objcxc = new covensol_cxc_cuentasxcobrar();
$objcxc->io_conexiones->decodificar_post();
$opciones = $objcxc->io_conexiones->asignar_post();
$resultado = $objcxc->ConsultaConceptosCXC($opciones);
?>
<link href="../shared/css/catalogos.css" rel="stylesheet" type="text/css">
<?php 
$ancho[1] = 120;
$ancho[2] = 250;
$ancho[3] = 60;
$ancho[4] = 140;
$ancho[5] = 60;
$ancho[6] = 60;

$ancho_total = array_sum($ancho);

$nro = 1;

?>

<style type="text/css">
<!--
.Estilo2 {color: #000000}
-->
</style>
<table width="<?php echo $ancho_total; ?>" border="0" cellpadding="0" cellspacing="0"  class='fondo-tabla'>
  <tr class="titulo-celda">
     <td width="<?php echo $ancho[1]; ?>"><div align="center">Código Art.</div></td>    
     <td width="<?php echo $ancho[2]; ?>"><div align="center">Descripción</div></td>
     <td width="<?php echo $ancho[3]; ?>"><div align="center">Tipo</div></td>
     <td width="<?php echo $ancho[4]; ?>"><div align="center">Monto</div></td> 
     <td width="<?php echo $ancho[5]; ?>"><div align="center">IVA</div></td> 
  </tr>
    <?php foreach($resultado['rs'] as $fila){ ?>
          <?php
		  	$seguridad = true;	
			if($seguridad or $_SESSION['autent_administrador']){	 ?>
			   <?php 
               	   if($fila['tipconcep']=='NC'){$fila['tipconcep']='CONNC';}
				   if($fila['tipconcep']=='ND'){$fila['tipconcep']='CONND';}   
                   $aceptar="aceptar('".$nro."',
                                     '".$fila['codconsep']."',
                                     '".number_format($fila['porcentaje_iva'],2,',','.')."',
                                     '".$fila['tipconcep']."',
                                     '".number_format($fila['monconsep'],2,',','.')."')";
                    
               ?>    																										
                  <tr id="consulta">
                    <td width="<?php echo $ancho[1]; ?>" valign="top"><div align="left"><a href="#" onClick="<?php echo $aceptar;?>"><div style="color:#0066FF;"><?php echo $fila['codconsep'];?></div></a></div></td>
                  	<td width="<?php echo $ancho[2]; ?>"><div align="left"><a href="#" onClick="<?php echo $aceptar;?>"><?php echo $fila['denconsep'];?></a></div></td>
                    <td width="<?php echo $ancho[3]; ?>"><div align="center"><a href="#" onClick="<?php echo $aceptar;?>"><?php echo $fila['tipconcep'];?></a></div></td>
                    <td width="<?php echo $ancho[4]; ?>"><div align="center"><a href="#" onClick="<?php echo $aceptar;?>"><?php echo number_format($fila['monconsep'],2,',','.'); ?></a></div></td>
                    <td width="<?php echo $ancho[5]; ?>"><div align="right"><a href="#" onClick="<?php echo $aceptar;?>"><?php echo number_format($fila['porcentaje_iva'],2,',','.');?></a></div></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#BBBBBB" colspan="3">
                    			<input name="hdenconsep<?php echo $nro;?>" type="hidden" id="hdenconsep<?php echo $nro;?>"  value="<?php echo $fila['denconsep']; ?>"/>
                   	</td>
                  </tr>
          <?php 
		  $nro++;
		  } ?>
  <?php } ?>
</table>
    