<?php include 'sesion_user.php';?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Panel</title>





<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> 

<link href="http://radioshosting.com/css/delalora4new.css" rel="stylesheet">




</head>



<body>





<div class="container-fluid">



<div class="row">



<div class="col-lg-12 col-md-12 col-sm-12">







<?

$ID_venta = (int)$_GET['ID'];

$total = 0;



?>



Venta N° <b><?php echo $ID_venta ?></b><hr />



<?

mysql_connect("$host","$usuario","$contra");



mysql_select_db ("$basedatos");





$sql = "SELECT * FROM `movimientos` WHERE `ID_venta` = '$ID_venta'";





$consulta = mysql_query ($sql);



while ($row = mysql_fetch_array($consulta))



{



$ID_articulo = $row["ID_articulo"];

$precio = $row["precio"];

$cantidad = $row["cantidad"];

$detalle = $row["detalle"];


if ($multicaja == 1) { mysql_select_db ("$basedatos_multicaja"); };

$sql22 = "SELECT * FROM `articulos` WHERE `ID` = '$ID_articulo' LIMIT 1";



$consulta22 = mysql_query ($sql22);



while ($row22 = mysql_fetch_array($consulta22))



{



$ID_producto = $row22["ID"];

$titulo = $row22["titulo"];

$foto = $row22["foto"];

}



mysql_free_result($consulta22);

if ($multicaja == 1) { mysql_select_db ("$basedatos"); };

if ($cantidad <= 1) { 



}

else {

$precio = $precio * $cantidad;

};









$total = $total + $precio;



?>

<?php if($ID_articulo == 0) { echo $detalle; } else { echo $titulo; }; ?>  <span style="font-size:9px">(x <?php echo $cantidad ?>)</span> = <b>$ <?php echo $precio ?></b><hr>

 

<?

}



mysql_free_result($consulta);



?><hr> <span style="color:#006600"><b>Total: $ <?php echo $total ?></span> </b><?



?>





</div>



</div>



</div>


<div style="position: fixed;
right: 0px;
top: 0px;
border: solid;
padding: 6px;
border-width: 1px;
font-size: 25px;
background-color: #d5ffcc;">$ <?php echo $total ?></div>
    



  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>

  






</body>

</html>

