header("location:/index.html");
}
session_start();
$_SESSION['display'] = "pos";
// echo "<br>user: "******"<br>nid: ".$nid=$_SESSION['nid'];
// echo "<br>tipomov_id: ".$tipomov_id=$_SESSION['fdid_tipomov_id'];
// echo "<br>cliente_id: ".$cliente_id=$_SESSION['dev_cliente_id'];
// echo "<br>saldo _anterior: ".$saldo_anterior=$_SESSION['dev_saldo'];
// echo "<br>saldo: ".$saldo_nuevo=0;
// echo "<br>";
echo "<html>\n\t<head>\n\t<title>Imprimir</title>\n\t<style type=\"text/css\">\n\tbody{\n\t\tfont-family: arial, helvetica;\n\t\tfont-size: x-small; \n\t}\n\n\ttable{\n\t\tfont-size: small;\n\t}\n\n\t</style>\n\t</head>\n\t<body onload=\"window.print()\">";
echo "<table width=350>";
echo "<tr><td style='text-align:center;'>";
getfactura($fid);
$no_ticket = sprintf('T%06d', $fid);
echo "<br><br><img width=\"200\" src=\"barcode.php?text={$no_ticket}\" alt=\"barcode\">";
echo "</td></tr>";
echo "</table>";
echo "<table width=350>";
echo "<tr><td>";
$did = $_GET['did'];
$vale = get_devolucion($_GET['did']);
echo "<br>dev:{$did}..{$vale}</td></tr>";
echo "</table>";
//if ($notaventa)
//echo "<br><br>Nota de venta por: ".dinero($notaventa);
echo "<table width=350 border=2>";
echo "<tr><td>";
if ($vale > 0) {
				  		</table>
				  		</form>
				  	</div>


		<div class="row-fluid condensed">	

				<div class=" span4">
					<div class="header">
						<!-- <h2><i class="halflings-icon align-justify "></i><span class="break "></span>Nota de Venta</h2> -->
						
					</div>
					<div class="">
		
					<?php 
getfactura($fid_dev);
?>
					<br><br><br>
					</div>
				</div>


				<div class="box span4">

							  		<?php 
if ($nid <= 8) {
    view_devoluciones($fid_dev);
}
?>

				</div><!--/span-->