<?php
session_start();
include("cls_conexion.php");$CNN=new ClsMySQL();include("conexion23.php");
include("phpmnu_fun.php");
if(strlen($_SESSION['SYS_USER_ID'])==0){JsDir("login.php");	return;}
$PID=vbval(V($_GET['PID']));
if($PID==0){
	$PID=vbval(V($_POST['TXT_PID']));
}
//+++
//+++
$r=gr("vis_ges_productos_referencias","ID_REF=$PID");
$InvFec=$r['INV_FEC_'];
$InvSer=$r['INV_SER'];
$InvNum=$r['INV_NUM'];
$InvIte=$r['INV_ITE'];
$PaiOri=$r['PAI_ORI'];
$PaiDes=$r['PAI_DES'];
$Par=$r['PARTIDA'];
$NomCom=$r['NOM_COM'];
$Est=$r['ESTADO'];
$FobUsd=$r['FOB_USS'];
$FobKg=$r['FOB_KG'];
$Und=$r['UNIDAD'];
$Can=$r['CANTIDAD'];
$Mod=$r['MODELO'];
$Cla=$r['CLASE'];
$Dua=$r['DUA'];
$DuaIte=$r['DUA_ITEM'];
$Lnk=$r['LINK'];
$Obs=$r['OBS'];
$Emp=$r['NC_EMP'];
//
?>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Editar item</title>
<!--INI_SCRIPT------------------------------------------------------------------------------>
<?php AddJs(); ?>
<script type="text/javascript" src="ja/funciones.js"></script>
<script type="text/javascript" src="ja/ges_pro_edit.js"></script>
<!--FIN_SCRIPT------------------------------------->
<link rel="stylesheet" type="text/css" href="css/estiloss.css"  />
<link rel="stylesheet" type="text/css" href="css/basic.css"  />
<link rel="stylesheet" type="text/css" href="css/mnu.css"  />

<style type="text/css">
.mM {height:34px;width:1250px;position:relative;top:0px;background-color:#09C; z-index:500;}
.cF {height:250px;width:1250px;position:relative;top:0px}

.tableFixHead          { overflow-y: auto; overflow:auto; border:solid 1px #363636;position: absolute; }
.tableFixHead thead th { position: sticky; top: 0; }
table  {border-collapse:collapse;width:100%;}
th, td {padding: 3px 3px;}
th     {background:#CCC}
.tzt{
	background-color:transparent; width:100%; font-size:11px; position:inherit!Important; border:none;
}
</style>
<script>
$(document).ready(function(){  
   Inicializar();
   jF("Emp");   
   //
   document.getElementById("DivOK").style.display="none";
});



</script>
</head>
<body >
<div align="center">

<div Id="DivFRM"  class="cF" style="background-color:#FFC">
<form id="Frm" name="Frm" method="post"  autocomplete="off"
action="ges_prod_edit.php" 
style="margin:0px; padding:0px; display:inline;" onSubmit="return false;">

<!--INI_TITULO--------------------------------->
<div id="DivT" class="dT" style="width:1250px" >
<img src="png/descuento2.png" class="iT" />
<div class="tT">EDITAR ITEM</div>
</div>
<!--FIN_TITULO--------------------------------->


<center> 
<div id="DivLAST">
</div>
  <div Id="DivFRM"  class="centrarFrm" >

<div class="s1" style="left: 30px; top: 92px; width: 104px;">
EMPRESA</div>
<select name="Emp" id="Emp" 
class="lt" style="left: 30px; top: 109px; width: 123px"
tabindex="<?php echo ++$TI;?>">
<?php 
echo FCBO_("emp_nom_cor","ges_empresas","id_emp>0",$Emp,"","S");
?>
</select>

<div class="s1" style="left: 166px; top: 76px; width: 75px;">
INVOICE FECHA</div>
<input name="InvFec"  type="text" id="InvFec"
class="fe tcal" style="left: 166px; top: 109px; width: 75px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $InvFec;?>"/>

<div class="s1" style="left: 252px; top: 76px; width: 68px;">
INVOICE SERIE*</div>
<input name="InvSer"  type="text" id="InvSer"
class="lt" style="left: 250px; top: 109px; width: 70px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $InvSer;?>"/>

<div class="s1" style="left: 329px; top: 76px; width: 82px;">
INVOICE NUMERO*</div>
<input name="InvNum"  type="text" id="InvNum"
class="lt" style="left: 328px; top: 109px; width: 78px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $InvNum;?>"/>

<div class="s1" style="left: 414px; top: 76px; width: 58px;">
INVOICE ITEM*</div>
<input name="InvIte"  type="text" id="InvIte"
class="lt" style="left: 414px; top: 109px; width: 57px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $InvIte;?>"/>

<div class="s1" style="left: 483px; top: 92px; width: 56px;">
DUA
</div>
<input name="Dua"  type="text" id="Dua"
class="lt" style="left: 481px; top: 109px; width: 81px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $Dua;?>"/>

<div class="s1" style="left: 572px; top: 92px; width: 71px;">
DUA ITEM
</div>
<input name="DuaIte"  type="text" id="DuaIte"
class="lt" style="left: 572px; top: 109px; width: 65px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $DuaIte;?>"/>




<div class="s1" style="left: 648px; top: 77px; width: 71px;">
PAIS ORIGEN</div>
<input name="PaiOri"  type="text" id="PaiOri"
class="lt" style="left: 645px; top: 109px; width: 72px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $PaiOri;?>"/>

<div class="s1" style="left: 728px; top: 76px; width: 98px;">
PAIS DESEMBARCO</div>
<input name="PaiDes"  type="text" id="PaiDes"
class="lt" style="left: 728px; top: 109px; width: 96px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $PaiDes;?>"/>

<div class="s1" style="left: 837px; top: 92px; width: 82px;"> PARTIDA
</div>
<input name="Par"  type="text" id="Par"
class="lt" style="left: 836px; top: 109px; width: 163px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $Par;?>"/>

<div class="s1" style="left: 1009px; top: 92px; width: 160px;">
NOMBRE COMERCIAL</div>
<input name="NomCom"  type="text" id="NomCom"
class="lt" style="left: 1009px; top: 109px; width: 205px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $NomCom;?>"/>

<div class="s1" style="left: 30px; top: 137px; width: 59px;"> ESTADO
</div>
<input name="Est"  type="text" id="Est"
class="lt" style="left: 30px; top: 154px; width: 74px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $Est;?>"/>


<div class="s1" style="left: 114px; top: 137px; width: 59px;">
FOB USD
</div>
<input name="FobUsd"  type="text" id="FobUsd"
class="lt" style="left: 114px; top: 154px; width: 61px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $FobUsd;?>"/>

<div class="s1" style="left: 184px; top: 137px; width: 59px;">
FOB KG
</div>
<input name="FobKg"  type="text" id="FobKg"
class="lt" style="left: 184px; top: 154px; width: 60px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $FobKg;?>"/>

<div class="s1" style="left: 254px; top: 137px; width: 57px;">
UNIDAD
</div>
<input name="Und"  type="text" id="Und"
class="lt" style="left: 253px; top: 154px; width: 152px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $Und;?>"/>

<div class="s1" style="left: 414px; top: 137px; width: 80px;">
CANTIDAD
</div>
<input name="Can"  type="text" id="Can"
class="lt" style="left: 414px; top: 154px; width: 64px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $Can;?>"/>

<div class="s1" style="left: 487px; top: 137px; width: 84px;">
MODELO
</div>
<input name="Mod"  type="text" id="Mod"
class="lt" style="left: 487px; top: 154px; width: 79px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $Mod;?>"/>

<div class="s1" style="left: 577px; top: 137px; width: 117px;">
CLASE VARIEDAD
</div>
<input name="Cla"  type="text" id="Cla"
class="lt" style="left: 577px; top: 154px; width: 106px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $Cla;?>"/>

<div class="s1" style="left: 728px; top: 137px; width: 221px;">
  OBSERVACION
</div>
<input name="Obs"  type="text" id="Obs"
class="lt" style="left: 728px; top: 154px; width: 486px"
tabindex="<?php echo ++$TI;?>"
value="<?php echo $Obs;?>"/>

<input name="CmdG" type="button" id="CmdG" 
style="position: absolute; left: 30px; top: 201px; width: 108px;"
value="Aplicar" onClick="fxAplicar();"  
tabindex="<?php echo ++$TI;?>" />

<input name="CmdX" type="button" id="CmdX" 
style="position: absolute; left: 149px; top: 201px; width: 100px;"
value="Cerrar" onClick="window.close();"  
tabindex="<?php echo ++$TI;?>" />

<div class="s1" id="DivOK" style="left: 332px; top: 195px; width: 403px; background-color:#FF9; height:25px">
<table width="100%" border="0" style="font-family:Arial, Helvetica, sans-serif; font-size:12px">
<tr>
<td width="7%">
<input type="checkbox" name="CH_OK" id="CH_OK" style="position:inherit">
</td>
<td width="74%">Permitir serie,numero e item repetido</td>
<td width="19%">&nbsp;</td>
</tr>
</table>

</div>




<input name="TXT_PID" type="hidden" id="TXT_PID" value="<?php echo $PID;?>"/>
<input name="TXT_HWN" type="hidden" id="TXT_HWN" value="<?php echo $HWN;?>"/>
<input name="TXT_CLOSE" type="hidden" id="TXT_CLOSE" value="<?php echo $SYS_CLOSE;?>"/>
<!--FIN_OCULTOS-------------------------------->

</form>
</div>
</div>
</body>
</html>