<?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=gb18030">

<title>Sistema</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">


<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body onload="document.forms['form14']['busqueda'].focus()">

<div class="container-fluid">


<div class="row">

<div class="col-lg-3 col-md-3 col-sm-12" style="background-color: #C8C8C8;">


<?php
include 'nav.php';?>

</div>

<div class="col-lg-9 col-md-9 col-sm-12">
<?php include 'inc_buscar.php'; ?>


<SPAN style="color:red;">NOVEDAD</span>
  <br>
  Ahora puede imprimir códigos de barras propios para sus productos. Le dejo un <a href="https://docs.google.com/document/d/1ylICnEZ1Bm8dS0zC6OpOrxvAvx0qYGtsVcYTx_zg6xo/edit?usp=sharing" target="_blank">manual</a> con las instrucciones de uso.


<hr>



PARA COMENZAR, HAGA CLIC EN <b>NUEVA VENTA</b>.


<? if ($activado == 'si') {} else {echo "<br><B style='color:red'>IMPORTANTE</B> <BR> TODOS LOS PRECIOS Y MOVIMIENTOS QUE REALICE EN ESTA DEMO <B>NO SE PIERDEN</B>. SE CONSERVA TODO TAL CUAL EN CASO DE COMPRAR EL SERVICIO.


<hr>

<b>AYUDA:</b> <a target='_blank' href='https://docs.google.com/document/d/1PxheA-sPM0W3O_KWE3vY-ZNXz74yNOqSMOXh5K2uYb4/edit?usp=sharing'>PRIMEROS PASOS CON EL SISTEMA</a>
<hr>


  "; };?>





<?php
mysql_connect("$host","$usuario","$contra");

mysql_select_db ("$basedatos");


$sql = "SELECT * FROM `avisos`";


$consulta = mysql_query ($sql);

while ($row = mysql_fetch_array($consulta))

{

$ID_aviso = $row["ID"];
$aviso = $row["aviso"];

?><div class="alert alert-danger"><a href="eliminar_aviso.php?ID=<?php echo $ID_aviso ?>">(X)</a> <?php echo $aviso ?></div><?
}

mysql_free_result($consulta);
?>





<hr />
<B>ULTIMOS MOVIMIENTOS:</B><br />
Hoy es <?php echo date(d)?>/<?php echo date(m) ?>/<?php echo date(Y) ?><hr />



<?php
$aa = 0;
include 'concha.php';

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

mysql_select_db ("$basedatos");

$sql = "SELECT * FROM `ventas` ORDER BY ID desc LIMIT 20";

$consulta = mysql_query ($sql);

while ($row = mysql_fetch_array($consulta))

{
$ID_venta = $row["ID"];
$fecha = $row["fecha"];
$total = $row["total"];
$usuario = $row["usuario"];
$forma_pago = $row["forma_pago"];
$ano = substr($fecha, 0,4);
$mes = substr($fecha, 4,2);
$dia = substr($fecha, 6,2);
$hora = substr($fecha, 8,2);
$min = substr($fecha, 10,2);


?>
<div style="margin-bottom: 21px;
background-color: #f4f4f4;
border-bottom: solid;
padding: 15px;
border-color: #373737;
border-width: 1px;">

<?php echo  $hora ?>:<?php echo $min ?> | <?php echo $dia ?>/<?php echo $mes ?> | <b>$ <?php echo $total ?></b><br />
 <a href="javascript:ventanaSecundaria56('ver_detalle_venta.php?ID=<?php echo $ID_venta ?>')"> <i class="fa fa-list" aria-hidden="true"></i> Ver Detalle </a>


<?php  if ($forma_pago == 'tarjeta') { ?> VENTA CON TARJETA <? } else {?>


<form action="pago_con_tarjeta.php?ID=<?php echo $ID_venta ?>" method="POST">
<input name="ID_venta" type="hidden" value="<?php echo $ID_venta ?>" />
<select id="ID_cliente" name="ID_cliente" style="font-size: 11px;">
<option selected="selected">Seleccione ></option>
<option>Débito</option>
<option>Crédito</option>
<option>Merado Pago</option>
<option>Transferencia</option>
<option>Otra App</option>
</select>
<input type="submit" name="button2" id="button2" value="Pagó con Tarjeta"  style="font-size: 11px;"/>
</form>

<?php };?>

<?php  if ($forma_pago == 'fiado') { ?> VENTA FIADO <br />
<? } else {?>



<form action="pago_con_fiado.php" method="POST">
<input name="ID_venta" type="hidden" value="<?php echo $ID_venta ?>" />
<select id="ID_cliente" name="ID_cliente" style="font-size: 11px;">
<option selected="selected">Seleccione  -></option>


<?php

$sql4 = "SELECT * FROM `clientes` ORDER BY ID";

$consulta4 = mysql_query ($sql4);

while ($row4 = mysql_fetch_array($consulta4))

{
$ID_cliente = $row4["ID"];
$nombre = $row4["nombre"];
$direccion = $row4["direccion"];
$email = $row4["email"];
$telefono = $row4["telefono"];


?>
<option value="<?php echo $ID_cliente ?>"><?php echo $nombre ?></option>
<?

}
mysql_free_result($consulta4);

?>

</select>

  <input type="submit" name="button2" id="button2" value="Pagó con Fiado" style="font-size: 11px;" />
</form>




<?php };?>


</div>


<?
}
mysql_free_result($consulta);

?>
PARA VER MAS MOVIMIENTOS HAGA CLIC EN <B>HACER CAJA</B>
</div>




</div>

</div>







<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-146398018-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-146398018-1');
</script>



  <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>


  <script type="text/javascript">window.setInterval(function(){
  $('.grid').isotope({
  itemSelector: '.grid-item'
});
}, 2000);
</script>

<script language=javascript>
function ventanaSecundaria56 (URL){
   window.open(URL,"ventana1","width=600,height=500,scrollbars=NO")
}
  </script>
</body>
</html>
