  <div class="modal fade" id="myModal2" role="dialog">
    <div class="modal-dialog modal-xl"> 
      <!-- Modal content-->
      <div class="col-lg-12"></div>
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
        </div>
        <div class="modal-body">
          <div class="container">
            <div class="row">
              <div class="col-lg-12">
                <div class="card shadow-lg p-3 mb-5 bg-white ">
                  <div class="card-header">Listado de clientes</div>
                  <div class="card-body">
                    <!-- COMIENZO DEL FORMULARIO -->
                    <form id="list-clientes" action="" method="POST" class="needs-validation" novalidate>                    
                      <div class="container mt-3">
                        <h2>Listado de Clientes</h2>
                        <input class="form-control" id="myInput-cliente2" type="text" value = "" placeholder="Search..">
                        <br>
                        <table class="table table-hover">
                          <thead>
                            <tr>
                              <th>ID</th>
                              <th>Descripcion</th>
                              <th>RIF</th>
                            </tr>
                          </thead>
                          <tbody id="myTable-cliente">
                            {{#each lista}}
                            {{#each lista_clientes}}
                            <tr>
                              <td> {{id_cliente}}</td>
                              <td> {{nombre}}</td>
                              <td> {{rif}}</td>
                            </tr>
                            {{/each}}
                            {{/each}}
                          </tbody>
                        </table>
                      </div>
                    </form>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>
    </div>
  </div>

{{!-- scripts para el catalogo de clientes --}}

<script>
    $(document).ready(function () {
      $("#myInput-cliente2").on("keyup", function () {
        var value = $(this).val().toLowerCase();
       
        $("#myTable-cliente tr").filter(function () {
          $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
        });
      });
    });    
 </script>

 
<script>

var table2 = document.getElementById('myTable-cliente');
for(var r = 0; r < table2.rows.length; r++) {
  table2.rows[r].addEventListener('click', function() {
    var id_cliente = '';
    var des_cliente = '';
    id_cliente = this.cells[0].innerHTML;
    des_cliente = this.cells[1].innerHTML;
    document.getElementsByName('idcliente')[0].value = id_cliente;
    document.getElementsByName('des-cliente')[0].value = des_cliente;
    $("#myModal2").modal("hide");
  });
}
</script>
