<div class="modal fade" id="myModal9" role="dialog">
      <div class="modal-dialog modal-xl"> 
      <div class="modal-content">
         <div class="modal-header">
             <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">
                                                <h2>Catalogo de Clientes</h2>
                                            </div>
                                            <div class="card-body">
                                                <!-- COMIENZO DEL FORMULARIO -->
                                                <div class="container-fluid">
                            
                                                    <div>
                                                        <table id="tablamaquinas" class="display" style="width:100%">
                                                            <thead>
                                                                <tr>
                                                                    <th>ID</th>
                                                                    <th>Codigo</th>
                                                                    <th>Descripción</th>
                                                                    <th class="text-center">Acciones </th>
                                                                </tr>
                                                            </thead>
                                                            <tfoot>
                                                                <tr>
                                                                    <th>ID</th>
                                                                    <th>Código</th>
                                                                    <th>Descripción</th>
                                                                    <th class="text-center">Acciones </th>
                                                                </tr>
                                                            </tfoot>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                            
                                </div>
                            
                                <script>

                                    $(document).on("click", ".btnAceptar-ctlmaquina", function () {
                                        fila = $(this).closest("tr");
                                        var id_maquina = parseInt(fila.find('td:eq(0)').text());
                                        var des_maquina = fila.find('td:eq(2)').text();
                                        document.getElementsByName('idmaquina-1974')[0].value = id_maquina;
                                        document.getElementsByName('des-maquina88')[0].value = des_maquina;
                                        $("#myModal9").modal("hide");
                                    })

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