<head>
  <meta charset="utf-8">

<meta name="viewport" content="width=device-width">
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="192x192" href="../img/cloud3.png">



  <meta name="theme-color" content="#563d7c">
  <title>SantanaSoft - POS</title>
  <link rel="icon" sizes="192x192" href="../imagenes/mon.png">
<!--link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"-->
<link rel="stylesheet" href="vendor/fa/css/all.min.css">
<link rel="stylesheet" type="text/css" href="src/bootstrap.min.css">


<link rel="stylesheet" type="text/css" href="src/datatable.css">
<!--link rel="stylesheet" type="text/css" href="../src/bootstrap-theme.css"--->
 <link href="vendor/toastr/toastr.css" rel="stylesheet"/>
<script src="src/jquery.js"></script>
<script src="src/bootstrap.min.js"></script>

<script src="src/datatables.js"></script>
<script src="src/bootstrap_datatable.js"></script>

<script type="text/javascript" src="../js/savy.js"></script>
  <script src="js/numeral.js"></script>
        <script src="js/moment.js"></script>
        <script src="js/fechas.js"></script>

<script src="vendor/alertify.min.js"></script>
  <script src="vendor/toastr/toastr.min.js"></script>
<link rel="stylesheet" href="vendor/alertify.min.css" />


</head>
<br><br>
<div class="container">
<div class="row">
    <div class="col-md-8 col-md-offset-2">
                
                <div class="panel panel-default">
                  <div class="panel-heading">
                  <span class="h3">Configuracion</span>
                  </div>
                    <div class="panel-body">
  <form name="frm" action="set_cookie.php" method="POST">
  <div class="row">
   <div class="col-md-3">
    <span>Base de datos</span>
   </div>
   <div class="col-md-9">
   <input type="text" name="db" id="db" onBlur="saveDb()" class="form-control">
   </div>

   
  </div>

<br>
 <b class="text-primary">Etiqueta de precios</b>
 <hr>

  <div class="row">
   <div class="col-md-3">
    <span>Mostrar nombre empresa</span>
   </div>
   <div class="col-md-9">
   <input type="text" name="label_empresa" id="label_empresa" class="form-control" value="<?php echo $_COOKIE['label_empresa']?>" placeholder="(S) Para si, (N) para no.">
   </div>
  
  </div>
  <br>
  <div class="row">
   <div class="col-md-3">
    <span>Mostrar precio</span>
   </div>
   <div class="col-md-9">
   <input type="text" name="label_precio" id="label_precio" class="form-control" value="<?php echo $_COOKIE['label_precio']?>" placeholder="(S) Para si, (N) para no.">
   </div>
  
  </div>
<br>
 <b class="text-primary">Facturacion</b>
 <hr>

   <div class="row">
   <div class="col-md-3">
    <span>Configurar esta terminal como punto de ventas</span>
   </div>
   <div class="col-md-9">
   <input type="text" name="punto_de_venta" id="punto_de_venta" class="form-control" value="<?php echo $_COOKIE['punto_de_venta']?>" placeholder="(S) Para si, (N) para no.">
   </div>
  
  </div>
  <br>
  
   <div class="row">
   <div class="col-md-3">
    <span>Mostrar ITBIS</span>
   </div>
   <div class="col-md-9">
   <input type="text" name="mostrar_itbis" id="mostrar_itbis" class="form-control" value="<?php echo $_COOKIE['mostrar_itbis']?>" placeholder="(S) Para si, (N) para no.">
   </div>
  
  </div>

    <div class="row">
   <div class="col-md-3">
    <span>Pie de pagina</span>
   </div>
   <div class="col-md-9">
   <textarea  name="pie" id="pie" class="form-control">
    <?php echo $_COOKIE['pie']?>

   </textarea>
   </div>
  
  </div>




  

    <br>
    <hr>
    <button class="btn btn-secondary" name="btn-save"><i class="fa fa-tools"></i> Configurar</button>

</div>
<?php 
include_once("footer.php");
?>
<script>
setup();
 function setup(){
	  if(localStorage.getItem("db")==""){localStorage.setItem("db", "base_prueba")}
	 if(localStorage.getItem("caja")==null){localStorage.setItem("caja", "01")}
	 if(localStorage.getItem("terminal")==null){localStorage.setItem("terminal", "01")}
	 if(localStorage.getItem("db")==null){localStorage.setItem("db", "base_prueba")}
	 if(localStorage.getItem("almacen2")==null){localStorage.setItem("almacen2", "ALMACEN-2")}
	 if(localStorage.getItem("estado_caja")==null){localStorage.setItem("estado_caja", "abierta")}
	 if(localStorage.getItem("servidor")==null){localStorage.setItem("servidor", "217.71.203.122")}
	 if(localStorage.getItem("almacen")==null){localStorage.setItem("almacen", "Almacen-1")}
 }
 
    var dd = localStorage.getItem("db")
	if(dd=="null"){
		dd="base_prueba";
		localStorage.setItem("db", dd);
	}
    $("#db").val(localStorage.getItem("db"));
    
  function saveDb(){
		if($("#db").val() =="null"){$("#db").val("base_prueba");}
        localStorage.setItem("db", $("#db").val())
    }
</script>

</form>
                    </div>
                </div>
    </div>   
</div>   




