[% USE KohaDates %]
[% USE Branches %]
[% USE Price %]
[% PROCESS "accounts.inc" %]
<table>
    [% IF ( LibraryName ) %]
    <tr>
      <th colspan="2" class="centerednames">
        <h3>[% LibraryName | html %]</h3>
      </th>
    </tr>
    [% END %]
    [% IF credit.library %]
    <tr>
      <th colspan="2" class="centerednames">
        <h2>[% payment.library.branchname | html %]</h2>
      </th>
    </tr>
    [% END %]
    <tr>
      <th colspan="2" class="centerednames">
        <h3>[% payment.date | $KohaDates %]</h3>
      </th>
    </tr>
    <tr>
      <td>ID de transacción: </td>
      <td>[% payment.accountlines_id %]</td>
    </tr>
    <tr>
      <td>ID de operador: </td>
      <td>[% payment.manager_id %]</td>
    </tr>
    <tr>
      <td>Tipo de pago: </td>
      <td>[% payment.payment_type %]</td>
    </tr>
    <tr>
      <th colspan="2" class="centerednames">
        <h2><u>Recibo de pago</u></h2>
      </th>
    </tr>
    <tr>
      <th>Descripción de los cargos</th>
      <th>Cantidad</th>
    </tr>
    [% FOREACH offset IN payment.credit_offsets %]
    <tr>
        <td>[% PROCESS account_type_description account=debit %]</td>
        <td>[% debit.amount * -1 | $Price %]</td>
    </tr>
    [% END %]
  <tfoot>
    <tr class="highlight">
      <td>Total:</td>
      <td>[% payment.amount * -1 | $Price %]</td>
    </tr>
    <tr>
      <td>Abonado: </td>
      <td>[% collected | $Price %]</td>
    </tr>
    <tr>
      <td>Cambio entregado:</td>
      <td>[% change | $Price %]</td>
    </tr>
  </tfoot>
</table>