<?php
session_start();

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>

<script src="assets/js/funciones.js"></script>


<style type="text/css">
<!--
body {cursor: default; } 

.Estilo16 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	letter-spacing: -1px;
	padding:2px;
}
.Estilo20 {color: #FFFFFF; font-family: Arial, Helvetica, sans-serif; font-weight: normal; font-size: 14px; }
-->
</style>
</head>



<body>
<table width="758" border="0" cellpadding="1" cellspacing="1">
  <tr>
    <td width="2" height="31" bgcolor="#397AA8"><div align="center"></div></td>
    <td width="86" bgcolor="#397AA8"><div align="center">
      <div align="center"><span class="Estilo20">Nro. operaci&oacute;n </span></div>
    </div></td>
    <td width="116" bgcolor="#397AA8"><div align="center">
      <div align="left"><span class="Estilo20">Tipo operaci&oacute;n </span></div>
    </div></td>
    <td width="148" bgcolor="#397AA8"><div align="left"><span class="Estilo20">Fecha</span></div></td>
    <td width="194" bgcolor="#397AA8"><div align="left"><span class="Estilo20">Persona </span></div></td>
    <td width="171" bgcolor="#397AA8"><div align="left"><span class="Estilo20">Anotaciones</span></div></td>
    <td width="19" bgcolor="#397AA8">&nbsp;</td>
  </tr>
  
  

	<?
	@$xid=$_REQUEST['xid'];
	@$xaccion3=$_REQUEST['xaccion3'];
	@$xcriterio2=$_REQUEST['xcriterio2'];	
	
	@$xs_empresa=$_SESSION['s_empresa'];				
	
	include("conexion.php");	
		
		
	$result1=mysqli_query($conexion,"SELECT * FROM orden_pedido_almacen opa
									INNER JOIN operacion_almacen oa ON opa.opealm_codi_fk = oa.opealm_codi
									LEFT JOIN operacion_tipo ot ON oa.opetip_codi_fk=ot.opetip_codi
									LEFT JOIN documento_tipo dt ON oa.doctip_codi_fk=dt.doctip_codi
									LEFT JOIN personas p ON oa.per_codi_fk=p.per_codi
									WHERE opa.ordped_codi_fk=$xid AND opealm_estado=1;");
		
	$nregistros = mysqli_num_rows($result1);
	?>
	
	<script language="javascript">
	parent.document.getElementById('d_nregistros').innerHTML="<?php echo $nregistros;?> productos encontrados";
	</script>	
	
	<?php
	$nn=0;
	while($row1=mysqli_fetch_array($result1)){
		$nn=$nn+1;
	
	?>
   
  <tr id="tr<?php echo $nn;?>" style=" cursor:default; background-color:#FFFFFF;" ondblclick="javascript: parent.frame_menus_formularios.document.fmenu_almacen_salida_filtrado.xcriterio.value='<?php echo $row1['opealm_numero'];?>'; 
	parent.frame_menus_formularios.document.fmenu_almacen_salida_filtrado.xfiltrado.value='1'; 
	parent.frame_menus_formularios.document.fmenu_almacen_salida_filtrado.submit(); return false;" onMouseOver="resaltar('#F9F38A',this.id);" onMouseOut="resaltar('#FFFFFF',this.id);" >
    <td class="Estilo16"></td>
    <td class="Estilo16"><?php echo $row1['opealm_numero'];?></td>
    <td class="Estilo16"><a href="#" onClick="javascript: parent.frame_menus_formularios.document.fmenu_almacen_salida_filtrado.xcriterio.value='<?php echo $row1['opealm_numero'];?>'; 
	parent.frame_menus_formularios.document.fmenu_almacen_salida_filtrado.xfiltrado.value='1'; 
	parent.frame_menus_formularios.document.fmenu_almacen_salida_filtrado.submit(); return false;"  ><?php echo $row1['opetip_nombre'];?></a></td>
	
	
    <td class="Estilo16"><?php echo date("d/m/Y H:i:s",strtotime($row1['opealm_fechahora'])); ?></td>
		  
		  
    <td class="Estilo16"><?php echo $row1['per_nombre_comercial'];?></td>
    <td class="Estilo16"><?php echo $row1['opealm_anotaciones'];?></td>
    <td class="Estilo16">&nbsp;</td>
  </tr>
  
	<?
	}
	?>
</table>


<div align="left">
  <iframe id="frame_pedidos_detalle_item" name="frame_pedidos_detalle_item" width="10" height="10" frameborder="0" scrolling="No" marginheight="0" marginwidth="0" allowtransparency="AllowTransparency"></iframe>
</div>

</body>
</html>
