{% extends "layout.jinja" %} {% from "macros.jinja" import left_arrow, right_arrow, colorize %} {% set JSFunction = "showJS" %} {% block js %} {{ super() }} {% endblock %} {% block heading %} {% if exps | length > 1 %} Aktuelle Kosten {% else %} Kosten für {{exps[0]|date}} {% endif %} {% endblock %} {% block content %} {% for e, p in zip(exps,pies) %} {% if exps | length > 1 %}

{{e|date}}

{% endif %}
{% for c in e.catexps | sort(attribute="cat.name") %} {% call(exp) detail(name=c.cat.name, sum=c.expense, set=c.all) %} {{exp.day}}.{{exp.month}}. -- {{exp.description}}: {{exp.expense | eur }} {% endcall %} {% endfor %} {% call(exp) detail(name="Constant", sum=e.constsum, set=e.consts) %} {{exp.monthly}} -- {{exp.description}} {% endcall %} {% call(exp) detail(name="In Summa", sum=e.sum, set=e.all, color="#ff2d2d") %} {{exp.day}}.{{exp.month}}. -- {{exp.description}}: {{exp.expense | eur}} {% endcall %}
{% endfor %} {# Note: exps are given _reversed_, i.e. "exps | last" is the _first_ on the timeline #} {% set d = exps | last | prev_date | date %} {{ left_arrow(url_for(".show_date_str", p = d), d) }} {% set first = exps | first %} {% if not first is last_date %} {% set d = first | next_date | date %} {{ right_arrow(url_for(".show_date_str", p = d), d) }} {% endif %} {% endblock content %} {% macro detail(name, sum, set, color=None) %}
{% call colorize(fgcolor=color) %} {{name}}: {{sum | eur}}
{% endcall %}
{% endmacro %}