<?php
 
session_start();
$com = "A";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
require_once("DFJQUERY.inc");
include("DF30000.inc");
?>
<html>
<link rel="stylesheet" href="css/estilo1.csss" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<style type="text/css">
<!--
.Estilo19 {font-size: 16px}
.Estilo22 {font-size: 11px}
.Estilo23 {font-size: 13px}
.Estilo24 {
	font-size: 18px;
	font-weight: bold;
}
-->
</style>
<script language="javascript">
function openWindow(dataGen,valores){
	var objDate=new Date();
	var getVars,getVarsAux,distPage;
	var idVentana;
	for(getVarsAux in valores){
		getVars +='&'+getVarsAux+'='+valores['+[a-z_]+'];
	}
	if(typeof dataGen.width=='undefined') dataGen.width='800';
	if(typeof dataGen.height=='undefined') dataGen.height='600';
	distPage='?tmr='+objDate.getHours()+objDate.getMinutes()+objDate.getSeconds()+objDate.getDay()+objDate.getMonth()+objDate.getFullYear();
	idVentana=window.open(dataGen.action+distPage+getVars,dataGen.name,'width='+dataGen.width+',height='+dataGen.height+',top=100,left=50,scrollbars=yes,menubar=yes,status=yes');
	return idVentana;
}
</script>
<script language="javascript">
$(document).ready(function(){
	function formatItem(row) {
		return " (<strong>" + row[1] + "</strong>)"+row[0];
	}
	$("#tap2").autocomplete('AL10800_AU.php',{
		minChars: 1,                 //Caracteres Minimos antes de autocompletar
		//max:3                        //maximo de resultados mostrados, se manda como limit en autosugestion
		delay: 200,                  //Retardo de autocompletar 
		width: 500,                  //ancho del cuadro de despliegue
		highlight: false,            //Resalta letras coincidentes
		autoFill: false,             //autocompleta en texto la posible palabra
		scroll: true,				 //si cuadro tiene barra scroll
		scrollHeight: 300,           //alto del cuadro para el scroll
		formatItem:formatItem,	     //formato de presentacion de las posibles busquedas
		extraParams:{tipBus:'d'}     //Parametros Extra a Mandar en autosugestion
	});
});
</script>

<script language="javascript">
function ocultaMuestra(divVent){
	if(divVent.style.display=='none'){
		divVent.style.display='';

	}else{
		divVent.style.display='none';

	}
}	
	</script>
<script language="javascript">
function sumaTex(){
	var objTex1=document.getElementById('maxe'),
		objTex2=document.getElementById('entradaf'),
		objTex9=document.getElementById('minf');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexw(){
	var objTex1=document.getElementById('mine'),
		objTex2=document.getElementById('entradaa'),
		objTex9=document.getElementById('maxm');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexz(){
	var objTex1=document.getElementById('maxf'),
		objTex2=document.getElementById('entradaj'),
		objTex9=document.getElementById('minm');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexx(){
	var objTex1=document.getElementById('maxma'),
		objTex2=document.getElementById('entradaag'),
		objTex9=document.getElementById('minma');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexb(){
	var objTex1=document.getElementById('maxj'),
		objTex2=document.getElementById('entradan'),
		objTex9=document.getElementById('minj');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexc(){
	var objTex1=document.getElementById('mina'),
		objTex2=document.getElementById('entradad'),
		objTex9=document.getElementById('maxa');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexd(){
	var objTex1=document.getElementById('maxag'),
		objTex2=document.getElementById('a3'),
		objTex9=document.getElementById('minag');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexe(){
	var objTex1=document.getElementById('minju'),
		objTex2=document.getElementById('a7'),
		objTex9=document.getElementById('maxs');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexf(){
	var objTex1=document.getElementById('maxju'),
		objTex2=document.getElementById('a11'),
		objTex9=document.getElementById('mino');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexg(){
	var objTex1=document.getElementById('maxo'),
		objTex2=document.getElementById('a15'),
		objTex9=document.getElementById('mins');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexh(){
	var objTex1=document.getElementById('minn'),
		objTex2=document.getElementById('a19'),
		objTex9=document.getElementById('mind');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexi(){
	var objTex1=document.getElementById('maxn'),
		objTex2=document.getElementById('a23'),
		objTex9=document.getElementById('maxd');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexj(){
	var objTex1=document.getElementById('b1'),
		objTex2=document.getElementById('a27'),
		objTex9=document.getElementById('b19');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexk(){
	var objTex1=document.getElementById('b12'),
		objTex2=document.getElementById('a31'),
		objTex9=document.getElementById('b110');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexl(){
	var objTex1=document.getElementById('b13'),
		objTex2=document.getElementById('a35'),
		objTex9=document.getElementById('b111');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexm(){
	var objTex1=document.getElementById('b14'),
		objTex2=document.getElementById('a39'),
		objTex9=document.getElementById('b112');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexn(){
	var objTex1=document.getElementById('b15'),
		objTex2=document.getElementById('a43'),
		objTex9=document.getElementById('b113');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexo(){
	var objTex1=document.getElementById('b16'),
		objTex2=document.getElementById('a47'),
		objTex9=document.getElementById('b114');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexp(){
	var objTex1=document.getElementById('b17'),
		objTex2=document.getElementById('a51'),
		objTex9=document.getElementById('b115');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexq(){
	var objTex1=document.getElementById('b18'),
		objTex2=document.getElementById('a55'),
		objTex9=document.getElementById('b116');
	objTex9.value=(parseFloat(objTex1.value)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexr(){
	var objTex1=document.getElementById('d1'),
		objTex2=document.getElementById('minf'),
		objTex9=document.getElementById('f1');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}
function descuenta(){
	var objTex1=document.getElementById('d2'),
		objTex2=document.getElementById('maxm'),
		objTex9=document.getElementById('f2');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentb(){
	var objTex1=document.getElementById('d3'),
		objTex2=document.getElementById('minm'),
		objTex9=document.getElementById('f3');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentc(){
	var objTex1=document.getElementById('d4'),
		objTex2=document.getElementById('minma'),
		objTex9=document.getElementById('f4');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentd(){
	var objTex1=document.getElementById('d5'),
		objTex2=document.getElementById('minj'),
		objTex9=document.getElementById('f5');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuente(){
	var objTex1=document.getElementById('d6'),
		objTex2=document.getElementById('maxa'),
		objTex9=document.getElementById('f6');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentf(){
	var objTex1=document.getElementById('d7'),
		objTex2=document.getElementById('minag'),
		objTex9=document.getElementById('f7');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentg(){
	var objTex1=document.getElementById('d8'),
		objTex2=document.getElementById('maxs'),
		objTex9=document.getElementById('f8');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuenth(){
	var objTex1=document.getElementById('d9'),
		objTex2=document.getElementById('mino'),
		objTex9=document.getElementById('f9');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuenti(){
	var objTex1=document.getElementById('d10'),
		objTex2=document.getElementById('mins'),
		objTex9=document.getElementById('f10');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentj(){
	var objTex1=document.getElementById('d11'),
		objTex2=document.getElementById('mind'),
		objTex9=document.getElementById('f11');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentk(){
	var objTex1=document.getElementById('d12'),
		objTex2=document.getElementById('maxd'),
		objTex9=document.getElementById('f12');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentl(){
	var objTex1=document.getElementById('d13'),
		objTex2=document.getElementById('b19'),
		objTex9=document.getElementById('f13');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentm(){
	var objTex1=document.getElementById('d14'),
		objTex2=document.getElementById('b110'),
		objTex9=document.getElementById('f14');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentn(){
	var objTex1=document.getElementById('d15'),
		objTex2=document.getElementById('b111'),
		objTex9=document.getElementById('f15');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuento(){
	var objTex1=document.getElementById('d16'),
		objTex2=document.getElementById('b112'),
		objTex9=document.getElementById('f16');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentp(){
	var objTex1=document.getElementById('d17'),
		objTex2=document.getElementById('b113'),
		objTex9=document.getElementById('f17');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentq(){
	var objTex1=document.getElementById('d18'),
		objTex2=document.getElementById('b114'),
		objTex9=document.getElementById('f18');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuentr(){
	var objTex1=document.getElementById('d19'),
		objTex2=document.getElementById('b115'),
		objTex9=document.getElementById('f19');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}function descuents(){
	var objTex1=document.getElementById('d20'),
		objTex2=document.getElementById('b116'),
		objTex9=document.getElementById('f20');
	objTex9.value=((parseFloat(objTex1.value)/100)*parseFloat(objTex2.value)).toFixed(2);
}
function sumaTexa(){
	var objTex1=document.getElementById('minf'),
		objTex2=document.getElementById('maxm'),
		objTex3=document.getElementById('minm'),
		objTex4=document.getElementById('minma'),
		objTex5=document.getElementById('minj'),
		objTex6=document.getElementById('maxa'),
		objTex7=document.getElementById('minag'),
		objTex8=document.getElementById('maxs'),
		objTex9=document.getElementById('mino'),
		objTex10=document.getElementById('mins'),
		objTex11=document.getElementById('mind'),
		objTex12=document.getElementById('maxd'),
		objTex13=document.getElementById('b19'),
		objTex14=document.getElementById('b110'),
		objTex15=document.getElementById('b111'),
		objTex16=document.getElementById('b112'),
		objTex17=document.getElementById('b113'),
		objTex18=document.getElementById('b114'),
		objTex19=document.getElementById('b115'),
		objTex20=document.getElementById('b116'),
		objTex21=document.getElementById('c1');
	objTex21.value=(parseFloat(objTex1.value)+parseFloat(objTex2.value)+parseFloat(objTex3.value)+parseFloat(objTex4.value)+parseFloat(objTex5.value)+parseFloat(objTex6.value)+parseFloat(objTex7.value)+parseFloat(objTex8.value)+parseFloat(objTex9.value)+parseFloat(objTex10.value)+parseFloat(objTex11.value)+parseFloat(objTex12.value)+parseFloat(objTex13.value)+parseFloat(objTex14.value)+parseFloat(objTex15.value)+parseFloat(objTex16.value)+parseFloat(objTex17.value)+parseFloat(objTex18.value)+parseFloat(objTex19.value)+parseFloat(objTex20.value)).toFixed(2);
}
</script>	
	
<body>

<form name="frm1" method="post" action="">
  <table width="501"  align="center">
    <tr>
      <th colspan="4">AGREGAR SALIDA DE ALMACEN POR REQUISICION </th>
    </tr>
    <tr>
      <td width="77">FOLIO. </td>
      <td width="408" colspan="3"><input name="tap2" id="tap2" type="text" tabindex="2" disabled="disabled">
        <input name="Submit22" type="Button" onClick="cargapag('AL10800_AC.php','_self')" value="Guardar">
      <input type="Button" name="Submit2" value="Regresar" onClick="envia1('AL10800_PR.php','_self')"></td>
    </tr> 
  </table>
  <div id="divVent" style="display:">
    <table width="998"  align="center"  >
      <tr>
        <td>DEPARTAMENTO.</td>
        <td colspan="3"><select name="unidad" id="unidad" tabindex="9">
          <option value="">-----SELECCIONE-----</option>
          <?php
 
$sql = mysqli_query($con ,"SELECT * FROM fdepartamento");
while($reg=mysqli_fetch_array($sql)){
	if($_POST['unidad']==$reg['np_desc1'] ){
		echo '<option value="' . $reg['np_desc1'] . '" selected>' . $reg['np_desc1'] . '</option>';
	}else{
		echo '<option value="' . $reg['np_desc1'] . '">' . $reg['np_desc1'] . '</option>';
	}
}
?>
        </select></td>
        <td colspan="4">&nbsp;</td>
      </tr>
      <tr>
        <td>CODIGO.</td>
        <td colspan="3"><label></label>          <label></label>
          <label>
          <select name="select" tabindex="18">
            <option value="COMIDAS A EMPLEADOS"<?php
 if($_REQUEST['select']=="COMIDAS A EMPLEADOS") echo 'selected';?>>COMIDAS A EMPLEADOS</option>
            <option value="SERVICIO DE COFFE BREAK"<?php
 if($_REQUEST['select']=="SERVICIO DE COFFE BREAK") echo 'selected';?>>SERVICIO DE COFFE BREAK</option>
			<option value="SERVICIO DEL MES"<?php
 if($_REQUEST['select']=="SERVICIO DEL MES") echo 'selected';?>>SERVICIO DEL MES</option>
			<option value="SERVICIOS ESPECIALES"<?php
 if($_REQUEST['select']=="SERVICIOS ESPECIALES") echo 'selected';?>>SERVICIOS ESPECIALES</option>
			<option value="SERVICIOS ESPECIALES OTROS"<?php
 if($_REQUEST['select']=="SERVICIOS ESPECIALES OTROS") echo 'selected';?>>SERVICIOS ESPECIALES OTROS</option>
			<option value="SERVICIOS ESPECIALES DEL DIA"<?php
 if($_REQUEST['select']=="SERVICIOS ESPECIALES DEL DIA") echo 'selected';?>>SERVICIOS ESPECIALES DEL DIA</option>
          </select>
          </label></td>
        <td colspan="4"><label></label></td>
      </tr>
      <tr>
        <td>FECHA. </td>
        <td width="185"><label>
          <input name="gfecini" type="text" class="emplea" id="gfecini" size="15" maxlength="15"
		  <?php
 
			  	echo 'value="'.date("d/m/Y").'"'; 
			  
			  ?>
		  />
          <input name="reset2" id="bot" type="image" value"Cal" src="logos/cal4.jpg" />
          <script type="text/javascript">
				  	Calendar.setup(
    					{
      						inputField  : "gfecini",        // ID of the input field
      						ifFormat    : "%d/%m/%Y",    // the date format
      						button      : "bot"      // ID of the button
    					}
  					);
				                </script>
        </label></td>
        <td>REQUISICION..</td>
        <td width="214"><label>
        <input name="tap2" id="tap2" type="text" tabindex="2"
		  onBlur="may(this)" size="20"
		<?php

			if(isset($_REQUEST['tap2'])){ 
				echo 'value="' . $_REQUEST['tap2'] .  '"';
			}
		?>>
        </label></td>
        <td colspan="2"><label>TOTAL DE ARTICULOS: </label></td>
        <td colspan="2"><label>
          <input type="text" name="textfield22">
        </label></td>
      </tr>
      <tr>
        <th>&nbsp;</th>
        <th>&nbsp;</th>
        <th>&nbsp;</th>
        <th>TOTALES:</th>
        <th><label>
          <input name="c1" type="text" id="c1" size="10">
        </label></th>
        <th colspan="2">&nbsp;</th>
        <th>&nbsp;</th>
      </tr>
      <tr>
        <th><span class="Estilo23">CODIGO.</span></th>
        <th>DESCRIPCION.</th>
        <th>SALIDAS.</th>
        <th>COSTO.</th>
        <th width="111"><span class="Estilo23">IMPORTE.</span></th>
        <th colspan="2">%I.V.A. </th>
        <th>BUSCAR ARTICULO. </th>
      </tr>
      <tr>
        <td><input name="entradae" type="text" id="entradae" tabindex="25" size="12"/></td>
        <td><input name="salidae" type="text" id="salidae" tabindex="25" size="30"/></td>
        <td><input name="maxe" type="text" id="maxe" tabindex="25" size="10" onKeyUp="sumaTex()" value="0"/></td>
        <td><input name="entradaf" type="text" id="entradaf" tabindex="25" size="10" />
          <span class="Estilo24">x
          <input name="salidaf" type="text" id="salidaf" tabindex="25" size="12"/>
          </span></td>
        <td><input name="minf" type="text" id="minf" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0" /></td>
        <td colspan="2"><label>
          <input name="d1" type="text" id="d1" size="6" onKeyUp="sumaTexr()" value="0">
          <input name="f1" type="text" id="f1" size="8">
        </label></td>
        <td width="148"><input name="?32" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'entradae',
			des:'salidae',
			por:'entradaf',
			mel:'salidaf'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td width="86"><input name="entradam" type="text" id="entradam" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradam'])){ //este es el truco
					echo 'value="' . $_POST['entradam'] .  '"';
				}
			?>/></td>
        <td><input name="salidam" type="text" id="salidam" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidam'])){ //este es el truco
					echo 'value="' . $_POST['salidam'] .  '"';
				}
			?>/></td>
        <td width="69"><input name="mine" type="text" id="mine" tabindex="25" size="10" onKeyUp="sumaTexw()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['mine'])){ //este es el truco
					echo 'value="' . $_POST['mine'] .  '"';
				}
			?>/></td>
        <td><input name="entradaa" type="text" id="entradaa" tabindex="25" size="10"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradaa'])){ //este es el truco
					echo 'value="' . $_POST['entradaa'] .  '"';
				}
			?>/>
        <span class="Estilo24">x
        <input name="salidaa" type="text" id="salidaa" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidaa'])){ //este es el truco
					echo 'value="' . $_POST['salidaa'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="maxm" type="text" id="maxm" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxm'])){ //este es el truco
					echo 'value="' . $_POST['maxm'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d2" type="text" id="d2" size="6" onKeyUp="descuenta()" value="0">
        <input name="f2" type="text" id="f2" size="8"></td>
        <td><input name="?322" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'entradam',
			des:'salidam',
			por:'entradaa',
			mel:'salidaa'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="entradama" type="text" id="entradama" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradama'])){ //este es el truco
					echo 'value="' . $_POST['entradama'] .  '"';
				}
			?>/></td>
        <td><input name="salidama" type="text" id="salidama" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidama'])){ //este es el truco
					echo 'value="' . $_POST['salidama'] .  '"';
				}
			?>/></td>
        <td><input name="maxf" type="text" id="maxf" tabindex="25" size="10" onKeyUp="sumaTexz()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxf'])){ //este es el truco
					echo 'value="' . $_POST['maxf'] .  '"';
				}
			?>/></td>
        <td><input name="entradaj" type="text" id="entradaj" tabindex="25" size="10"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradaj'])){ //este es el truco
					echo 'value="' . $_POST['entradaj'] .  '"';
				}
			?>/>
          <span class="Estilo24">x
          <input name="salidaj" type="text" id="salidaj" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidaj'])){ //este es el truco
					echo 'value="' . $_POST['salidaj'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="minm" type="text" id="minm" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['minm'])){ //este es el truco
					echo 'value="' . $_POST['minm'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d3" type="text" id="d3" size="6" onKeyUp="descuentb()" value="0">
        <input name="f3" type="text" id="f3" size="8"></td>
        <td><input name="?3222" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'entradama',
			des:'salidama',
			por:'entradaj',
			mel:'salidaj'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><label>
          <input name="entradaju" type="text" id="entradaju" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradaju'])){ //este es el truco
					echo 'value="' . $_POST['entradaju'] .  '"';
				}
			?>/>
        </label></td>
        <td><label></label>          <label></label>          <label>
          <input name="salidaju" type="text" id="salidaju" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidaju'])){ //este es el truco
					echo 'value="' . $_POST['salidaju'] .  '"';
				}
			?>/>
        </label></td>
        <td><label>
          <input name="maxma" type="text" id="maxma" tabindex="25" size="10" onKeyUp="sumaTexx()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxma'])){ //este es el truco
					echo 'value="' . $_POST['maxma'] .  '"';
				}
			?>/>
        </label></td>
        <td><label>
          <input name="entradaag" type="text" id="entradaag" tabindex="25" size="10"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradaag'])){ //este es el truco
					echo 'value="' . $_POST['entradaag'] .  '"';
				}
			?>/>
          <span class="Estilo24">x
          <input name="salidaag" type="text" id="salidaag" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidaag'])){ //este es el truco
					echo 'value="' . $_POST['salidaag'] .  '"';
				}
			?>/>
        </span></label></td>
        <td><input name="minma" type="text" id="minma" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['minma'])){ //este es el truco
					echo 'value="' . $_POST['minma'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d4" type="text" id="d4" size="6" onKeyUp="descuentc()" value="0">
        <input name="f4" type="text" id="f4" size="8"></td>
        <td><input name="?32222" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'entradaju',
			des:'salidaju',
			por:'entradaag',
			mel:'salidaag'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td width="86"><input name="entradas" type="text" id="entradas" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradas'])){ //este es el truco
					echo 'value="' . $_POST['entradas'] .  '"';
				}
			?>/></td>
        <td><input name="salidas" type="text" id="salidas" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidas'])){ //este es el truco
					echo 'value="' . $_POST['salidas'] .  '"';
				}
			?>/></td>
        <td width="69"><input name="maxj" type="text" id="maxj" tabindex="25" size="10" onKeyUp="sumaTexb()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxj'])){ //este es el truco
					echo 'value="' . $_POST['maxj'] .  '"';
				}
			?>/></td>
        <td><input name="entradan" type="text" id="entradan" tabindex="25" size="10"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradan'])){ //este es el truco
					echo 'value="' . $_POST['entradan'] .  '"';
				}
			?>/>
          <span class="Estilo24">x
          <input name="salidan" type="text" id="salidan" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidan'])){ //este es el truco
					echo 'value="' . $_POST['salidan'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="minj" type="text" id="minj" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['minj'])){ //este es el truco
					echo 'value="' . $_POST['minj'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d5" type="text" id="d5" size="6" onKeyUp="descuentd()" value="0">
        <input name="f5" type="text" id="f5" size="8"></td>
        <td><input name="?322222" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'entradas',
			des:'salidas',
			por:'entradan',
			mel:'salidan'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="entradao" type="text" id="entradao" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradao'])){ //este es el truco
					echo 'value="' . $_POST['entradao'] .  '"';
				}
			?>/></td>
        <td><input name="salidao" type="text" id="salidao" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidao'])){ //este es el truco
					echo 'value="' . $_POST['salidao'] .  '"';
				}
			?>/></td>
        <td><input name="mina" type="text" id="mina" tabindex="25" size="10" onKeyUp="sumaTexc()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['mina'])){ //este es el truco
					echo 'value="' . $_POST['mina'] .  '"';
				}
			?>/></td>
        <td><input name="entradad" type="text" id="entradad" tabindex="25" size="10"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradad'])){ //este es el truco
					echo 'value="' . $_POST['entradad'] .  '"';
				}
			?>/>
          <span class="Estilo24">x</span>
        <input name="salidad" type="text" id="salidad" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidad'])){ //este es el truco
					echo 'value="' . $_POST['salidad'] .  '"';
				}
			?>/></td>
        <td><input name="maxa" type="text" id="maxa" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxa'])){ //este es el truco
					echo 'value="' . $_POST['maxa'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d6" type="text" id="d6" size="6" onKeyUp="descuente()" value="0">
        <input name="f6" type="text" id="f6" size="8"></td>
        <td><input name="?3222222" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'entradao',
			des:'salidao',
			por:'entradad',
			mel:'salidad'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td width="86"><input name="a1" type="text" id="a1" tabindex="25" size="12"/></td>
        <td><input name="a2" type="text" id="a2" tabindex="25" size="30"/></td>
        <td width="69"><input name="maxag" type="text" id="maxag" tabindex="25" size="10" onKeyUp="sumaTexd()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxag'])){ //este es el truco
					echo 'value="' . $_POST['maxag'] .  '"';
				}
			?>/></td>
        <td><input name="a3" type="text" id="a3" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a4" type="text" id="a4" tabindex="25" size="12"/>
        </span></td>
        <td><input name="minag" type="text" id="minag" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['minag'])){ //este es el truco
					echo 'value="' . $_POST['minag'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d7" type="text" id="d7" size="6" onKeyUp="descuentf()" value="0">
        <input name="f7" type="text" id="f7" size="8"></td>
        <td><input name="?32222222" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a1',
			des:'a2',
			por:'a3',
			mel:'a4'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="a5" type="text" id="a5" tabindex="25" size="12"/></td>
        <td><input name="a6" type="text" id="a6" tabindex="25" size="30"/></td>
        <td><input name="minju" type="text" id="minju" tabindex="25" size="10" onKeyUp="sumaTexe()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['minju'])){ //este es el truco
					echo 'value="' . $_POST['minju'] .  '"';
				}
			?>/></td>
        <td><input name="a7" type="text" id="a7" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a8" type="text" id="a8" tabindex="25" size="12"/>
        </span></td>
        <td><input name="maxs" type="text" id="maxs" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxs'])){ //este es el truco
					echo 'value="' . $_POST['maxs'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d8" type="text" id="d8" size="6" onKeyUp="descuentg()" value="0">
        <input name="f8" type="text" id="f8" size="8"></td>
        <td><input name="?32222223" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a5',
			des:'a6',
			por:'a7',
			mel:'a8'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td width="86"><input name="a9" type="text" id="a9" tabindex="25" size="12"/></td>
        <td><input name="a10" type="text" id="a10" tabindex="25" size="30"/></td>
        <td width="69"><input name="maxju" type="text" id="maxju" tabindex="25" size="10" onKeyUp="sumaTexf()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxju'])){ //este es el truco
					echo 'value="' . $_POST['maxju'] .  '"';
				}
			?>/></td>
        <td><input name="a11" type="text" id="a11" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a12" type="text" id="a12" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidad'])){ //este es el truco
					echo 'value="' . $_POST['salidad'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="mino" type="text" id="mino" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['mino'])){ //este es el truco
					echo 'value="' . $_POST['mino'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d9" type="text" id="d9" size="6" onKeyUp="descuenth()" value="0">
        <input name="f9" type="text" id="f9" size="8"></td>
        <td><input name="?32222224" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a9',
			des:'a10',
			por:'a11',
			mel:'a12'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="a13" type="text" id="a13" tabindex="25" size="12"/></td>
        <td><input name="a14" type="text" id="a14" tabindex="25" size="30"/></td>
        <td><input name="maxo" type="text" id="maxo" tabindex="25" size="10" onKeyUp="sumaTexg()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxo'])){ //este es el truco
					echo 'value="' . $_POST['maxo'] .  '"';
				}
			?>/></td>
        <td><input name="a15" type="text" id="a15" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a16" type="text" id="a16" tabindex="25" size="12"/>
        </span></td>
        <td><input name="mins" type="text" id="mins" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['mins'])){ //este es el truco
					echo 'value="' . $_POST['mins'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d10" type="text" id="d10" size="6" onKeyUp="descuenti()" value="0">
        <input name="f10" type="text" id="f10" size="8"></td>
        <td><input name="?32222225" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a13',
			des:'a14',
			por:'a15',
			mel:'a16'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="a17" type="text" id="a17" tabindex="25" size="12"/></td>
        <td><input name="a18" type="text" id="a18" tabindex="25" size="30"/></td>
        <td><input name="minn" type="text" id="minn" tabindex="25" size="10" onKeyUp="sumaTexh()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['minn'])){ //este es el truco
					echo 'value="' . $_POST['minn'] .  '"';
				}
			?>/></td>
        <td><input name="a19" type="text" id="a19" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a20" type="text" id="a20" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidad'])){ //este es el truco
					echo 'value="' . $_POST['salidad'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="mind" type="text" id="mind" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['mind'])){ //este es el truco
					echo 'value="' . $_POST['mind'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d11" type="text" id="d11" size="6" onKeyUp="descuentj()" value="0">
        <input name="f11" type="text" id="f11" size="8"></td>
        <td><input name="?32222226" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a17',
			des:'a18',
			por:'a19',
			mel:'a20'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="a21" type="text" id="a21" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradao'])){ //este es el truco
					echo 'value="' . $_POST['entradao'] .  '"';
				}
			?>/></td>
        <td><input name="a22" type="text" id="a22" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidao'])){ //este es el truco
					echo 'value="' . $_POST['salidao'] .  '"';
				}
			?>/></td>
        <td><input name="maxn" type="text" id="maxn" tabindex="25" size="10" onKeyUp="sumaTexi()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxn'])){ //este es el truco
					echo 'value="' . $_POST['maxn'] .  '"';
				}
			?>/></td>
        <td><input name="a23" type="text" id="a23" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a24" type="text" id="a24" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidad'])){ //este es el truco
					echo 'value="' . $_POST['salidad'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="maxd" type="text" id="maxd" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxd'])){ //este es el truco
					echo 'value="' . $_POST['maxd'] .  '"';
				}
			?>/></td>
        <td colspan="2"><label>
          <input name="d12" type="text" id="d12" size="6" onKeyUp="descuentk()" value="0">
          <input name="f12" type="text" id="f12" size="8">
        </label></td>
        <td><input name="?32222227" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a21',
			des:'a22',
			por:'a23',
			mel:'a24'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="a25" type="text" id="a25" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradao'])){ //este es el truco
					echo 'value="' . $_POST['entradao'] .  '"';
				}
			?>/></td>
        <td><input name="a26" type="text" id="a26" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['a26'])){ //este es el truco
					echo 'value="' . $_POST['a26'] .  '"';
				}
			?>/></td>
        <td><input name="b1" type="text" id="b1" tabindex="25" size="10" onKeyUp="sumaTexj()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['b1'])){ //este es el truco
					echo 'value="' . $_POST['b1'] .  '"';
				}
			?>/></td>
        <td><input name="a27" type="text" id="a27" tabindex="25" size="10"/>
          <span class="Estilo24">x
          <input name="a28" type="text" id="a28" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidad'])){ //este es el truco
					echo 'value="' . $_POST['salidad'] .  '"';
				}
			?>/>
          </span></td>
        <td><input name="b19" type="text" id="b19" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxn'])){ //este es el truco
					echo 'value="' . $_POST['maxn'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d13" type="text" id="d13" size="6" onKeyUp="descuentl()" value="0">
        <input name="f13" type="text" id="f13" size="8"></td>
        <td><input name="?32222228" type="button" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a25',
			des:'a26',
			por:'a27',
			mel:'a28'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="a29" type="text" id="a29" tabindex="25" size="12"/></td>
        <td><input name="a30" type="text" id="a30" tabindex="25" size="30"/></td>
        <td><input name="b12" type="text" id="b12" tabindex="25" size="10" onKeyUp="sumaTexk()" value="0"/></td>
        <td><input name="a31" type="text" id="a31" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a32" type="text" id="a32" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidad'])){ //este es el truco
					echo 'value="' . $_POST['salidad'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="b110" type="text" id="b110" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxn'])){ //este es el truco
					echo 'value="' . $_POST['maxn'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d14" type="text" id="d14" size="6" onKeyUp="descuentm()" value="0">
        <input name="f14" type="text" id="f14" size="8"></td>
        <td><input name="?10" type="button" id="?10" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a29',
			des:'a30',
			por:'a31',
			mel:'a32'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="a33" type="text" id="a33" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradao'])){ //este es el truco
					echo 'value="' . $_POST['entradao'] .  '"';
				}
			?>/></td>
        <td><input name="a34" type="text" id="a34" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidao'])){ //este es el truco
					echo 'value="' . $_POST['salidao'] .  '"';
				}
			?>/></td>
        <td><input name="b13" type="text" id="b13" tabindex="25" size="10" onKeyUp="sumaTexl()" value="0"/></td>
        <td><input name="a35" type="text" id="a35" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a36" type="text" id="a36" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidad'])){ //este es el truco
					echo 'value="' . $_POST['salidad'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="b111" type="text" id="b111" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxn'])){ //este es el truco
					echo 'value="' . $_POST['maxn'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d15" type="text" id="d15" size="6" onKeyUp="descuentn()" value="0">
        <input name="f15" type="text" id="f15" size="8"></td>
        <td><input name="?102" type="button" id="?102" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a33',
			des:'a34',
			por:'a35',
			mel:'a36'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="a37" type="text" id="a37" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradao'])){ //este es el truco
					echo 'value="' . $_POST['entradao'] .  '"';
				}
			?>/></td>
        <td><input name="a38" type="text" id="a38" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidao'])){ //este es el truco
					echo 'value="' . $_POST['salidao'] .  '"';
				}
			?>/></td>
        <td><input name="b14" type="text" id="b14" tabindex="25" size="10" onKeyUp="sumaTexm()" value="0"/></td>
        <td><input name="a39" type="text" id="a39" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a40" type="text" id="a40" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidad'])){ //este es el truco
					echo 'value="' . $_POST['salidad'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="b112" type="text" id="b112" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxn'])){ //este es el truco
					echo 'value="' . $_POST['maxn'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d16" type="text" id="d16" size="6" onKeyUp="descuento()" value="0">
        <input name="f16" type="text" id="f16" size="8"></td>
        <td><input name="?103" type="button" id="?103" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a37',
			des:'a38',
			por:'a39',
			mel:'a40'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="a41" type="text" id="a41" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradao'])){ //este es el truco
					echo 'value="' . $_POST['entradao'] .  '"';
				}
			?>/></td>
        <td><input name="a42" type="text" id="a42" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidao'])){ //este es el truco
					echo 'value="' . $_POST['salidao'] .  '"';
				}
			?>/></td>
        <td><input name="b15" type="text" id="b15" tabindex="25" size="10" onKeyUp="sumaTexn()" value="0"/></td>
        <td><input name="a43" type="text" id="a43" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a44" type="text" id="a44" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidad'])){ //este es el truco
					echo 'value="' . $_POST['salidad'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="b113" type="text" id="b113" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxn'])){ //este es el truco
					echo 'value="' . $_POST['maxn'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d17" type="text" id="d17" size="6" onKeyUp="descuentp()" value="0">
        <input name="f17" type="text" id="f17" size="8"></td>
        <td><input name="?104" type="button" id="?104" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a41',
			des:'a42',
			por:'a43',
			mel:'a44'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="a45" type="text" id="a45" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradao'])){ //este es el truco
					echo 'value="' . $_POST['entradao'] .  '"';
				}
			?>/></td>
        <td><input name="a46" type="text" id="a46" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidao'])){ //este es el truco
					echo 'value="' . $_POST['salidao'] .  '"';
				}
			?>/></td>
        <td><input name="b16" type="text" id="b16" tabindex="25" size="10" onKeyUp="sumaTexo()" value="0"/></td>
        <td><input name="a47" type="text" id="a47" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a48" type="text" id="a48" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidad'])){ //este es el truco
					echo 'value="' . $_POST['salidad'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="b114" type="text" id="b114" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxn'])){ //este es el truco
					echo 'value="' . $_POST['maxn'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d18" type="text" id="d18" size="6" onKeyUp="descuentq()" value="0">
        <input name="f18" type="text" id="f18" size="8"></td>
        <td><input name="?105" type="button" id="?105" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a45',
			des:'a46',
			por:'a47',
			mel:'a48'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><input name="a49" type="text" id="a49" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradao'])){ //este es el truco
					echo 'value="' . $_POST['entradao'] .  '"';
				}
			?>/></td>
        <td><input name="a50" type="text" id="a50" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidao'])){ //este es el truco
					echo 'value="' . $_POST['salidao'] .  '"';
				}
			?>/></td>
        <td><input name="b17" type="text" id="b17" tabindex="25" size="10" onKeyUp="sumaTexp()" value="0"/></td>
        <td><input name="a51" type="text" id="a51" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a52" type="text" id="a52" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidad'])){ //este es el truco
					echo 'value="' . $_POST['salidad'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="b115" type="text" id="b115" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxn'])){ //este es el truco
					echo 'value="' . $_POST['maxn'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d19" type="text" id="d19" size="6" onKeyUp="descuentr()" value="0">
        <input name="f19" type="text" id="f19" size="8"></td>
        <td><input name="?106" type="button" id="?106" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a49',
			des:'a50',
			por:'a51',
			mel:'a52'
		})" value="Buscar Articulo" ></td>
      </tr>
      <tr>
        <td><label>
          <input name="a53" type="text" id="a53" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['entradao'])){ //este es el truco
					echo 'value="' . $_POST['entradao'] .  '"';
				}
			?>/>
        </label></td>
        <td><input name="a54" type="text" id="a54" tabindex="25" size="30"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidao'])){ //este es el truco
					echo 'value="' . $_POST['salidao'] .  '"';
				}
			?>/></td>
        <td><input name="b18" type="text" id="b18" tabindex="25" size="10" onKeyUp="sumaTexq()" value="0"/></td>
        <td><input name="a55" type="text" id="a55" tabindex="25" size="10"/>
        <span class="Estilo24">x
        <input name="a56" type="text" id="a56" tabindex="25" size="12"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['salidad'])){ //este es el truco
					echo 'value="' . $_POST['salidad'] .  '"';
				}
			?>/>
        </span></td>
        <td><input name="b116" type="text" id="b116" tabindex="25" size="10" onKeyUp="sumaTexa()" value="0"
	  onBlur="may(this)"
	  		<?php

				if(isset($_POST['maxn'])){ //este es el truco
					echo 'value="' . $_POST['maxn'] .  '"';
				}
			?>/></td>
        <td colspan="2"><input name="d20" type="text" id="d20" size="6" onKeyUp="descuents()" value="0">
        <input name="f20" type="text" id="f20" size="8"></td>
        <td><input name="?107" type="button" id="?107" onClick="
	  	openWindow(
		{
			action:'AL10800_AG1.php',
			width:700,
			height:350
		},{
			val:'a53',
			des:'a54',
			por:'a55',
			mel:'a56'
		})" value="Buscar Articulo" ></td>
      </tr>
    </table>
  </div>
</form>
</body>
</html>
<?php
 mysqli_close($con);?>
