<?php
function vrinves1d($grupo,$idnum,$fini,$ffin)
{
	if(isset($_POST['fini']) && !empty($_POST['fini']))
	{
		$fini=$_POST['fini'];
	}
	else
	{
		$fini=date('2000-01-01');
	}
	
	if(isset($_POST['ffin']) && !empty($_POST['ffin']))
	{
		$ffin=$_POST['ffin'];
	}
	else
	{
		$ffin=date('Y-m-d');
	}

	
	
	require('../cfg/res.php');
	mysql_query("SET NAMES 'utf8'");



?>


<?php
        $sql_item ='select * from inve12 where item='.$idnum.' order by fecha desc, idnum1' ;
	//echo $sql_item; 
        $res_item=mysql_query($sql_item,$link_vcrx);


?>



<div style="overflow-y:scroll; height:250px; font-size:12px;">



<table id="tabla_inves1"  border="0" width="90%" cellpadding="2" cellspacing="0" style="border-collapse:collapse">

<tr align="center" style="background: #F7F7F7; border-top:solid 1px#000;border-bottom:solid 1px#000">


	<th>DOCU</th>
	<th>PTO/NUMERO</th>
	<th>FECHA</th>
	<th>INGRESO</th>
	<th>EGRESO</th>
	<th>.</th>
	<th>BODE</th>
	<th>NOMBRE</th>
	<th>DETALLE</th>
	<th>ST</th>
</tr>
<?php 
$filax=0; 

while($r_item=mysql_fetch_assoc($res_item))
{ ?>

<tr style=" <?php if($filax!=3){$filax++;}else{echo 'border-bottom:dotted 1px #000000;'; $filax=0;}?> ">

  <td align="center"><?php echo $r_item['docu']; ?></td>
  <td align="center"><?php echo $r_item['ptonumero']; ?></td>
  <td align="center"><?php echo $r_item['fechadmy']; ?></td>
  <td align="right"><?php if($r_item['tingreso']!=0){echo number_format($r_item['tingreso'],$r_item['duni']);} ?></td>
  <td align="right"><?php if($r_item['tegreso']!=0){echo '<i>'.number_format($r_item['tegreso'],$r_item['duni']);} ?></td>
  <th></th>
  <td align="left"><?php echo $r_item['bode']; ?></td>
  <td align="left"><?php echo $r_item['enti_descri']; ?></td>
  <td align="left"><?php echo $r_item['concepto'].' /'.$r_item['detalle']; ?></td>
  <td align="center"><?php echo $r_item['status']; ?></td>


</tr>

<?php }?>

</table>
<hr/>

<div>

<?php }?>