            <!-- start: Content -->
            <div id="content">
            
            <div class="col-lg-12 top-20 padding-0">
              <div class="col-md-12">
                <div class="panel">
                   <div class="panel box-shadow-none content-header">
              <div class="panel-body">
                <div class="col-md-12">
                  <h3 class="animated fadeInLeft">Tipos de Pagos</h3>
                  <p class="animated fadeInDown"> 
                    Configuración <span class="fa-angle-right fa"></span> Tipos de Pagos
                  </p>
                </div>
              </div>
            </div>
                  <div class="panel-body">
                    <?php $session = \Config\Services::session();  if(!empty($session->getFlashdata('mensaje_malo'))):?>
                      <div class="alert alert-danger alert-dismissible show" role="alert">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                          <span aria-hidden="true">&times;</span>
                        </button>
                        <?php echo $session->getFlashdata('mensaje_malo'); ?>
                      </div>
                    <?php endif;?>
                    <?php $session = \Config\Services::session();  if(!empty($session->getFlashdata('mensaje_bueno'))):?>
                      <div class="alert alert-success alert-dismissible show" role="alert">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                          <span aria-hidden="true">&times;</span>
                        </button>
                        <?php echo $session->getFlashdata('mensaje_bueno'); ?>
                      </div>
                    <?php endif;?>
                    <div class="form-group">    
                      <button class="btn btn-warning waves-effect waves-light" type="button" data-toggle="modal" data-target="#agregarmodal">
                        <span class="btn-label">
                          <i class="fa fa-plus"></i>
                        </span>
                        Agregar
                      </button>   
                    </div>
                    <div class="responsive-table">
                      <table id="datatables-example" class="table table-striped table-bordered" width="100%" cellspacing="0">
                        <thead>
                          <tr>
                           <th>#</th>
                           <th>Tipo de Pago</th>
                           <th>Descripción</th>
                           <th>Estado</th>
                           <th>Acciones</th>

                         </tr>
                       </thead>
                       <tbody>

                         <?php $i=1; foreach($datos_tipo_pago as $item):?>
                         <tr>
                          <td><?php echo $i ;?></td>
                          <td><?php echo $item['tip_tipo_pago'];?></td>
                          <td><?php echo $item['tip_descripcion'];?></td>
                          <td>
                            <?php 
                            if($item['tip_estado']==1){
                              echo '<div class="text-success"> ACTIVO</div>';
                            }else{
                             echo '<div class="text-danger"> INACTIVO</div>';
                           } 
                           ?>
                         </td>  
                         <td>
                          <a href="#" data-toggle="modal" data-target="#editarmodal" onclick="editarvistapago('<?php echo $item['tip_id'];?>','<?php echo $item['tip_tipo_pago'];?>','<?php echo $item['tip_descripcion'];?>');">
                            <button class="btn btn-3d btn-info" type="button" >
                              <i class="fa fa-edit"></i>                        
                            </button>
                          </a>                          
                          <a href="<?php echo base_url(); ?>/public/TipoPago/eliminar/<?php echo $item['tip_id']; ?>" onclick="return confirm('Estás seguro que deseas eliminar el registro?');" title="Eliminar"  >
                            <button class="btn btn-3d btn-danger" type="button" >
                              <i class="fa fa-close"></i>                      
                            </button>
                          </a>
                        </td>

                      </tr>
                      <?php $i=$i+1; endforeach;?>
                    </tbody>
                  </table>
                </div>

              </div>
            </div>
          </div>  
        </div>
      </div>
      <!-- end: content -->

      <div class="modal fade" id="agregarmodal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <h5 class="modal-title" id="exampleModalLabel">Agregar</h5>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <form method="post" action="<?php echo base_url("TipoPago/add"); ?>">
                <div class="form-group form-animate-text">
                  <input type="text" class="form-text" id="tipopago" name="tipopago">
                  <span class="bar"></span>
                  <label>Tipo de pago</label>
                </div>
                <div class="form-group form-animate-text">
                  <input type="text" class="form-text" id="descripciontipopago" name="descripciontipopago">
                  <span class="bar"></span>
                  <label>Descripción </label>
                </div>
                
                <div class="modal-footer">
                  <button type="button" class="btn  btn-3d btn-danger" data-dismiss="modal">Cerrar</button>
                  <input type="submit" class="btn  btn-3d btn-success" value="enviar"/>
                </div>
              </form>
            </div>

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

      <div class="modal fade" id="editarmodal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <h5 class="modal-title" id="exampleModalLabel">Editar</h5>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <form method="post" action="<?php echo base_url("TipoPago/editar"); ?>">
                <input type="hidden" id="editartipid" name="editartipid">
                <div class="form-group form-animate-text">
                  <input type="text" class="form-text" id="editartipopago" name="editartipopago">
                  <span class="bar"></span>
                  <label>Tipo de pago</label>
                </div>
                <div class="form-group form-animate-text">
                  <input type="text" class="form-text" id="editardescripciontipopago" name="editardescripciontipopago">
                  <span class="bar"></span>
                  <label>Descripción</label>
                </div>                
                <div class="modal-footer">
                  <button type="button" class="btn  btn-3d btn-danger" data-dismiss="modal">Cerrar</button>
                  <input type="submit" class="btn  btn-3d btn-success" value="enviar"/>
                </div>
              </form>
            </div>

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