<?php
//activamos almacenamiento en el buffer
//ob_start();
//session_start();

if (!isset($_SESSION['nombre'])) {
  header("Location: login.html");
}else{
  if ($_SESSION['cxc']==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,true)" id="btnagregar"><i class="fa fa-plus-circle"></i> Agregar</button></h1>
                <div class="box-tools pull-right">
                  <h1 class="box-title">CxC\Solicitud de Nota de Crédito de Vendedores
                </div>
                </br>
              </div>
              <!--box-header-->
              <!--centro-->
              <div class="panel-body table-responsive" id="listadoregistros">
                <table id="tbllistado" class="table table-striped table-bordered table-condensed table-hover">
                  <thead>
                  <th style="text-align:center" align="center">Opciones</th>
                  <th style="text-align:center" align="center">Fecha</th>
                  <th style="text-align:center" align="center">Usuario</th>
                  <th style="text-align:center" align="center">Vendedor</th>
                  <th style="text-align:center" align="center">Cliente</th>
                  <th style="text-align:center" align="center">CxC</th>
                  <th style="text-align:center" align="center">Factura</th>
                  <!-- <th style="text-align:center" align="center">Monto</th>
                  <th style="text-align:center" align="center">Saldo</th>
                  <th style="text-align:center" align="center">Pago</th> -->
                  <th style="text-align:center" align="center">NotaCrédito</th>
                  <th style="text-align:center" align="center">Monto NC</th>
                  <th style="text-align:center" align="center">Estado</th>
                  </thead>
                  <tbody>
                  </tbody>
                  <tfoot>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th></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">
                  
                  <div class="form-group col-lg-12 col-md-12 col-xs-12">
                    <table id="detalles" class="table table-bordered table-condensed table-hover">
                    
                    </table>
                  </div>
                </form>
              </div>
              <div class="box-footer" id="formularioregistros1">
                  <div class="btn-group col-lg-12 col-md-12 col-xs-12">
                    
                  </div>
              </div>
              
              <!--Modal-->
              <div class="modal fade" id="myModalmostrarnc" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" style="width: 40% !important;">
                  <div class="modal-content">
                    <form action="" method="post" name="formaguardarcliente" id="formaguardarcliente">    
                      <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Modificar Nota de Crédito</h4>
                      </div>
                      <div class="modal-body">
                        
                          <div class="form-group col-lg-12 col-md-12 col-xs-12">
                            <label for="">Cliente</label>
                            <input class="form-control" type="text" name="clientenc" id="clientenc" readonly>
                          </div>
                          <div class="form-group col-lg-6 col-md-6 col-xs-12">
                            <label for="">Factura</label>
                            <input class="form-control" type="text" name="facturanc" id="facturanc"  readonly>
                          </div>
                          <div class="form-group col-lg-6 col-md-6 col-xs-12">
                            <label for="">Nota de Entrega</label>
                            <input class="form-control" type="text" name="cxcnc" id="cxcnc" readonly>
                          </div>
                          
                          <div class="form-group col-lg-12 col-md-12 col-xs-12">
                            <div class="box box-success">
                              <div class="box-header with-border">
                                <h3 class="box-title">Nota de Crédito</h3>
                              </div>
                              <div class="box-body">
                                <div class="form-group col-lg-12 col-md-12 col-xs-12">
                                  <label for="">Tipo de Nota de Crédito</label>
                                  <div class="form-group">
                                    <div class="radio">
                                      <label>
                                        <input type="radio" name="optionsRadios" id="notacredito1" value="NOTA DE CREDITO POR PRONTO PAGO">
                                        POR PRONTO PAGO
                                      </label>
                                    </div>
                                    <div class="radio">
                                      <label>
                                        <input type="radio" name="optionsRadios" id="notacredito2" value="NOTA DE CREDITO POR PAGO DIVISAS">
                                        POR PAGO DIVISAS
                                      </label>
                                    </div>
                                    <div class="radio">
                                      <label>
                                        <input type="radio" name="optionsRadios" id="notacredito3" value="NOTA DE CREDITO POR AJUSTE DE PRECIO">
                                        POR AJUSTE DE PRECIO
                                      </label>
                                    </div>
                                    <div class="radio">
                                      <label>
                                        <input type="radio" name="optionsRadios" id="notacredito4" value="NOTA DE CREDITO POR DEVOLUCION">
                                        POR DEVOLUCIÓN
                                      </label>
                                    </div>
                                  </div>
                                </div>
                                
                                <div class="form-group col-lg-12 col-md-12 col-xs-12">
                                  <label for="">Monto Nota crédito</label>
                                  <input class="form-control" type="text" name="montoncm" id="montoncm">
                                </div>

                              </div>
                              <!-- /.box-body -->
                            </div>
                          </div>

                          <input class="form-control" type="hidden" name="iddetalle_cobro" id="iddetalle_cobro" >
                          
                      </div>
                      <div class="modal-footer">
                        <button class="btn btn-default" type="button" data-dismiss="modal">Cerrar</button>
                        <button class="btn btn-success" type="button" id="btnGuardarnc">Guardar</button>
                    
                    
                      </div>
                    </form>
                  </div>
                </div>
              </div>
              
             
              <!-- fin Modal-->

                <!--fin centro-->
            </div>
             <!-- /.box -->
          </div>
          <!-- /.col-md-12 -->
        </div>
         <!-- /.row -->
      </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/mostrarncvendedoresc15.js"></script>
  </body>
  </html> 
<?php 
}

ob_end_flush();
?>

