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

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

if ($_REQUEST['bot']==""){
	echo '<h2>!!! SELECCIONE UN REGISTRO !!!</h2>';
	echo '<meta content="1; url=CO10300_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	if(!isset($_REQUEST['tap2'])){
		include('CO10300_CL.php');
		$varible_clase = new clase();
		$res=$varible_clase->lista_busqueda($_REQUEST["bot"]);
		$reg=mysqli_fetch_array($res);
		$_REQUEST['id_pro']=$reg['id_pro'];
		$_REQUEST['tap2']=$reg['np_desc1'];
		$_REQUEST['precio']=$reg['lim_vta1'];
		$_REQUEST['afe_inv']=$reg['afe_inv'];
		$_REQUEST['cve_iva_ven']=$reg['cve_iva_ven'];
		$_REQUEST['afe_coman']=$reg['afe_coman'];
		$_REQUEST['select']=$reg['linea'];
		$_REQUEST['select2']=$reg['gpo_basico'];
		$_REQUEST['tap4']=$reg['exi_min'];
		$_REQUEST['tap5']=$reg['exi_max'];
		$_REQUEST['tap18']=$reg['tip_mon'];
		$_REQUEST['tap14']=$reg['cve_uni_com'];
		$_REQUEST['capacidad']=$reg['capacidad'];
		//$_REQUEST['tap15']=$reg['cve_uni_vta'];
		$_REQUEST['almacen']=$reg['almacen'];
		$_REQUEST['factor']=$reg['factor'];
		$_REQUEST['unidad']=$reg['unidad'];
		$_REQUEST['capacidad']=$reg['capacidad'];
		$_REQUEST['descripcion']=$reg['descripcion'];
		$_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['fecha']=chfecha($reg['fecha'],'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'];
		$_REQUEST['codigo']=$reg['codigo'];
	}

	
?>
<style type="text/css">
<!--
.Estilo18 {color: #FFFFFF}
.Estilo19 {font-size: 16px}
-->
</style>
<script language="javascript">
$(document).ready(function(){
	function formatItem(row) {
		return " (<strong>" + row[1] + "</strong>)"+row[0];
	}
	$("#tap2").autocomplete('CO10300_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>
	
	
<body>
<DIV STYLE="position:absolute; top:-20px; left:10px">
<img src="img/sihteolsd.gif"/>
</DIV> 

<form name="frm1" method="post" action="" enctype="multipart/form-data">
  <p>
    <input name="bot" type="hidden" value="<?php
 echo $_REQUEST['bot'];?>"> 
  </p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <table width="458"  align="center" bordercolor="#FF6600" bordercolordark="#FF6600">
    <tr>
      <th colspan="4">MODIFICAR DATOS DE RECETA</th>
    </tr>
    <tr>
      <td width="106" style="#6E4940"><span class="Estilo18">NUMERO DE PEDIDO </span></td>
      <td width="336" colspan="3"><span class="Estilo19">
        <input name="n_reg" type="text" id="n_reg" size="15" disabled="disabled"
		  <?php
 
		if(isset($_REQUEST['bot'])){
		echo 'value="'.$reg['n_reg'].'"';
		}
		?>
		
		>
      </span></td>
    </tr>
  </table>
  <div id="divVent" style="display:">
    <table width="458"  align="center" bordercolor="#FF6600" bordercolordark="#FF6600" >
      <tr>
        <td width="448"><span class="Estilo18"><strong>NOMBRE</strong>
            <label>
            <input name="tap2" id="tap2" type="text" tabindex="2"
		  onBlur="may(this)" size="50"
		 <?php
 
		if(isset($_REQUEST['bot'])){
		echo 'value="'.$reg['np_desc1'].'"';
		}
		?>>
            </label>
        </span></td>
      </tr>
      
	  
	  
	  
	  
	  <tr>
        <td><span class="Estilo18">FECHA
            <label>
            <input type="text" name="textfield" value="<?php
echo "".$_REQUEST['fecha']."";?>" DISABLED>
            </label>
        </span></td>
      </tr>
      <tr>
        <td height="29" colspan="2">
          <div align="center">
            <input type="button" name="bot1" value="Modificar" onClick="openpage('CO10300_MC.php','_self')" class="bot_WsW"/>
            <input type="button" name="bot4" value="Regresar" onClick="openpage('CO10300_PR.php','_self')" class="original"/>
        </div></td>
      </tr>
    </table>
  </div>
  <div id="divArt" style="display:none">
</form>
    <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center"
<?php
 mysqli_close($con);?>>
	<form id="form1" name="form1" action="CO10300_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar">
	</form>
	</div>';
	
}
?>
 <?php
 
}
?>
</body>
</html>
<?php
 mysqli_close($con);?>

</body>
</html>



