[% 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 %]
 <tr>
    <th colspan="2" class="centerednames">
        <h2>[% Branches.GetName( credit.branchcode ) | html %]</h2>
    </th>
 </tr>
<tr>
    <th colspan="2" class="centerednames">
        <h3>[% credit.date | $KohaDates %]</h3>
</tr>
<tr>
  <td>ID de transacción: </td>
  <td>[% credit.accountlines_id %]</td>
</tr>
<tr>
  <td>ID de operador: </td>
  <td>[% credit.manager_id %]</td>
</tr>
<tr>
  <td>Tipo de pago: </td>
  <td>[% credit.payment_type %]</td>
</tr>
 <tr></tr>
 <tr>
    <th colspan="2" class="centerednames">
        <h2><u>Recibo</u></h2>
    </th>
 </tr>
 <tr></tr>
 <tr>
    <th>Descripción de los cargos</th>
    <th>Cantidad</th>
  </tr>

  [% FOREACH debit IN credit.debits %]
    <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>[% credit.amount * -1| $Price %]</td>
  </tr>
  <tr>
    <td>Abonado: </td>
    <td>[% collected | $Price %]</td>
  </tr>
  <tr>
    <td>Cambio: </td>
    <td>[% change | $Price %]</td>
    </tr>
</tfoot>
</table>