<?php
ini_set("session.cookie_lifetime",60*60*10);
ini_set("session.gc_maxlifetime", 60*60*10);
session_start();
include("cls_conexion.php");$CNN=new ClsMySQL();include("conexion23.php");
//++++++
if(strlen($_SESSION['SYS_USER_ID'])==0){JsDir("login.php");	return;}
//++++++
if(vbval($_SESSION['SYS_USER_GI'])!=USU_GET_GI($_SESSION['SYS_USER_ID'])){
	JsDir("cerrar.php");	
	return;
}
//--------------------------------------------------------------------------
$KOD=vbval(V($_GET['ID']));
if($KOD==0){
	$KOD=vbval(V($_POST['KOD']));
}
//--------------------------------------------------------------------------
$TI=0;
?>

<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Proforma - Productos</title>
<?php AddJs(); ?>

<script type="text/javascript" src="js/sis_funcionez.js"></script>

<link rel="stylesheet" type="text/css" href="css/estiloss.css"  />
<link rel="stylesheet" type="text/css" href="css/basic.css"  />

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

<script>
$(document).ready(function(){  
   Inicializar();
   //SYS_LOAD();
});

</script>

</head>
<body>

<div align="center">
<div Id="DivFRM"  class="cF" style="background-color:#FFFFFF;">
<form id="Frm" name="Frm" method="post" 
action="cotizaciones_ver.php" onSubmit="return false;" autocomplete="off">

<!--INI_TITULO--------------------------------->
<div id="DivT" class="dT" style=" width:1000px;" >
<img src="bng/cargos.png" class="iT" />
<div class="tT" style=" width:500px;">PROFORMA - PRODUCTOS</div>
</div>
<!--FIN_TITULO--------------------------------->
<!--INI_BOTONES-------------------------------->
<!--FIN_BOTONES-------------------------------->

<div class="tableFixHead" style="position: absolute; left: 35px; top: 90px; width: 930px; height: 367px;">
<table id="Exportar_a_Excel" style="font-size:0.9rem; width:100%" >
<thead>
<tr align="left">
<th width="2%">#</th>
<th width="14%">CODIGO</th>
<th width="55%">DESCRIPCION</th>
<th width="6%">CANT</th>
<th width="6%">PIEZAS</th>
<th width="7%">PRECIO</th>
<th width="10%">IMPORTE</th>
</tr>
</thead>
<tbody>
<?php
$PX=0;
$s="SELECT * FROM vis_cotizaciones_det 
	WHERE COT_ID=$KOD ORDER BY CX ";
$rs = grs($s);				
while ($r = $rs->fetch_assoc()){
	$PX++;
	$CSS="";
	if($PX%2==0)$CSS=' style="background-color:#D4D4D4" ';
?>
	<tr <?php echo $CSS;?> >
	<!----------------------------------------------->
    <td ><?php echo $PX;?></td>
	<td >'<?php echo $r['COD'];?></td>
	<td ><?php echo $r['DES'];?></td>
	<td ><?php echo $r['CAN'];?></td>
    <td ><?php echo $r['CAN_UNI'];?></td>
    <td ><?php echo NF2($r['PRE'],3);?></td>
    <td ><?php echo NF2($r['IMP'],3);?></td>
	<!----------------------------------------------->       
	   
	</tr>
<?php
}    
?>
    
                
</tbody>
</table>
</div>
<input name="KOD" type="hidden" id="KOD" value="<?php echo $KOD;?>" />
</form>
</div>
</div>
</body>
</html>
