{% extends "members/tex_base.tex" %}
{% load static common tex_extras %}

{% block title %}Seminarbericht{% endblock %}

{% block content %}

% DESCRIPTION TABLE
\begin{table}[H]
    \begin{tabular}{ll}
        \large Kursname: & {% if not memberlist.ljpproposal %}{{ memberlist.name|esc_all }}{% else %}{{ memberlist.ljpproposal.title|esc_all }} {% endif %} \\
        \large Ordnungsnummer & {{ memberlist.code|esc_all }} \\
        \large Gruppe: & {{ memberlist.groups_str|esc_all }} \\
        \large Ort / Stützpunkt: & {{ memberlist.place|esc_all }} \\
        \large ggf. Ziel: & {{ memberlist.destination|esc_all }} \\
        \large Zeitraum: & {{ memberlist.time_period_str|esc_all }} \\
        \large Betreuer:innen: & {{ memberlist.staff_str|esc_all }} \\
    \end{tabular}
\end{table}

\section{Teilnehmer*innenliste}

\begin{tabularx}{.97\linewidth}{lp{0.2\textwidth}Xlccc}
    \toprule
    \# & \textbf{Name} & \textbf{Anschrift} & \textbf{Geburtsdatum} & \textbf{m} & \textbf{w} & \textbf{d} \\
    \midrule
    \endhead
    \bottomrule
    \endfoot
    {% for m in memberlist.membersonlist.all %}
        {{ forloop.counter }} & {{ m.member.name|esc_all }} & {{ m.member.address|esc_all }} & {{ m.member.birth_date_str|esc_all }}
                                    & {% if m.member.gender == 0 %} x {% endif %}
                                    & {% if m.member.gender == 1 %} x {% endif %}
                                    & {% if m.member.gender == 2 %} x {% endif %} \\
    {% endfor %}
\end{tabularx}

{% if memberlist.statement %}

\section{Kosten}

\begin{tabularx}{.97\textwidth}{Xr}
    \toprule
    \textbf{Beschreibung} & \textbf{Betrag} \\
    \midrule
    {% if memberlist.statement.total_allowance > 0 %}
    Aufwandsentschädigung & {{ memberlist.statement.total_allowance }} € \\
    {% endif %}
    {% for bill in memberlist.statement.grouped_bills %}
        {{ bill.short_description|esc_all }} & {{ bill.amount }} € \\
    {% endfor %}
    \midrule
    Gesamt & {{ memberlist.statement.total_theoretic }} € \\
    \bottomrule
\end{tabularx}

{% endif %}

{% endblock %}
