<?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,true)" id="btnagregar"><i class="fa fa-plus-circle"></i> Agregar</button></h1>
                <div class="box-tools pull-right">
                  <h1 class="box-title">Notificaciones SMS\Mensaje Clientes Deudores 
                </div>

                <br><br>

                <div class="box box-primary">
                  <div class="box-header">
                    <i class="fa fa-edit"></i>

                    <h3 class="box-title">Información del Plan</h3>
                  </div>
                  <div class="box-body pad table-responsive">
                    <div id="plan-info">Cargando datos...</div>
                    
                  </div>
                  <!-- /.box -->
                </div>


              </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" valign="middle">Opciones</th>
                    <th style="text-align:center" valign="middle">Cliente</th>
                    <th style="text-align:center" valign="middle">Vendedor</th>
                    <th style="text-align:center" valign="middle">Deuda</th>
                    <th style="text-align:center" valign="middle">Nro. CxC</th>
                    <th style="text-align:center" valign="middle">Nro Mensajes</th>
                    <th style="text-align:center" valign="middle">Última Fecha</th>
                    <th style="text-align:center" valign="middle">Persona Contacto</th>
                    <th style="text-align:center" valign="middle">Telefóno</th>
                   <th style="text-align:center" valign="middle">Mensaje</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>
                    
                  </tfoot>   
                </table>
                 
                 <div id="controlmensajevalido-container"></div>
              </div>
              <div class="panel-body" style="height: 400px;" id="formularioregistros">
                <form action="" name="formulario" id="formulario" method="POST">
                  

                
                  
                 
                 
                  
                  
                  <!-- table table-bordered table-hover -->
                  <!-- table table-striped table-bordered table-condensed table-hover -->
                  <div class="form-group col-lg-12 col-md-12 col-xs-12">
                    <table id="detalles" class="table table-bordered table-condensed table-hover">
                      <!-- 
                        Esta comentado porque para el cliente de exportacion la carga de datos es diferente
                        <thead style="background-color:#A9D0F5">
                        <th width=10>Opciones</th>
                        <th>Articulo</th>
                        <th>NúmTarj.</th>
                        <th>Lote/Fecha</th>
                        <th>Cantidad</th>
                        <th>Precio</th>
                        <th>Porcentaje</th>
                        <th>Descuento</th>
                        <th>Subtotal</th>
                      </thead>
                      <tfoot>
                        <tr>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td>Sub-Total</td>
                            <td align="right"><p id="subtotal"></p></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td>Iva</td>
                            <td align="right"><p id="iva"></p></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td>Exento</td>
                            <td align="right"><p id="exento"></p></td>
                        </tr>
                        <tr>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th>TOTAL</th>
                            <th align="right"><h4 id="total"></h4>
                              <input type="hidden" name="total_venta1" id="total_venta1" disabled>
                              <input type="hidden" name="total_venta" id="total_venta">
                            </th>
                        </tr>
                      </tfoot> -->
                      
                    </table>
                  </div>
                </form>
              </div>
              <div class="box-footer" id="formularioregistros1">
                  <div class="btn-group col-lg-12 col-md-12 col-xs-12">
                    <div class="form-group col-lg-4 col-md-4 col-xs-12">
                     
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-xs-12" >
                    
                      
                    </div>
                    <div class="form-group col-lg-4 col-md-4 col-xs-12">
                     
                    </div>
                  </div>
              </div>
              
              <!--Modal-->
              
              <!-- 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/mensajedeudapendiente15.js"></script>
  </body>
  </html> 
<?php 
}

ob_end_flush();
  ?>

