<?php 
//activamos almacenamiento en el buffer
//ob_start();
//session_start();
if (!isset($_SESSION['nombre'])) {
  header("Location: login.html");
}else{
  if ($_SESSION['ventas']==1) {
  ?>
      <!-- Main content -->
      <section class="content">
        <!-- Default box -->
        <div class="row">
          <div class="col-md-12">
            <div class="box">
                <div class="box-header with-border">
                  <button class="btn bg-green btn-app" onclick="mostrarform(true)" id="btnagregar"><i class="fa fa-plus-circle"></i>Agregar</button> 
                    <div class="box-tools pull-right">
                      <h1 class="box-title">Proceso\Registar Gasto de Caja Chica
                    </div> 
                </div>
                <!--box-header-->
                <!--centro-->
                <div class="panel-body table-responsive" id="listadoregistros">
                  <div class="form-group col-lg-5 col-md-5 col-xs-12">
                      
                  </div>
                  <div class="form-group col-lg-2 col-md-2 col-xs-12">
                      <label for="">Saldo De Caja Chica</label>
                      <input class="form-control" type="text" name="saldo1" id="saldo1" placeholder="Saldo" readonly>
                  </div>
                  <div class="form-group col-lg-5 col-md-5 col-xs-12">
                      
                  </div>
                  <table id="tbllistado" class="table table-striped table-bordered table-condensed table-hover">
                    <thead>
                      <th>Opciones</th>
                      <th>Fecha</th>
                      <th>Descripción</th>
                      <th>Monto</th>
                      <th>Tipo Registro</th>
                      <th>Estado</th>
                    </thead>
                    <tbody>
                    </tbody>
                    <tfoot>
                      <!-- <th>Opciones</th>
                      <th>Vehículo</th>
                      <th>Placa</th>
                      <th>Capacidad</th>
                      <th>Estado</th> -->
                      <th></th>
                      <th></th>
                      <th></th>
                      <th></th>
                      <th></th>
                      <th></th>
                    </tfoot>   
                  </table>
                  
                </div>
              
                <div class="panel-body" style="height: 400px;" id="formularioregistros">
                  <form action="" name="formulario" id="formulario" method="POST">
                    <input class="form-control" type="hidden" name="idregistrodecuentas" id="idregistrodecuentas">
                    <input class="form-control" type="hidden" name="idbancocuenta" id="idbancocuenta" value="1">
                    <input class="form-control" type="hidden" name="validado" id="validado">
                    <input class="form-control" type="hidden" name="idempresa_venta" id="idempresa_venta" value="<?php echo $_SESSION['idempresa_venta_empresa'] ?>" >
                    <input class="form-control" type="hidden" name="monto" id="monto">
                    <input class="form-control" type="hidden" name="tasa_dollar" id="tasa_dollar" >
                    <div class="form-group col-lg-4 col-md-4 col-xs-12">
                      <label for="">Descripción</label>
                      <input class="form-control" type="text" name="detalle" id="detalle"placeholder="Descripción">
                    </div>
                   
                    <div class="form-group col-lg-4 col-md-4 col-xs-12">
                      <label for="">Monto $</label>
                      <input class="form-control" type="text" name="montod" id="montod" placeholder="Monto $">
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-xs-12">
                      <label for="">Cuenta</label>
                      <select name="tiporegistro" id="tiporegistro" class="form-control selectpicker" data-live-search="true" >
                      <option value="CARGO">CARGO</option>
                      <option value="ABONO">ABONO</option>
                      </select>
                      
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-xs-12">
                      <label for="">Fecha</label>
                      <input class="form-control" type="date" name="fecha_hora" id="fecha_hora" placeholder="Fecha">
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-xs-12">
                      <label for="">Cuenta</label>
                      <select name="idbancocuenta" id="idbancocuenta" class="form-control selectpicker" data-live-search="true" >
                      </select>
                      
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-xs-12">
                      <label for="">Saldo</label>
                      <input class="form-control" type="text" name="saldo" id="saldo" placeholder="Saldo" readonly>
                    </div>
                   

                  </form>
                </div>
                
                <div class="box-footer" id="formularioregistros1">
                    <button class="btn bg-blue btn-app pull-right" type="submit" id="btnGuardar"><i class="fa fa-save"></i>  Guardar</button>
                    <button class="btn bg-red btn-app pull-right" onclick="cancelarform()" type="button"><i class="fa fa-arrow-circle-left"></i> Cancelar</button>
                </div>
              
              <!--fin centro-->
            </div>
          </div>
        </div>
        <!-- /.box -->
      </section>
      <!-- /.content -->
    </div>
    <?php 
  }else{
    require 'vistas/contenidos/noacceso-view.php'; 
  }
  ?>
          <!-- Main Footer -->
          <?php include "vistas/modulos/mainfooter.php";?>
      </div>

      <!-- ./wrapper -->
      <!-- REQUIRED JS SCRIPTS -->
      <?php include "vistas/modulos/script.php";?>
      <script src="vistas/scripts/registrodecuentas.js"></script>
      </body>
  </html> 
<?php  
}
  ob_end_flush();
?>
