This is the document from which I will send the id
<script type="text/javascript" src="ajax/paid/ajax.js"></script>
<script type="text/javascript">
$(function(){
$("#btnPaid").click();
});
</script>
<?php endif; ?>
<?php
$fact = FacturaData::getByTipoPago();
?>
<div class="row">
<?php include("modals/rePaid.php"); ?>
<div class="col-md-12">
<h1>Abonos</h1>
<div class="tab-content">
<div id="prods" class="tab-pane fade in active">
<p><b>Buscar </b></p>
<div class="row">
<div class="col-md-5 col-sm-6 col-xs-10">
<div class="input-group">
<input type="text" name="product" id="busqueda" placeholder="Buscar producto" class="form-control" autofocus>
<span class="input-group-addon"><i class="fa fa-search fa-fw"></i>Buscar</span>
</div>
</div>
<div class="clearfix"></div>
<br>
<div class="col-md-12">
<?php if ($fact): ?>
<div class="tab-content">
<div id="process" class="tab-pane fade in active">
<div class="clearfix"></div>
<div class="table-responsive">
<table class="table table-hover table-bordered">
<thead>
<th></th>
<th>No.</th>
<th>Cliente</th>
<th>Vendedor</th>
<th>Fecha</th>
<th>Tipo De Documento</th>
<th>Total</th>
</thead>
<tbody>
<?php foreach ($fact as $fa): ?>
<?php
$prodsx = FacturaData::getAllSellsByFactId($fa->id); #Productos vendidos en la factura
$servsx = FacturaData::getAllServicesByFactId($fa->id); #Servicios vendidos en la factura
?>
*AQUI ES DONDE QUIERO QUE COJA EL ID Y ME LO ENVIE AL MODAL PARA LUEGO EN EL MODAL RECIBITLO CON GET*
<td style="width:40px;"><a id="btnPaid" data-toggle="modal" data-target="#rePaid" class="btn btn-xs btn-default"><i class="glyphicon glyphicon-eye-open"></i></a></td>
<td><?php echo $fa->numerofactura; ?></td>
<td><?php echo $fa->getClient()->name." ".$fa->getClient()->lastname; ?></td>
<td><?php echo $fa->getUser()->name." ".$fa->getUser()->lastname; ?></td>
<td><?php echo $fa->fecha; ?></td>
<td><?php echo $fa->getComprobante()->nombre; ?></td>
<td>
<?php
$total=0;
foreach($prodsx as $p){
$prd = $p->getProduct();
$total += $p->cantidad * $prd->precioventa;
}
foreach ($servsx as $s) {
$srv = $s->getService();
$total += $s->cantidad * $srv->precio;
}
echo "<b>$ ".number_format($total,2,'.',',')."</b>";
?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php else: ?>
<div class="clearfix"></div>
<div class="alert alert-info">
Vaya! No no se encontro ningun registro entre esas fechas.
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<div id="servs" class="tab-pane fade">
<p><b>Agregar servicio a la venta</b></p>
<br>
<div class="row">
<div class="col-md-12" id="resultado_srv">
</div>
</div>
</div>
</div>
</div>
</div>