<?php if(session_id() ==null)
  {
  
    session_start();
  }

  $nombrecom ="";

  if(isset($_SESSION["nombrecom"]))
{
    $nombrecom = $_SESSION["nombrecom"];
}

  
?>

<!DOCTYPE html>
<html lang="es">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <link rel="stylesheet" href="ticket/ticket.css">
		
        <title>SysOptica</title>
    </head>
    <body>
        <div class="ticket">
            
			 <img src="/views/assets/img/logo.png" alt="LPSoftware-Logo" />
            <p class="centered"><?php //echo $rw['nombre_comercial'];?> 
                <br><strong>Teléfono :</strong>78787878 
                <br><strong>Dirección:</strong> SAN MIGUEL
				<br><strong>Fecha: </strong>
				<br><strong>Ticket Nº: </strong> 12345
				</p>
				
				
			<p >
				<strong>Cliente :</strong> <?php echo $nombrecom;?> 
				<br><strong>Dirección: </strong> 
				
				</p>	
            <table>
                <thead>
                    <tr >
                        <th class="quantity both_border">Cant.</th>
                        <th class="description both_border">Descripción</th>
                        <th class="price both_border">Total</th>
                    </tr>
                </thead>
                <tbody>
				<?php
					
				?>
                    <tr>
                        <td class="quantity">1</td>
                        <td class="description">Liquido limp.</td>
                        <td class="price">10.00</td>
                    </tr>
				<?php 
			

				?>	
                
                    <tr>
                        <td class="quantity">2</td>
                        <td class="description">Aros negros</td>
                        <td class="price">55.00</td>
                    </tr>
					
					<tr>
                        <td class="quantity"></td>
                        <td class="description"> IVA </td>
                        <td class="price">7.8</td>
                    </tr>
					
					<tr>
                     
                        <th class="price totales both_border" colspan=3> TOTAL  $ <?php echo number_format(60,2);?></th>
                    </tr>
                </tbody>
            </table>
            <p class="centered">Gracias por su compra!
                <br>www.estrelladavid.com.sv</p>
        </div>
		
        <button id="btnPrint" class="hidden-print" onclick="window.print();">Imprimir</button>
		<button  class="hidden-print" onclick="window.close();">Cerrar</button>
		<script type="text/javascript" src="views/assets/jquery-3.5.1/jquery-3.5.1.js"></script> 
        <script src="views/ticket/script.js"></script>
    </body>
</html>

<?php
/*

//Guardando los datos del ticket
$fecha=date("Y-m-d H:i:s");
$sql="INSERT INTO `facturas` (`id`, `fecha`, `id_cliente`, `monto`) VALUES (NULL, '$fecha', '$cliente', '$total');";
$save=mysqli_query($con,$sql);
$delete=mysqli_query($con,"delete from tmp");
*/
?> 