<?php
require('../cfg/res.php');
$sql_cgrid='select *from cxco11 where enti="'.$_POST['idcxc'].'" and saldo >= 0.01 order by fecha';
//echo $sql_cgrid;
$res_cgrid=mysql_query($sql_cgrid,$link_vcrx);
if(mysql_num_rows($res_cgrid)!=0)
{
	$idcnum=1;
?>
<table cellpadding="5" cellspacing="0" style="border-collapse:collapse;" >
<tr style="border:solid 1px #000;">
	<th>DOCU</th>
	<th>PTONUMERO </th>
	<th>FECHA</th>
	<th>TOTAL</th>
	<th>SALDO</th>
    <th></th>
</tr>
<?php while($r_grid=mysql_fetch_assoc($res_cgrid)){?>
<tr style="border:solid 1px #000;">
	<td><?php echo $r_grid['docu'];?></td>
    <td><?php echo $r_grid['ptonumero'];?></td>
    <td><?php echo $r_grid['fechadmy'];?></td>
    <td><?php echo $r_grid['total'];?></td>
    <td><?php echo $r_grid['saldo'];?></td>
    <td><input type="text" value="0.00" class="idcnum_clase" id="idcnum<?php echo $idcnum;?>" style="border:solid 1px #000; width:50px; text-align:right;" /></td>
</tr>
<?php $idcnum++; }?>
</table>
<?php	
}
else
{
	echo '<h2>NO TIENE CXC PENDIENTES</h2>';
}
?>