<?php $r="../../";
require_once($r."inc/funciones.php");
$mysqli = connectDB($r);
$code = $_POST["code"];
$total = $_POST["total"];
$sqlpago = $mysqli->query("SELECT * FROM `z_abonos` WHERE idabono = '$code'"); ?>
<table class="table table-sm table-bordered table-striped">
    <thead>
    <tr>
      <th scope="col">Usuario</th>
      <th scope="col">Codigo pedido</th>
      <th scope="col">Abono</th>
      <th scope="col">Total</th>
      <th scope="col">Nota</th>
    </tr>
  </thead>
<? while($row1 = $sqlpago->fetch_assoc()){ ?>
  <tr><td><?= sinfo('z_usuarios',$row1['iduser'])['nombre']; ?></td><td><?= $row1['codigopedido'];  ?></td><td><?= moneda($row1['abono']); $tabonos += $row1['abono']; ?></td><td><?= $row1['total']; ?></td><td><?= $row1['nota']; ?></td></tr>
<? } ?>

  <tfoot>
    <tr>
      <td></td>
      <td>TOTAL</td>
      <td><?= moneda($tabonos); ?></td>
    </tr>
  </tfoot>
</table>