<?php
 
session_start();
include("DMMYSQLG.php");

?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<body>
<?php

$result = mysqli_query($con ,"SELECT * FROM dginvacu WHERE nparte1 like '".$_POST['m2']."' order by n_reg");
@$resultado2=mysqli_fetch_array(mysqli_query($con ,"SELECT nparte1,np_desc1 FROM ctmesas WHERE ctmesas.modulo='".$_SESSION['mod_sis']."' AND   nparte1 like '".$_POST['m2']."'"));
?>
<form name="frm1" method="post" action="DI21100_DE.php">
  <table border='1' align="center">
    <tr>
      <th colspan="3">
        <div align="left"><input type="submit" name="Submit" value="Ver Detalle "></div>      </th>
      <th colspan="10">ACUMULADO DE <? echo $resultado2['nparte1'].'-'.$resultado2['np_desc1']?>&nbsp;</th>
    </tr>
    <tr>
	  <th><div align="center">Sel</div></th>
	  <th><div align="center">A&ntilde;o</div></th>
      <th><div align="center">Mes</div></th>
      <th><div align="center">Existencia Inicial</div></th>
      <th><div align="center">Compras</div></th>
	  <th><div align="center">Devolucion de Compra</div></th>
	  <th><div align="center">Transpaso Entrada</div></th>
	  <th><div align="center">Transpaso Salida</div></th>
	  <th><div align="center">Ventas</div></th>
      <th><div align="center">Devoluion de ventas</div></th>
      <th><div align="center">Requisicion Salida </div></th>
	  <th><div align="center">Requisicion Entrada </div></th>
	  <th><div align="center">Existencia Final</div></th>
    </tr>
	
		      <?php

	while($row = mysqli_fetch_array($result))
	{
		echo '<tr>';
		  echo '<td><div align="center"><input name="bot1" type="radio" value="'. $row["n_reg"].'"></div></td>';
		  echo "<td><div align='center'>" . $row["axo"]  . "</div></td>";
		  echo "<td><div align='center'>" . $row["mes"] . "</div></td>";
		  echo "<td><div align='center'>" . $row["exi_ini"] . "</div></td>";
		  echo "<td><div align='center'>" . $row["compras"]  . "</div></td>";
		  echo "<td><div align='center'>" . $row["dev_com"] . "</div></td>";
		  echo "<td><div align='center'>" . $row["tra_ent"] . "</div></td>";
		  echo "<td><div align='center'>" . $row["tra_sal"]  . "</div></td>";
		  echo "<td><div align='center'>" . $row["ventas"] . "</div></td>";
		  echo "<td><div align='center'>" . $row["dev_ven"] . "</div></td>";
		  echo "<td><div align='center'>" . $row["requi"]  . "</div></td>";
		  echo "<td><div align='center'>" . $row["dev_requi"] . "</div></td>";
		  echo "<td><div align='center'>" . $row["exi_fin"] . "</div></td>";
		 echo '</tr>';
	}
	mysqli_close($con);
	echo '<input name="bot" type="hidden" value="' . $_POST['m2'] . '"/>';
?>
	</tr>
  </table>
  <div align="center">
    <input type="submit" name="Submit2" value="Regresar" onClick="openpage('MS10000_CO.php','_self')">
  </div>
</form>
</body>
</html>
