{% set apps = pi.get_applications() %} {# Bookings marker row #} {# Then the other rows with real bookings info #} {% for b in all_bookings %} {% endfor %} {% if transactions|length > 0 %} {# Transactions marker row #} {% for t in transactions %} {% endfor %} {% endif %} {# Total marker row #} {% set booking_total = all_bookings|sum(attribute='total_cost') %} {% set extra_total = transactions|sum(attribute='amount') %}
Comment Date Cost ({{ currency }})
Bookings
{{ b['id'] }} --- {{ b['title'] }} {{ b['pretty_start']}} - {{ b['pretty_end'] }} {{ b['total_cost'] }}
Extra costs
{{ t.comment }} {{ t.date|pretty_date }} {{ t.amount|int }}
TOTAL TO BE INVOICED {{ booking_total + extra_total|int }}