{% extends "registry/read.html" %}

{% block fieldset_details_after %}
<fieldset>
  <legend>
    balance
  </legend>
    <label>
    Balance of costs on this account: <strong> {{ domainObject.calculateBalance }}</strong> 
    </label>
</fieldset>
{% if domainObject.getEntriesUnadjusted %}
<fieldset>
  <legend>
    entries
  </legend>
</fieldset>

<table>
  <tr>
    <th>ID</th>
    <th>Booked</th>
    <th>Comment</th>
    <th>Amount</th>
  </tr>
  {% for entry in domainObject.getEntriesUnadjusted %}
  <tr>
    <td style="text-align: right">{{ entry.id }}</td>
    <td><nobr>{{ entry.present.bookingDate }}</nobr></td>
    <td><nobr>{{ entry.comment }}</nobr></td>
    <td style="text-align: right">{{ entry.amount }}</td>
  </tr>
  {% endfor %}
  <tr>
    <td></td>
    <td></td>
    <td></td>
    <th style="text-align: right">{{ domainObject.calculateBalance }}</th>
  </tr>
</table>
{% endif %}
{% comment %}
{% endcomment %}
{% endblock %}

