{% extends "django_pettycash/dpc_base.html" %} {% load url from future %} {% load i18n %} {% block head_resources %} {% endblock head_resources %} {% block content %}

{% trans "Entry list" %} – {{data.month}}

{% if perms.django_pettycash.add_entry %} {% trans "Add" %} {% endif %} {% trans "Export in CSV" %}
{% if object_list %}
{# First row #} {% for source in data.sources %} {% endfor %} {# Second row #} {% for source_pk, source_data in data.per_source.iteritems %} {% endfor %} {# Third row #} {% for source in data.sources %} {% endfor %} {# Entries rows #} {% for e in data.entries %} {# Date #} {# Reason #} {# Amount cells #} {% for cell in e.amount_cells %} {% endfor %} {# Tags #} {# Actions #} {% endfor %} {# Totals rows #} {% for source_pk, source_data in data.per_source.iteritems %} {% endfor %} {% for source_pk, source_data in data.per_source.iteritems %} {% endfor %} {# Inbound / Outbound row repetition #} {% for source in data.sources %} {% endfor %} {# Final balance row #} {% for source_pk, source_data in data.per_source.iteritems %} {% endfor %} {# Source names row repetition #} {% for source in data.sources %} {% endfor %}
{{source}}{% trans "Tags" %} {% trans "Actions" %}
{% trans "Initial balance" %} {{data.global.start|floatformat:2}} €{{source_data.start|floatformat:2}} €
{% trans "Inbound" %} {% trans "Outbound" %}
{{e.entry.date}}{{e.entry.reason}}{% if cell %}{{cell|floatformat:2}} €{% endif %} {% for tag in e.entry.tags.all %} {{tag.name}} {% endfor %} {% if e.entry.note %} {% endif %} {# TODO: Think about using a with block or to check the permissions in the view, to access request.user.perms only once #} {% if perms.django_pettycash.add_entry or perms.django_pettycash.change_entry or perms.django_pettycash.delete_entry %}
{% endif %} {% if perms.django_pettycash.change_entry %} {% endif %} {% if perms.django_pettycash.delete_entry %} {% endif %} {% if perms.django_pettycash.add_entry or perms.django_pettycash.change_entry or perms.django_pettycash.delete_entry %}
{% endif %}
{% trans "Totals" %}{{source_data.inbound|floatformat:2}} € {{source_data.outbound|floatformat:2}} €
{{source_data.total|floatformat:2}} €
{% trans "Inbound" %} {% trans "Outbound" %}
{% blocktrans with month=data.month %} Final balance
{{month}} {% endblocktrans %}
{{data.global.end|floatformat:2}} €{{source_data.end|floatformat:2}} €
{{source}}
{% else %}

{% trans "No entries" %}

{% endif %} {% endblock content %}