<?php
 
session_start();
$com = "C";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
require_once("DFJQUERY.inc");
include("DF80000.php");
?>

<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<style type="text/css">
<!--
.Estilo4 {
	font-family: Arial, Helvetica, sans-serif;
	color: #FFFFFF;
	font-weight: bold;
}
.Estilo5 {font-size: 12px}
.Estilo18 {color: #FFFFFF}
.Estilo19 {font-size: 16px}
.Estilo20 {color: #FFFFFF; font-weight: bold; }
-->
</style>
<script language="javascript">
$(document).ready(function(){
	function formatItem(row) {
		return " (<strong>" + row[1] + "</strong>)"+row[0];
	}
	$("#tap2").autocomplete('DYAUTPRODERIK.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>
	
	
<body>


<?php

if ($_POST['bot']==""){
	echo '<h2>!!! SELECCIONE UN REGISTRO !!!</h2>';
	echo '<meta content="1; url=AL10100_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	
	include('AL10100_CL.php');
	$varible_clase = new clase();
	$res=$varible_clase->lista_busqueda($_POST["bot"]);
	$reg=mysqli_fetch_array($res);
	    $_REQUEST['afe_inv']=$reg['afe_inv'];
		$_REQUEST['cos_prom']=$reg['cos_prom'];
		$_REQUEST['cod_var']=$reg['cod_var'];
		$_REQUEST['fic_tec']=$reg['fic_tec'];
		$_REQUEST['num_pun']=$reg['num_pun'];		
		$_REQUEST['tip_pre']=$reg['tip_pre'];		
		$_REQUEST['per_mod']=$reg['per_mod'];
		$_REQUEST['por_des']=$reg['por_des'];
		$_REQUEST['afe_coman']=$reg['afe_coman'];
		$_REQUEST['cve_iva_ven']=$reg['cve_iva_ven'];
		$_REQUEST['almacen']=$reg['almacen'];
		$_REQUEST['factor']=$reg['factor'];
		$_REQUEST['unidad']=$reg['unidad'];
		$_REQUEST['capacidad']=$reg['capacidad'];
		$_REQUEST['invmin']=$reg['invmin'];
		$_REQUEST['invmax']=$reg['invmax'];
		$_REQUEST['ultimoc']=$reg['ultimoc'];
		$_REQUEST['costop']=$reg['costop'];
		$_REQUEST['existencia']=$reg['existencia'];
		$_REQUEST['maxe']=$reg['maxe'];
		$_REQUEST['maxf']=$reg['maxf'];
		$_REQUEST['maxm']=$reg['maxm'];
		$_REQUEST['maxa']=$reg['maxa'];
		$_REQUEST['maxma']=$reg['maxma'];
		$_REQUEST['maxj']=$reg['maxj'];
		$_REQUEST['maxju']=$reg['maxju'];
		$_REQUEST['maxag']=$reg['maxag'];
		$_REQUEST['maxs']=$reg['maxs'];
		$_REQUEST['maxo']=$reg['maxo'];
		$_REQUEST['maxn']=$reg['maxn'];
		$_REQUEST['maxd']=$reg['maxd'];
		$_REQUEST['mine']=$reg['mine'];
		$_REQUEST['minf']=$reg['minf'];
		$_REQUEST['minm']=$reg['minm'];
		$_REQUEST['mina']=$reg['mina'];
		$_REQUEST['minma']=$reg['minma'];
		$_REQUEST['minj']=$reg['minj'];
		$_REQUEST['minju']=$reg['minju'];
		$_REQUEST['minag']=$reg['minag'];
		$_REQUEST['mins']=$reg['mins'];
		$_REQUEST['mino']=$reg['mino'];
		$_REQUEST['minn']=$reg['minn'];
		$_REQUEST['mind']=$reg['mind'];
		$_REQUEST['entradae']=$reg['entradae'];
		$_REQUEST['entradaf']=$reg['entradaf'];
		$_REQUEST['entradam']=$reg['entradam'];
		$_REQUEST['entradaa']=$reg['entradaa'];
		$_REQUEST['entradama']=$reg['entradama'];
		$_REQUEST['entradaj']=$reg['entradaj'];
		$_REQUEST['entradaju']=$reg['entradaju'];
		$_REQUEST['entradaag']=$reg['entradaag'];
		$_REQUEST['entradas']=$reg['entradas'];
		$_REQUEST['entradao']=$reg['entradao'];
		$_REQUEST['entradan']=$reg['entradan'];
		$_REQUEST['entradad']=$reg['entradad'];
		$_REQUEST['salidae']=$reg['salidae'];
		$_REQUEST['salidaf']=$reg['salidaf'];
		$_REQUEST['salidam']=$reg['salidam'];
		$_REQUEST['salidaa']=$reg['salidaa'];
		$_REQUEST['salidama']=$reg['salidama'];
		$_REQUEST['salidaj']=$reg['salidaj'];
		$_REQUEST['salidaju']=$reg['salidaju'];
		$_REQUEST['salidaag']=$reg['salidaag'];
		$_REQUEST['salidas']=$reg['salidas'];
		$_REQUEST['salidao']=$reg['salidao'];
		$_REQUEST['salidan']=$reg['salidan'];
		$_REQUEST['salidad']=$reg['salidad'];
		$_REQUEST['gfecini']=chfecha($reg['gfecini'],'Y-m-d','d/m/Y');
		//$_REQUEST['gfecini']=$reg['gfecini'];
		$_REQUEST['p1']=$reg['p1'];
		$_REQUEST['p2']=$reg['p2'];
		$_REQUEST['a1']=$reg['a1'];
		$_REQUEST['a2']=$reg['a2'];
		$_REQUEST['a5']=$reg['a5'];
		$_REQUEST['a6']=$reg['a6'];
		$_REQUEST['a9']=$reg['a9'];
		$_REQUEST['a10']=$reg['a10'];
		$_REQUEST['a13']=$reg['a13'];
		$_REQUEST['a14']=$reg['a14'];
		$_REQUEST['a17']=$reg['a17'];
		$_REQUEST['a18']=$reg['a18'];
		$_REQUEST['a21']=$reg['a21'];
		$_REQUEST['a22']=$reg['a22'];
		$_REQUEST['a25']=$reg['a25'];
		$_REQUEST['a26']=$reg['a26'];
		$_REQUEST['a29']=$reg['a29'];
		$_REQUEST['a30']=$reg['a30'];
		$_REQUEST['a33']=$reg['a33'];
		$_REQUEST['a34']=$reg['a34'];
		$_REQUEST['a37']=$reg['a37'];
		$_REQUEST['a38']=$reg['a38'];
		$_REQUEST['a41']=$reg['a41'];
		$_REQUEST['a42']=$reg['a42'];
		$_REQUEST['a45']=$reg['a45'];
		$_REQUEST['a46']=$reg['a46'];
		$_REQUEST['a49']=$reg['a49'];
		$_REQUEST['a50']=$reg['a50'];
		$_REQUEST['a53']=$reg['a53'];
		$_REQUEST['a54']=$reg['a54'];
		$_REQUEST['b1']=$reg['b1'];
		$_REQUEST['b12']=$reg['b12'];
		$_REQUEST['b13']=$reg['b13'];
		$_REQUEST['b14']=$reg['b14'];
		$_REQUEST['b15']=$reg['b15'];
		$_REQUEST['b16']=$reg['b16'];
		$_REQUEST['b17']=$reg['b17'];
		$_REQUEST['b18']=$reg['b18'];
		$_REQUEST['a4']=$reg['a4'];
		$_REQUEST['a8']=$reg['a8'];
		$_REQUEST['a12']=$reg['a12'];
		$_REQUEST['a16']=$reg['a16'];
		$_REQUEST['a20']=$reg['a20'];
		$_REQUEST['a24']=$reg['a24'];
		$_REQUEST['a28']=$reg['a28'];
		$_REQUEST['a32']=$reg['a32'];
		$_REQUEST['a36']=$reg['a36'];
		$_REQUEST['a40']=$reg['a40'];
		$_REQUEST['a44']=$reg['a44'];
		$_REQUEST['a46']=$reg['a46'];
		$_REQUEST['a48']=$reg['a48'];
        $_REQUEST['a52']=$reg['a52'];
		$_REQUEST['a56']=$reg['a56'];
		$_REQUEST['a3']=$reg['a3'];
		$_REQUEST['a7']=$reg['a7'];
		$_REQUEST['a11']=$reg['a11'];
		$_REQUEST['a15']=$reg['a15'];
		$_REQUEST['a19']=$reg['a19'];
		$_REQUEST['a23']=$reg['a23'];
		$_REQUEST['a27']=$reg['a27'];
		$_REQUEST['a31']=$reg['a31'];
		$_REQUEST['a35']=$reg['a35'];
		$_REQUEST['a39']=$reg['a39'];
		$_REQUEST['a43']=$reg['a43'];
		$_REQUEST['a47']=$reg['a47'];
		$_REQUEST['a51']=$reg['a51'];
		$_REQUEST['a55']=$reg['a55'];
		$_REQUEST['b19']=$reg['b19'];
		$_REQUEST['b110']=$reg['b110'];
		$_REQUEST['b111']=$reg['b111'];
		$_REQUEST['b112']=$reg['b112'];
		$_REQUEST['b113']=$reg['b113'];
		$_REQUEST['b114']=$reg['b114'];
		$_REQUEST['b115']=$reg['b115'];
		$_REQUEST['b116']=$reg['b116'];
		$_REQUEST['d1']=$reg['d1'];
		$_REQUEST['d2']=$reg['d2'];
		$_REQUEST['d3']=$reg['d3'];
		$_REQUEST['d4']=$reg['d4'];
		$_REQUEST['d5']=$reg['d5'];
		$_REQUEST['d6']=$reg['d6'];
		$_REQUEST['d7']=$reg['d7'];
		$_REQUEST['d8']=$reg['d8'];
		$_REQUEST['d9']=$reg['d9'];
		$_REQUEST['d10']=$reg['d10'];
		$_REQUEST['d11']=$reg['d11'];
		$_REQUEST['d12']=$reg['d12'];
		$_REQUEST['d13']=$reg['d13'];
		$_REQUEST['d14']=$reg['d14'];
		$_REQUEST['d15']=$reg['d15'];
		$_REQUEST['d16']=$reg['d16'];
		$_REQUEST['d17']=$reg['d17'];
		$_REQUEST['d18']=$reg['d18'];
		$_REQUEST['d19']=$reg['d19'];
		$_REQUEST['d20']=$reg['20'];	
		$_REQUEST['f1']=$reg['f1'];
		$_REQUEST['f2']=$reg['f2'];
		$_REQUEST['f3']=$reg['f3'];
		$_REQUEST['f4']=$reg['f4'];
		$_REQUEST['f5']=$reg['f5'];
		$_REQUEST['f6']=$reg['f6'];
		$_REQUEST['f7']=$reg['f7'];
		$_REQUEST['f8']=$reg['f8'];
		$_REQUEST['f9']=$reg['f9'];
		$_REQUEST['f10']=$reg['f10'];
		$_REQUEST['f11']=$reg['f11'];
		$_REQUEST['f12']=$reg['f12'];
		$_REQUEST['f13']=$reg['f13'];
		$_REQUEST['f14']=$reg['f14'];
		$_REQUEST['f15']=$reg['f15'];
		$_REQUEST['f16']=$reg['f16'];
		$_REQUEST['f17']=$reg['f17'];
		$_REQUEST['f18']=$reg['f18'];
		$_REQUEST['f19']=$reg['f19'];
		$_REQUEST['f20']=$reg['f20'];
		}								
		?>

<form name="frm1" method="post" action="" enctype="multipart/form-data">
  <table width="735"  align="center">
    <tr>
      <th colspan="4">ARTICULOS</th>
    </tr>
    <tr>
      <td width="150">FOLIO DE ORDEN.</td>
      <td width="867" colspan="3"><input name="tap2" id="tap2" type="text" tabindex="2"></td>
    </tr>
  </table>
  <div id="divVent" style="display:">
    <table width="823"  align="center"  >
     <tr>
        <td width="74">ORDEN DE COMPRA.</td>
        <td colspan="3"><label>
        <input name="tap2" id="tap2" type="text" tabindex="2" disabled="disabled"
		  onBlur="may(this)" size="60"
		 <?php
 
		if(isset($_REQUEST['bot'])){
		echo 'value="'.$reg['np_desc1'].'"';
		}
		?>>
        </label></td>
        <td colspan="2">TIPO DE COMPRA:
          <select name="select" tabindex="18">
            <option value="CONTADO"<?php
if($_REQUEST['select']=="CONTADO") echo 'selected';?>>CONTADO</option>
            <option value="CREDITO"<?php
if($_REQUEST['select']=="CREDITO") echo 'selected';?>>CREDITO</option>
          </select></td>
      </tr>
      
	  
	  
	  
	  
	  <tr>
        <td>PROVEEDOR.</td>
        <td colspan="3">          <label>
			<input name="p1" type="text" id="p1" tabindex="20" onKeyPress="return validar(event)" size="8"  disabled="disabled" value="<?php
 echo $_REQUEST['p1'];?>">
          <input name="p2" type="text" id="p2" tabindex="20" onKeyPress="return validar(event)" size="50"  disabled="disabled" value="<?php
echo $_REQUEST['p2'];?>">
</label>
          <label></label></td>
        <td colspan="2">&nbsp;</td>
      </tr>
      <tr>
        <td>FECHA. </td>
        <td width="198"><label>
          <input name="gfecini" type="text" id="gfecini" size="12" tabindex="20" onKeyPress="return validar(event)"  disabled="disabled"value="<?php
echo $_REQUEST['gfecini'];?>">
        <input name="reset" id="bot_a" type="image" disabled="disabled" 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_a"      // ID of the button
    }
  );
</script>
        </label></td>
        <td><label>FACTURA.</label></td>
        <td width="185"><input name="capacidad" type="text" id="capacidad" tabindex="20" size="20"  disabled="disabled" value="<?php
echo $_REQUEST['capacidad'];?>"></td>
        <td colspan="2">&nbsp;</td>
      </tr>
      <tr>
        <th>&nbsp;</th>
        <th>&nbsp;</th>
        <th width="82">&nbsp;</th>
        <th>&nbsp;</th>
        <th width="81">&nbsp;</th>
        <th width="163">&nbsp;</th>
      </tr>
      <tr>
        <th>CODIGO.</th>
        <th>DESCRIPCION.</th>
        <th>CANTIDAD.</th>
        <th>COSTO.</th>
        <th>IMPORTE.</th>
        <th>DESCUENTO.</th>
      </tr>
      <tr>
        <td><input name="entradae" type="text" id="entradae" tabindex="20" size="12" value="<?php
echo $_REQUEST['entradae'];?>"></td>
        <td><input name="salidae" type="text" id="salidae" tabindex="20" size="30" value="<?php
echo $_REQUEST['salidae'];?>"></td>
        <td><input name="maxe" type="text" id="maxe" tabindex="20" size="8" value="<?php
echo $_REQUEST['maxe'];?>"></td>
        <td><span class="Estilo24">
          <input name="entradaf" type="text" id="entradaf" tabindex="20" size="8" value="<?php
echo $_REQUEST['entradaf'];?>">
          x
          <input name="salidaf" type="text" id="salidaf" tabindex="20" size="12" value="<?php
echo $_REQUEST['salidaf'];?>">
        </span></td>
        <td><input name="minf" type="text" id="minf" tabindex="20" size="8" value="<?php
echo $_REQUEST['minf'];?>"></td>
        <td><input name="d1" type="text" id="d1" tabindex="20" size="8" value="<?php
echo $_REQUEST['d1'];?>">
        <input name="f1" type="text" id="f1" tabindex="20" size="8" value="<?php
echo $_REQUEST['f1'];?>"></td>
      </tr>
      <tr>
        <td><input name="entradam" type="text" id="entradam" tabindex="20" size="12" value="<?php
echo $_REQUEST['entradam'];?>"></td>
        <td><input name="salidam" type="text" id="salidam" tabindex="20" size="30" value="<?php
echo $_REQUEST['salidam'];?>"></td>
        <td><input name="mine" type="text" id="mine" tabindex="20" size="8" value="<?php
echo $_REQUEST['mine'];?>"></td>
        <td><span class="Estilo24">
          <input name="entradaa" type="text" id="entradaa" tabindex="20" size="8" value="<?php
echo $_REQUEST['entradaa'];?>">
          x
          <input name="salidaa" type="text" id="salidaa" tabindex="20" size="12" value="<?php
echo $_REQUEST['salidaa'];?>">
        </span></td>
        <td><input name="maxm" type="text" id="maxm" tabindex="20" size="8" value="<?php
echo $_REQUEST['maxm'];?>"></td>
        <td><input name="d2" type="text" id="d2" tabindex="20" size="8" value="<?php
echo $_REQUEST['d2'];?>">
        <input name="f2" type="text" id="f2" tabindex="20" size="8" value="<?php
echo $_REQUEST['f2'];?>"></td>
      </tr>
      <tr>
        <td><input name="entradama" type="text" id="entradama" tabindex="20" size="12" value="<?php
echo $_REQUEST['entradama'];?>"></td>
        <td><input name="salidama" type="text" id="salidama" tabindex="20" size="30" value="<?php
echo $_REQUEST['salidama'];?>"></td>
        <td><input name="maxf" type="text" id="maxf" tabindex="20" size="8" value="<?php
echo $_REQUEST['maxf'];?>"></td>
        <td><span class="Estilo24">
          <input name="entradaj" type="text" id="entradaj" tabindex="20" size="8" value="<?php
echo $_REQUEST['entradaj'];?>">
          x
          <input name="salidaj" type="text" id="salidaj" tabindex="20" size="12" value="<?php
echo $_REQUEST['salidaj'];?>">
        </span></td>
        <td><input name="minm" type="text" id="minm" tabindex="20" size="8" value="<?php
echo $_REQUEST['minm'];?>"></td>
        <td><input name="d3" type="text" id="d3" tabindex="20" size="8" value="<?php
echo $_REQUEST['d3'];?>">
        <input name="f3" type="text" id="f3" tabindex="20" size="8" value="<?php
echo $_REQUEST['f3'];?>"></td>
      </tr>
      <tr>
        <td><input name="entradaju" type="text" id="entradaju" tabindex="20" size="12" value="<?php
echo $_REQUEST['entradaju'];?>"></td>
        <td><input name="salidaju" type="text" id="salidaju" tabindex="20" size="30" value="<?php
echo $_REQUEST['salidaju'];?>"></td>
        <td><input name="maxma" type="text" id="maxma" tabindex="20" size="8" value="<?php
echo $_REQUEST['maxma'];?>"></td>
        <td><span class="Estilo24">
          <input name="entradaag" type="text" id="entradaag" tabindex="20" size="8" value="<?php
echo $_REQUEST['entradaag'];?>">
          x
          <input name="salidaag" type="text" id="salidaag" tabindex="20" size="12" value="<?php
echo $_REQUEST['salidaag'];?>">
        </span></td>
        <td><input name="minma" type="text" id="minma" tabindex="20" size="8" value="<?php
echo $_REQUEST['minma'];?>"></td>
        <td><input name="d4" type="text" id="d4" tabindex="20" size="8" value="<?php
echo $_REQUEST['d4'];?>">
        <input name="f4" type="text" id="f4" tabindex="20" size="8" value="<?php
echo $_REQUEST['f4'];?>"></td>
      </tr>
      <tr>
        <td><input name="entradas" type="text" id="entradas" tabindex="20" size="12" value="<?php
echo $_REQUEST['entradas'];?>"></td>
        <td><input name="salidas" type="text" id="salidas" tabindex="20" size="30" value="<?php
echo $_REQUEST['salidas'];?>"></td>
        <td><input name="maxj" type="text" id="maxj" tabindex="20" size="8" value="<?php
echo $_REQUEST['maxj'];?>"></td>
        <td><span class="Estilo24">
          <input name="entradan" type="text" id="entradan" tabindex="20" size="8" value="<?php
echo $_REQUEST['entradan'];?>">
          x
          <input name="salidan" type="text" id="salidan" tabindex="20" size="12" value="<?php
echo $_REQUEST['salidan'];?>">
        </span></td>
        <td><input name="minj" type="text" id="minj" tabindex="20" size="8" value="<?php
echo $_REQUEST['minj'];?>"></td>
        <td><input name="d5" type="text" id="d5" tabindex="20" size="8" value="<?php
echo $_REQUEST['d5'];?>">
        <input name="f5" type="text" id="f5" tabindex="20" size="8" value="<?php
echo $_REQUEST['f5'];?>"></td>
      </tr>
      <tr>
        <td><input name="entradao" type="text" id="entradao" tabindex="20" size="12" value="<?php
echo $_REQUEST['entradao'];?>"></td>
        <td><input name="salidao" type="text" id="salidao" tabindex="20" size="30" value="<?php
echo $_REQUEST['salidao'];?>"></td>
        <td><input name="mina" type="text" id="mina" tabindex="20" size="8" value="<?php
echo $_REQUEST['mina'];?>"></td>
        <td><span class="Estilo24">
          <input name="entradad" type="text" id="entradad" tabindex="20" size="8" value="<?php
echo $_REQUEST['entradad'];?>">
          x
          <input name="salidad" type="text" id="salidad" tabindex="20" size="12" value="<?php
echo $_REQUEST['salidad'];?>">
        </span></td>
        <td><input name="maxa" type="text" id="maxa" tabindex="20" size="8" value="<?php
echo $_REQUEST['maxa'];?>"></td>
        <td><input name="d6" type="text" id="d6" tabindex="20" size="8" value="<?php
echo $_REQUEST['d6'];?>">
        <input name="f6" type="text" id="f6" tabindex="20" size="8" value="<?php
echo $_REQUEST['f6'];?>"></td>
      </tr>
      <tr>
        <td><input name="a1" type="text" id="a1" tabindex="20" size="12" value="<?php
echo $_REQUEST['a1'];?>"></td>
        <td><input name="a2" type="text" id="a2" tabindex="20" size="30" value="<?php
echo $_REQUEST['a2'];?>"></td>
        <td><input name="maxag" type="text" id="maxag" tabindex="20" size="8" value="<?php
echo $_REQUEST['maxag'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a3" type="text" id="a3" tabindex="20" size="8" value="<?php
echo $_REQUEST['a3'];?>">
          x
          <input name="a4" type="text" id="a4" tabindex="20" size="12" value="<?php
echo $_REQUEST['a4'];?>">
        </span></td>
        <td><input name="minag" type="text" id="minag" tabindex="20" size="8" value="<?php
echo $_REQUEST['minag'];?>"></td>
        <td><input name="d7" type="text" id="d7" tabindex="20" size="8" value="<?php
echo $_REQUEST['d7'];?>">
        <input name="f7" type="text" id="f7" tabindex="20" size="8" value="<?php
echo $_REQUEST['f7'];?>"></td>
      </tr>
      <tr>
        <td><input name="a5" type="text" id="a5" tabindex="20" size="12" value="<?php
echo $_REQUEST['a5'];?>"></td>
        <td><input name="a6" type="text" id="a6" tabindex="20" size="30" value="<?php
echo $_REQUEST['a6'];?>"></td>
        <td><input name="minju" type="text" id="minju" tabindex="20" size="8" value="<?php
echo $_REQUEST['minju'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a7" type="text" id="a7" tabindex="20" size="8" value="<?php
echo $_REQUEST['a7'];?>">
          x
          <input name="a8" type="text" id="a8" tabindex="20" size="12" value="<?php
echo $_REQUEST['a8'];?>">
        </span></td>
        <td><input name="maxs" type="text" id="maxs" tabindex="20" size="8" value="<?php
echo $_REQUEST['maxs'];?>"></td>
        <td><input name="d8" type="text" id="d8" tabindex="20" size="8" value="<?php
echo $_REQUEST['d8'];?>">
        <input name="f8" type="text" id="f8" tabindex="20" size="8" value="<?php
echo $_REQUEST['f8'];?>"></td>
      </tr>
      <tr>
        <td><input name="a9" type="text" id="a9" tabindex="20" size="12" value="<?php
echo $_REQUEST['a9'];?>"></td>
        <td><input name="a10" type="text" id="a10" tabindex="20" size="30" value="<?php
echo $_REQUEST['a10'];?>"></td>
        <td><input name="maxju" type="text" id="maxju" tabindex="20" size="8" value="<?php
echo $_REQUEST['maxju'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a11" type="text" id="a11" tabindex="20" size="8" value="<?php
echo $_REQUEST['a11'];?>">
          x
          <input name="a12" type="text" id="a12" tabindex="20" size="12" value="<?php
echo $_REQUEST['a12'];?>">
        </span></td>
        <td><input name="mino" type="text" id="mino" tabindex="20" size="8" value="<?php
echo $_REQUEST['mino'];?>"></td>
        <td><input name="d9" type="text" id="d9" tabindex="20" size="8" value="<?php
echo $_REQUEST['d9'];?>">
        <input name="f9" type="text" id="f9" tabindex="20" size="8" value="<?php
echo $_REQUEST['f9'];?>"></td>
      </tr>
      <tr>
        <td><input name="a13" type="text" id="a13" tabindex="20" size="12" value="<?php
echo $_REQUEST['a13'];?>"></td>
        <td><input name="a14" type="text" id="a14" tabindex="20" size="30" value="<?php
echo $_REQUEST['a14'];?>"></td>
        <td><input name="maxo" type="text" id="maxo" tabindex="20" size="8" value="<?php
echo $_REQUEST['maxo'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a15" type="text" id="a15" tabindex="20" size="8" value="<?php
echo $_REQUEST['a15'];?>">
          x
          <input name="a16" type="text" id="a16" tabindex="20" size="12" value="<?php
echo $_REQUEST['a16'];?>">
        </span></td>
        <td><input name="mins" type="text" id="mins" tabindex="20" size="8" value="<?php
echo $_REQUEST['mins'];?>"></td>
        <td><input name="d10" type="text" id="d10" tabindex="20" size="8" value="<?php
echo $_REQUEST['d10'];?>">
        <input name="f10" type="text" id="f10" tabindex="20" size="8" value="<?php
echo $_REQUEST['f10'];?>"></td>
      </tr>
      <tr>
        <td><input name="a17" type="text" id="a17" tabindex="20" size="12" value="<?php
echo $_REQUEST['a17'];?>"></td>
        <td><input name="a18" type="text" id="a18" tabindex="20" size="30" value="<?php
echo $_REQUEST['a18'];?>"></td>
        <td><input name="minn" type="text" id="minn" tabindex="20" size="8" value="<?php
echo $_REQUEST['minn'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a19" type="text" id="a19" tabindex="20" size="8" value="<?php
echo $_REQUEST['a19'];?>">
          x
          <input name="a20" type="text" id="a20" tabindex="20" size="12" value="<?php
echo $_REQUEST['a20'];?>">
        </span></td>
        <td><input name="mind" type="text" id="mind" tabindex="20" size="8" value="<?php
echo $_REQUEST['mind'];?>"></td>
        <td><input name="d11" type="text" id="d11" tabindex="20" size="8" value="<?php
echo $_REQUEST['d11'];?>">
        <input name="f11" type="text" id="f11" tabindex="20" size="8" value="<?php
echo $_REQUEST['f11'];?>"></td>
      </tr>
      <tr>
        <td><input name="a21" type="text" id="a21" tabindex="20" size="12" value="<?php
echo $_REQUEST['a21'];?>"></td>
        <td><input name="a22" type="text" id="a22" tabindex="20" size="30" value="<?php
echo $_REQUEST['a22'];?>"></td>
        <td><input name="maxn" type="text" id="maxn" tabindex="20" size="8" value="<?php
echo $_REQUEST['maxn'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a23" type="text" id="a23" tabindex="20" size="8" value="<?php
echo $_REQUEST['a23'];?>">
          x
          <input name="a24" type="text" id="a24" tabindex="20" size="12" value="<?php
echo $_REQUEST['a24'];?>">
        </span></td>
        <td><input name="maxd" type="text" id="maxd" tabindex="20" size="8" value="<?php
echo $_REQUEST['maxd'];?>"></td>
        <td><input name="d12" type="text" id="d12" tabindex="20" size="8" value="<?php
echo $_REQUEST['d12'];?>">
        <input name="f12" type="text" id="f12" tabindex="20" size="8" value="<?php
echo $_REQUEST['f12'];?>"></td>
      </tr>
      <tr>
        <td><input name="a25" type="text" id="a25" tabindex="20" size="12" value="<?php
echo $_REQUEST['a25'];?>"></td>
        <td><input name="a26" type="text" id="a26" tabindex="20" size="30" value="<?php
echo $_REQUEST['a26'];?>"></td>
        <td><input name="b1" type="text" id="b1" tabindex="20" size="8" value="<?php
echo $_REQUEST['b1'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a27" type="text" id="a27" tabindex="20" size="8" value="<?php
echo $_REQUEST['a27'];?>">
          x
          <input name="a28" type="text" id="a28" tabindex="20" size="12" value="<?php
echo $_REQUEST['a28'];?>">
        </span></td>
        <td><input name="b19" type="text" id="b19" tabindex="20" size="8" value="<?php
echo $_REQUEST['b19'];?>"></td>
        <td><input name="d13" type="text" id="d13" tabindex="20" size="8" value="<?php
echo $_REQUEST['d13'];?>">
        <input name="f13" type="text" id="f13" tabindex="20" size="8" value="<?php
echo $_REQUEST['f13'];?>"></td>
      </tr>
      <tr>
        <td><input name="a29" type="text" id="a29" tabindex="20" size="12" value="<?php
echo $_REQUEST['a29'];?>"></td>
        <td><input name="a30" type="text" id="a30" tabindex="20" size="30" value="<?php
echo $_REQUEST['a30'];?>"></td>
        <td><input name="b12" type="text" id="b12" tabindex="20" size="8" value="<?php
echo $_REQUEST['b12'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a31" type="text" id="a31" tabindex="20" size="8" value="<?php
echo $_REQUEST['a31'];?>">
          x
          <input name="a32" type="text" id="a32" tabindex="20" size="12" value="<?php
echo $_REQUEST['a32'];?>">
        </span></td>
        <td><input name="b110" type="text" id="b110" tabindex="20" size="8" value="<?php
echo $_REQUEST['b110'];?>"></td>
        <td><input name="d14" type="text" id="d14" tabindex="20" size="8" value="<?php
echo $_REQUEST['d14'];?>">
        <input name="f14" type="text" id="f14" tabindex="20" size="8" value="<?php
echo $_REQUEST['f14'];?>"></td>
      </tr>
      <tr>
        <td><input name="a33" type="text" id="a33" tabindex="20" size="12" value="<?php
echo $_REQUEST['a33'];?>"></td>
        <td><input name="a34" type="text" id="a34" tabindex="20" size="30" value="<?php
echo $_REQUEST['a34'];?>"></td>
        <td><input name="b13" type="text" id="b13" tabindex="20" size="8" value="<?php
echo $_REQUEST['b13'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a35" type="text" id="a35" tabindex="20" size="8" value="<?php
echo $_REQUEST['a35'];?>">
          x
          <input name="a36" type="text" id="a36" tabindex="20" size="12" value="<?php
echo $_REQUEST['a36'];?>">
        </span></td>
        <td><input name="b111" type="text" id="b111" tabindex="20" size="8" value="<?php
echo $_REQUEST['b111'];?>"></td>
        <td><input name="d15" type="text" id="d15" tabindex="20" size="8" value="<?php
echo $_REQUEST['d15'];?>">
        <input name="f15" type="text" id="f15" tabindex="20" size="8" value="<?php
echo $_REQUEST['f15'];?>"></td>
      </tr>
      <tr>
        <td><input name="a37" type="text" id="a37" tabindex="20" size="12" value="<?php
echo $_REQUEST['a37'];?>"></td>
        <td><input name="a38" type="text" id="a38" tabindex="20" size="30" value="<?php
echo $_REQUEST['a38'];?>"></td>
        <td><input name="b14" type="text" id="b14" tabindex="20" size="8" value="<?php
echo $_REQUEST['b14'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a39" type="text" id="a39" tabindex="20" size="8" value="<?php
echo $_REQUEST['a39'];?>">
          x
          <input name="a40" type="text" id="a40" tabindex="20" size="12" value="<?php
echo $_REQUEST['a40'];?>">
        </span></td>
        <td><input name="b112" type="text" id="b112" tabindex="20" size="8" value="<?php
echo $_REQUEST['b112'];?>"></td>
        <td><input name="d16" type="text" id="d16" tabindex="20" size="8" value="<?php
echo $_REQUEST['d16'];?>">
        <input name="f16" type="text" id="f16" tabindex="20" size="8" value="<?php
echo $_REQUEST['f16'];?>"></td>
      </tr>
      <tr>
        <td><input name="a41" type="text" id="a41" tabindex="20" size="12" value="<?php
echo $_REQUEST['a41'];?>"></td>
        <td><input name="a42" type="text" id="a42" tabindex="20" size="30" value="<?php
echo $_REQUEST['a42'];?>"></td>
        <td><input name="b15" type="text" id="b15" tabindex="20" size="8" value="<?php
echo $_REQUEST['b15'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a43" type="text" id="a43" tabindex="20" size="8" value="<?php
echo $_REQUEST['a43'];?>">
          x
          <input name="a44" type="text" id="a44" tabindex="20" size="12" value="<?php
echo $_REQUEST['a44'];?>">
        </span></td>
        <td><input name="b113" type="text" id="b113" tabindex="20" size="8" value="<?php
echo $_REQUEST['b113'];?>"></td>
        <td><input name="d17" type="text" id="d17" tabindex="20" size="8" value="<?php
echo $_REQUEST['d17'];?>">
        <input name="f17" type="text" id="f17" tabindex="20" size="8" value="<?php
echo $_REQUEST['f17'];?>"></td>
      </tr>
      <tr>
        <td><input name="a45" type="text" id="a45" tabindex="20" size="12" value="<?php
echo $_REQUEST['a45'];?>"></td>
        <td><input name="a46" type="text" id="a46" tabindex="20" size="30" value="<?php
echo $_REQUEST['a46'];?>"></td>
        <td><input name="b16" type="text" id="b16" tabindex="20" size="8" value="<?php
echo $_REQUEST['b16'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a47" type="text" id="a47" tabindex="20" size="8" value="<?php
echo $_REQUEST['a47'];?>">
          x
          <input name="a48" type="text" id="a48" tabindex="20" size="12" value="<?php
echo $_REQUEST['a48'];?>">
        </span></td>
        <td><input name="b114" type="text" id="b114" tabindex="20" size="8" value="<?php
echo $_REQUEST['b114'];?>"></td>
        <td><input name="d18" type="text" id="d18" tabindex="20" size="8" value="<?php
echo $_REQUEST['d18'];?>">
        <input name="f18" type="text" id="f18" tabindex="20" size="8" value="<?php
echo $_REQUEST['f18'];?>"></td>
      </tr>
      <tr>
        <td><input name="a49" type="text" id="a49" tabindex="20" size="12" value="<?php
echo $_REQUEST['a49'];?>"></td>
        <td><input name="a50" type="text" id="a50" tabindex="20" size="30" value="<?php
echo $_REQUEST['a50'];?>"></td>
        <td><input name="b17" type="text" id="b17" tabindex="20" size="8" value="<?php
echo $_REQUEST['b17'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a51" type="text" id="a51" tabindex="20" size="8" value="<?php
echo $_REQUEST['a51'];?>">
          x
          <input name="a52" type="text" id="a52" tabindex="20" size="12" value="<?php
echo $_REQUEST['a52'];?>">
        </span></td>
        <td><input name="b115" type="text" id="b115" tabindex="20" size="8" value="<?php
echo $_REQUEST['b115'];?>"></td>
        <td><input name="d19" type="text" id="d19" tabindex="20" size="8" value="<?php
echo $_REQUEST['d19'];?>">
        <input name="f19" type="text" id="f19" tabindex="20" size="8" value="<?php
echo $_REQUEST['f19'];?>"></td>
      </tr>
      <tr>
        <td><input name="a53" type="text" id="a53" tabindex="20" size="12" value="<?php
echo $_REQUEST['a53'];?>"></td>
        <td><input name="a54" type="text" id="a54" tabindex="20" size="30" value="<?php
echo $_REQUEST['a54'];?>"></td>
        <td><input name="b18" type="text" id="b18" tabindex="20" size="8" value="<?php
echo $_REQUEST['b18'];?>"></td>
        <td><span class="Estilo24"> 
          <input name="a55" type="text" id="a55" tabindex="20" size="8" value="<?php
echo $_REQUEST['a55'];?>">
          x
          <input name="a56" type="text" id="a56" tabindex="20" size="12" value="<?php
echo $_REQUEST['a56'];?>">
        </span></td>
        <td><input name="b116" type="text" id="b116" tabindex="20" size="8" value="<?php
echo $_REQUEST['b116'];?>"></td>
        <td><input name="d20" type="text" id="d20" tabindex="20" size="8" value="<?php
echo $_REQUEST['d20'];?>">
        <input name="f20" type="text" id="f20" tabindex="20" size="8" value="<?php
echo $_REQUEST['f20'];?>"></td>
      </tr>
	  
	  
	  
	  
      
      <tr>
        <td height="29" colspan="5">
          <div align="center">
            <input type="button" name="bot4" value="Regresar" onClick="openpage('CO10300_PR.php','_self')"/>
          </div></td>
      </tr>
      </tr>
    </table>
  </div>
  <div id="divArt" style="display:none">
  <table width="735"  align="center">
    <tr>
      <th colspan="8">ALMACEN</th>
    </tr>
    <tr>
      <td width="79">Cantidad Minima:</td>
      <td width="179"><input name="tap4" type="text"  tabindex="4"
	 <?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['id_catprom'].'"';
		}
		?>
		  onBlur="may(this)"/></td>
      <td width="86">Cantidad Maxima:</td>
      <td width="196"><input name="tap5" type="text" tabindex="5"
		<?php

			if(isset($_POST['tap5'])){ 
				echo 'value="' . $_POST['tap5'] .  '"';
			}
		?>
		  onBlur="may(this)"/></td>
      <td width="45">Moneda:</td>
      <td colspan="3"><select name="tap18" tabindex="18">
          <?php
 
		if($_POST['tap18']==1){
			echo '<option value="1">NACIONAL</option>';
		}else{
			echo '<option value="1">NACIONAL</option>';
		}
		if($_POST['tap18']==2){
			echo '<option value="2" selected>EXTRANJERA</option>';
		}else{
			echo '<option value="2">EXTRANJERA</option>';
		}
		?>
      </select></td>
    </tr>
    <tr>
      <td>Unidad medida:</td>
      <td><select name="tap14" tabindex="14">
          <option></option>
          <?php
 
		 $result = mysqli_query($con ,"SELECT * FROM dggrupos ORDER BY des_uni");
		while($dato = mysqli_fetch_array ($result) ){ 
			if($dato['cve_uni']==$_POST['tap14']){
				echo '<option value= "' . $dato['cve_uni'] . '" selected>' . $dato['des_uni'] .' </option>'; 
			}else{
				echo '<option value= "' . $dato['cve_uni'] . '">' . $dato['des_uni'] .' </option>'; 
			}
		}
		?>
      </select></td>
      <td>Capacidad:</td>
      <td><select name="tap15" tabindex="15">
          <option></option>
          <?php
 
		 $result = mysqli_query($con ,"SELECT * FROM dggrupos ORDER BY des_uni");
		while($dato = mysqli_fetch_array ($result) ){ 
			if($_POST['tap15']==$dato['cve_uni']){
				echo '<option value= "' . $dato['cve_uni'] . '" selected>' . $dato['des_uni'] .' </option>'; 
			}else{
				echo '<option value= "' . $dato['cve_uni'] . '">' . $dato['des_uni'] .' </option>'; 
			}
		}
		?>
      </select>
      <input name="capacidad" type="text" id="capacidad" size="15"></td>
      <td>Marca:</td>
      <td colspan="3"><select name="tap8" tabindex="8">
          <option></option>
          <?php
 
		 $result = mysqli_query($con ,"SELECT * FROM dxmarcas ORDER BY des_marca");
		while($dato = mysqli_fetch_array ($result) ){ 
			if($_POST['tap8']==$dato['cve_marca']){
				echo '<option value= "' . $dato['cve_marca'] . '" selected>' . $dato['des_marca'] .' </option>'; 
			}else{
				echo '<option value= "' . $dato['cve_marca'] . '">' . $dato['des_marca'] .' </option>'; 
			}
		}
		?>
      </select></td>
    </tr>
    <tr>
      <td>Iva:</td>
      <td><select name="tap9" tabindex="9" >
          <?php
 
		 $result = mysqli_query($con ,"SELECT * FROM dxtasiva ORDER BY cve_iva");
		while($dato = mysqli_fetch_array ($result) ){ 
			if($_POST['tap9']==$dato['cve_iva']){
				echo '<option value= "' . $dato['cve_iva'] . '" selected>' .$dato['conc_iva'] .' </option>'; 
			}else{
				echo '<option value= "' . $dato['cve_iva'] . '">' .$dato['conc_iva'] .' </option>'; 
			}
		}
		?>
      </select></td>
      <td>Costo Promedio:</td>
      <td><input name="cos_prom" type="text" id="cos_prom" value="<?php
echo $_REQUEST['cos_prom'];?>"></td>
      <td colspan="4">&nbsp;</td>
    </tr>
  </table>
  </div>
  <div id="divNut" style="display:none">
   <table width="737"   align="center">
    <!--DWLayoutTable-->
    
    <tr>
      <th colspan="6"><label>VALORES NUTRICIONALES </label></th>
    </tr>
   
    <tr>
      <td width="130" height="29">Potasio:</td>
      <td width="164"><input name="potacio" type="text" class="agrega" id="potacio"  value="<?php
echo $_REQUEST['potacio'];?>" size="15"></td>
      <td width="113">Proteinas:</td>
      <td width="164"><input name="proteinas" type="text" class="agrega" id="proteinas"  value="<?php
echo $_REQUEST['proteinas'];?>" size="15"></td>
      <td width="107">Lipidos:</td>
      <td width="174"><input name="lipidos" type="text" class="agrega" id="lipidos" 
	   <?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['lip'].'"';
		}
		?>
	   ></td>
    </tr>
    <tr>
      <td height="28">K Calorias: </td>
      <td><input name="kcalorias" type="text" class="agrega" id="kcalorias"  value="<?php
echo $_REQUEST['kcalorias'];?>" size="15"></td>
      <td>Calcio:</td>
      <td><input name="calcio" type="text" class="agrega" id="calcio"  value="<?php
echo $_REQUEST['calcio'];?>" size="15"></td>
      <td>Carbohidratos:</td>
      <td><input name="carboidratos" type="text" class="agrega" id="carboidratos"  value="<?php
echo $_REQUEST['carboidratos'];?>" size="15"></td>
    </tr>
    <tr>
      <td>Sodio:</td>
      <td><input name="sodio" type="text" class="agrega" id="sodio"  value="<?php
echo $_REQUEST['sodio'];?>" size="15"></td>
      <td>Factor rendimiento:</td>
      <td><label>
        <input name="fac_rend" type="text" class="agrega" id="fac_rend" value="<?php
echo $_REQUEST['fac_rend'];?>" size="20">
      </label></td>
      <td>Temperatura:</td>
      <td><input name="temperatura" type="text" class="agrega" id="temperatura" value="<?php
echo $_REQUEST['temperatura'];?>" size="15"></td>
    </tr>
    <tr>
      <td>Dias almacen:</td>
      <td><span class="Estilo18">
        <input name="dias_alm" type="text" class="agrega" id="dias_alm" value="<?php
echo $_REQUEST['dias_alm'];?>" size="15">
      </span></td>
      <td>Casillero:</td>
      <td><input name="casillero" type="text" class="agrega" id="casillero" value="<?php
echo $_REQUEST['casillero'];?>" size="15"></td>
      <td><!--DWLayoutEmptyCell-->&nbsp;</td>
      <td><!--DWLayoutEmptyCell-->&nbsp;</td>
    </tr>
    
    
	
	<tr>
	  <td colspan="6" nowrap bordercolor="#FFFFFF"><div align="center">
	   
      </div></td>
    </tr>
  </table>
  </div>
</form>
    <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center">
	<form id="form1" name="form1" action="AL10100_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar">
	</form>
	</div>';
	
}
mysqli_close($con);

?>
</body>
</html>





