{% extends "base.html" %} {% block content %} {# Landscape when printed — the wide detail table reads better that way. As THIS document's default page, not a named page: with mixed page sizes a printer may still print a later unit's part portrait. This way there is only one size. #}

{{ t('tvb_title') }} – {{ r.month_name }}

{{ t('tvb_intro') }}

{% for u in r.units %}

{{ u.name }} — {{ t('tvb_number') }} {{ u.tvb_number or '?' }}

{% if u.warnings %}
{{ t('tvb_warnings') }}: {% for w in u.warnings %}
{{ w }}
{% endfor %}
{% endif %} {% if not u.rows %}

{{ t('tvb_empty') }}

{% else %}

{{ t('tvb_detail') }}

{% for row in u.rows %} {% endfor %}
{{ t('col_room') }}{{ t('col_name') }}{{ t('tvb_col_land') }} {{ t('col_sheetno') }}{{ t('tvb_col_gb_new') }} {{ t('tvb_col_stay') }}{{ t('tvb_col_nights_month') }} {{ t('tvb_col_note') }}
{{ row.room or '' }}{{ row.name }}{{ row.land }} {{ row.sheet or '' }}{{ row.person }} {{ row.arrival|date }}–{{ row.departure|date }}{% if row.total_nights %} ({{ row.total_nights }}){% endif %} {{ row.nights }} {{ t('tvb_status_frei') if row.exempt else t('tvb_status_pflichtig') }}
{{ row.note or '' }}
{# heading and tables stay on ONE sheet: otherwise "Für Feratel" can slide alone to the bottom of a page and the figures onto the next #}

{{ t('tvb_feratel') }}

{% for part, label in (('pflichtig', t('tvb_pflichtig')), ('frei', t('tvb_frei'))) %}
{% for v in u[part] %} {% endfor %}
{{ label }}{{ t('tvb_col_pn') }}
{{ v.land }}{{ v.persons }}/{{ v.nights }}
{{ t('sum_label') }} {{ u[part + '_sum'].persons }}/{{ u[part + '_sum'].nights }}
{% endfor %}

{{ t('tvb_total') }}: {{ t('tvb_pflichtig') }} {{ u.pflichtig_sum.persons }}/{{ u.pflichtig_sum.nights }} · {{ t('tvb_frei') }} {{ u.frei_sum.persons }}/{{ u.frei_sum.nights }}  ·  {{ t('tvb_betrag') }}: {{ u.betrag|euro }} ({{ u.pflichtig_sum.nights }} × {{ r.rate|euro }})  ·  {{ t('tvb_new_sheets') }}: {{ u.new_sheets }}

{% endif %}
{% endfor %} {% endblock %}