	<!DOCTYPE html>
<html>
   <head>
      <title>Venta</title>
		<meta name = "viewport" content = "width = device-width, initial-scale = 1">
		<link rel = "stylesheet" href = "https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
		<script src = "https://code.jquery.com/jquery-1.11.3.min.js"></script>
		<script src = "https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>				
		<script src = "js/info.js"></script>
        <script src ="js/cambio_periodo.js"></script>
   </head>

   <body>        
         <div data-dialog = "true" class = "ui-content">
		 
<?php

include($_SERVER['DOCUMENT_ROOT'].'/_configs/conecta.php' );
include($_SERVER['DOCUMENT_ROOT'].'/_configs/conecta2.php' );
             
$idEmpresa = ("1");
$codigoarticulo = $_GET['articulo'];


			echo "<div id='productgridcontainer' class='product-grid-container container-center'>
			";


                echo "<div class='aproduct-list--row'> ";

					$contengan=chr(209);
 
						
						$queryArtFamStock = ("SELECT  _stock_art  (\"1\",\"".$codigoarticulo."\") as cantidad,des_articu from fsarticu where emp_articu = \"1\" and cod_articu = \"".trim($codigoarticulo)."\";");
						$resArtFamStock = odbc_exec($conexion_resdis,$queryArtFamStock );
						$stockArt = odbc_fetch_array($resArtFamStock);
						
//						$queryPesoMArt = ("select max( fslincom.bru_lincom/fslincom.bul_lincom) as pmedio  from fsexiste,fslincom where fsexiste.emp_existe = fslincom.emp_lincom and fsexiste.lot_lincom = fslincom.lot_lincom and fsexiste.art_existe = fslincom.art_lincom and fsexiste.art_existe = '".$productosArtFam['codart']."' and fsexiste.fec_lincom in (select max(fec_lincom) from   fslincom where art_lincom = '".$productosArtFam['codart']."' );");
//echo $queryPesoMArt;						
//						$resPesoMArt = odbc_exec($conexion_resdis,$queryPesoMArt );
//						$pesoMedioArt = odbc_fetch_array($resPesoMArt);						


						echo "<div class='aproduct-list__item'> ";
							echo "<div class='aprod_grid' data-productcode='".$codigoarticulo."'> ";				
								echo "<ul class='aproduct-grid-icons'></ul>";
									echo "<div class='column-left'>";
									echo "<div class='thumb'>";
										echo "<img class='crispImage' intemprop='image' src='img\\".trim($codigoarticulo).".jpg' alt='".$stockArt['des_articu']."' onerror='missingImage(this);' width='100' height='100'>";
									echo "</div>";
									echo "<div class='column-right'>";
										echo "<span class='details'>".$stockArt['des_articu']."</span>";
										echo "<div class='price-container'>";								
											echo "<p class='price'></p>";
											echo "<p class='pricePerKilogram'>Stock: ".$stockArt['cantidad']."</p>";
										echo "</div>";
										echo "<ul class ='product-grid-labels'></ul>";
										echo "<div class ='cart'>";
											echo "<form id='updateCartFormByProduct_".trim($codigoarticulo)."' name='UpdateQuantityForm' data-productdescription='DescripciondeProduccion' class='UpdateQuantityForm' action='' method='post' data-productcode='".$codigoarticulo."' >";
												echo "<input type='hidden' class='productCode' name='productCodePost' value='".trim($codigoarticulo)."'";
												echo "<input type='hidden' class='initialQuantity' name='initialQuantity' value='1'";
												echo "<input type='hidden' class='quantity' name='quantity' value='1'";										
												echo "<input type='hidden' class='soldByType' name='soldByType' value='QUANTITY'";																				
												echo "<input type='hidden' class='price' name='priceBr' value='2,05'";																														
											echo "</form>";									
											echo "<div class='product-initialAddToCart productGrid-product-initialialAddToCart' data-productcode='".trim($codigoarticulo)."'>";
												echo "<button>Añadir</button>";
											echo "</div>";									
										echo "</div>";
									echo "</div>";
									echo "</div>";

							echo "</div>";
						echo "</div>";

				echo "</div>";
//F DETALLE 							
			//cerramos la etiqueta tabla
echo "</div>";


?>	
<a href="#" class = "ui-btn ui-btn-b" data-rel="back" >Cerrar Ventana</a>
	 	 
         </div>
         
   </body>
</html>
