Implement modular report system with 6 report types and composer UI
Refactors the Berichte section from a single hardcoded Jahresbericht into a modular report-building system. Jahresbericht now uses PDFGenerator for corporate identity (logo, colors, headers/footers, cover page). 8 reusable section templates can be freely combined. 6 predefined report templates (Jahres-, Destinatär-, Grundstücks-, Finanz-, Förder-, Pachtbericht) with HTML preview and PDF export. New Bericht-Baukasten UI lets users compose custom reports from individual sections. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
36
app/templates/berichte/sektionen/bilanz.html
Normal file
36
app/templates/berichte/sektionen/bilanz.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<!-- Sektion: Jahresbilanz -->
|
||||
<div class="section">
|
||||
<h2>Jahresbilanz {{ jahr }}</h2>
|
||||
<div class="bilanz-grid">
|
||||
<div class="bilanz-card einnahmen">
|
||||
<div class="value">€{{ total_einnahmen|floatformat:2 }}</div>
|
||||
<div class="label">Einnahmen (Pacht)</div>
|
||||
</div>
|
||||
<div class="bilanz-card ausgaben">
|
||||
<div class="value">€{{ total_ausgaben|floatformat:2 }}</div>
|
||||
<div class="label">Ausgaben gesamt</div>
|
||||
</div>
|
||||
<div class="bilanz-card {% if netto >= 0 %}netto-positiv{% else %}netto-negativ{% endif %}">
|
||||
<div class="value">{% if netto >= 0 %}+{% endif %}€{{ netto|floatformat:2 }}</div>
|
||||
<div class="label">Nettosaldo</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stats-grid">
|
||||
<div class="stat-card">
|
||||
<div class="value">€{{ total_ausgaben_foerderung|floatformat:2 }}</div>
|
||||
<div class="label">Förderausgaben</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="value">€{{ total_verwaltungskosten|floatformat:2 }}</div>
|
||||
<div class="label">Verwaltungskosten</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="value">€{{ pacht_vereinnahmt|floatformat:2 }}</div>
|
||||
<div class="label">Pacht vereinnahmt</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="value">€{{ grundsteuer_gesamt|floatformat:2 }}</div>
|
||||
<div class="label">Grundsteuer</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,46 @@
|
||||
<!-- Sektion: Destinatär-Übersicht -->
|
||||
<div class="section">
|
||||
<h2>Destinatär-Übersicht{% if jahr %} {{ jahr }}{% endif %}</h2>
|
||||
|
||||
<div class="stats-grid">
|
||||
<div class="stat-card">
|
||||
<div class="value">{{ destinataere_aktiv }}</div>
|
||||
<div class="label">Aktive Destinatäre</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="value">{{ destinataere_gesamt }}</div>
|
||||
<div class="label">Gesamt</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="value">€{{ destinataere_total_unterstuetzung|floatformat:2 }}</div>
|
||||
<div class="label">Gesamte Unterstützungen</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if destinataere_liste %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Ort</th>
|
||||
<th>Berufsgruppe</th>
|
||||
<th>Aktiv</th>
|
||||
<th>Unterstützungen</th>
|
||||
<th>Betrag gesamt</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for d in destinataere_liste %}
|
||||
<tr>
|
||||
<td>{{ d.get_full_name }}</td>
|
||||
<td>{{ d.ort|default:"-" }}</td>
|
||||
<td>{{ d.get_berufsgruppe_display|default:"-" }}</td>
|
||||
<td>{% if d.aktiv %}Ja{% else %}Nein{% endif %}</td>
|
||||
<td>{{ d.unterstuetzung_count }}</td>
|
||||
<td class="amount">€{{ d.unterstuetzung_summe|floatformat:2 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
41
app/templates/berichte/sektionen/foerderungen.html
Normal file
41
app/templates/berichte/sektionen/foerderungen.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!-- Sektion: Förderungen (Legacy) -->
|
||||
{% if foerderungen %}
|
||||
<div class="section">
|
||||
<h2>Förderungen {{ jahr }}</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Begünstigter</th>
|
||||
<th>Kategorie</th>
|
||||
<th>Betrag</th>
|
||||
<th>Status</th>
|
||||
<th>Antragsdatum</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for f in foerderungen %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if f.destinataer %}{{ f.destinataer.get_full_name }}
|
||||
{% elif f.person %}{{ f.person.get_full_name }}
|
||||
{% else %}–{% endif %}
|
||||
</td>
|
||||
<td>{{ f.get_kategorie_display }}</td>
|
||||
<td class="amount">€{{ f.betrag|floatformat:2 }}</td>
|
||||
<td>
|
||||
<span class="status-badge status-{{ f.status }}">{{ f.get_status_display }}</span>
|
||||
</td>
|
||||
<td>{{ f.antragsdatum|date:"d.m.Y" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="font-weight: bold; background: #f0f7f4;">
|
||||
<td colspan="2">Summe</td>
|
||||
<td class="amount">€{{ total_foerderungen_legacy|floatformat:2 }}</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
76
app/templates/berichte/sektionen/grundstuecke.html
Normal file
76
app/templates/berichte/sektionen/grundstuecke.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<!-- Sektion: Grundstücksverwaltung -->
|
||||
<div class="section">
|
||||
<h2>Grundstücksverwaltung</h2>
|
||||
|
||||
{% if verpachtungen %}
|
||||
<h3>Aktive Verpachtungen</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Länderei</th>
|
||||
<th>Pächter</th>
|
||||
<th>Verpachtete Fläche</th>
|
||||
<th>Jahrespachtzins</th>
|
||||
<th>Pachtende</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for v in verpachtungen %}
|
||||
<tr>
|
||||
<td>{{ v.land }}</td>
|
||||
<td>{{ v.paechter.get_full_name }}</td>
|
||||
<td class="amount">{{ v.verpachtete_flaeche|floatformat:0 }} qm</td>
|
||||
<td class="amount">€{{ v.pachtzins_pauschal|floatformat:2 }}</td>
|
||||
<td>{% if v.pachtende %}{{ v.pachtende|date:"d.m.Y" }}{% else %}unbefristet{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="font-weight: bold; background: #f0f7f4;">
|
||||
<td colspan="3">Gesamtpachtzins (kalkuliert)</td>
|
||||
<td class="amount">€{{ total_pachtzins|floatformat:2 }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if landabrechnungen %}
|
||||
<h3>Landabrechnungen {{ jahr }}</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Länderei</th>
|
||||
<th>Pacht vereinnahmt</th>
|
||||
<th>Umlagen</th>
|
||||
<th>Grundsteuer</th>
|
||||
<th>Sonstige Einnahmen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for a in landabrechnungen %}
|
||||
<tr>
|
||||
<td>{{ a.land }}</td>
|
||||
<td class="amount">€{{ a.pacht_vereinnahmt|floatformat:2 }}</td>
|
||||
<td class="amount">€{{ a.umlagen_vereinnahmt|floatformat:2 }}</td>
|
||||
<td class="amount">€{{ a.grundsteuer_betrag|floatformat:2 }}</td>
|
||||
<td class="amount">€{{ a.sonstige_einnahmen|floatformat:2 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="font-weight: bold; background: #f0f7f4;">
|
||||
<td>Summe</td>
|
||||
<td class="amount">€{{ pacht_vereinnahmt|floatformat:2 }}</td>
|
||||
<td></td>
|
||||
<td class="amount">€{{ grundsteuer_gesamt|floatformat:2 }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if not verpachtungen and not landabrechnungen %}
|
||||
<p style="color: #999;">Keine Verpachtungs- oder Abrechnungsdaten für {{ jahr }} vorhanden.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
46
app/templates/berichte/sektionen/konten_uebersicht.html
Normal file
46
app/templates/berichte/sektionen/konten_uebersicht.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!-- Sektion: Konten-Übersicht -->
|
||||
<div class="section">
|
||||
<h2>Kontenübersicht</h2>
|
||||
|
||||
<div class="stats-grid">
|
||||
<div class="stat-card">
|
||||
<div class="value">{{ konten_anzahl }}</div>
|
||||
<div class="label">Aktive Konten</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="value">€{{ konten_gesamtsaldo|floatformat:2 }}</div>
|
||||
<div class="label">Gesamtsaldo</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if konten_liste %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Kontoname</th>
|
||||
<th>Bank</th>
|
||||
<th>Kontotyp</th>
|
||||
<th>IBAN</th>
|
||||
<th>Saldo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for k in konten_liste %}
|
||||
<tr>
|
||||
<td>{{ k.kontoname }}</td>
|
||||
<td>{{ k.bank_name }}</td>
|
||||
<td>{{ k.get_konto_typ_display }}</td>
|
||||
<td>{{ k.iban|default:"-" }}</td>
|
||||
<td class="amount">€{{ k.saldo|floatformat:2 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="font-weight: bold; background: #f0f7f4;">
|
||||
<td colspan="4">Gesamtsaldo</td>
|
||||
<td class="amount">€{{ konten_gesamtsaldo|floatformat:2 }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
41
app/templates/berichte/sektionen/unterstuetzungen.html
Normal file
41
app/templates/berichte/sektionen/unterstuetzungen.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!-- Sektion: Unterstützungszahlungen -->
|
||||
{% if unterstuetzungen %}
|
||||
<div class="section">
|
||||
<h2>Unterstützungszahlungen {{ jahr }}</h2>
|
||||
<p style="color: #666; margin-bottom: 12px;">
|
||||
{{ unterstuetzungen.count }} Unterstützung(en) geplant/ausgezahlt ·
|
||||
{{ unterstuetzungen_ausgezahlt.count }} überwiesen (€{{ total_unterstuetzungen|floatformat:2 }})
|
||||
</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Destinatär</th>
|
||||
<th>Betrag</th>
|
||||
<th>Fällig am</th>
|
||||
<th>Status</th>
|
||||
<th>Verwendungszweck</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for u in unterstuetzungen %}
|
||||
<tr>
|
||||
<td>{{ u.destinataer.get_full_name }}</td>
|
||||
<td class="amount">€{{ u.betrag|floatformat:2 }}</td>
|
||||
<td>{{ u.faellig_am|date:"d.m.Y" }}</td>
|
||||
<td>
|
||||
<span class="status-badge status-{{ u.status }}">{{ u.get_status_display }}</span>
|
||||
</td>
|
||||
<td>{{ u.beschreibung|default:"-" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="font-weight: bold; background: #f0f7f4;">
|
||||
<td>Summe ausgezahlt</td>
|
||||
<td class="amount">€{{ total_unterstuetzungen|floatformat:2 }}</td>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
88
app/templates/berichte/sektionen/verpachtungen.html
Normal file
88
app/templates/berichte/sektionen/verpachtungen.html
Normal file
@@ -0,0 +1,88 @@
|
||||
<!-- Sektion: Pachtbericht -->
|
||||
<div class="section">
|
||||
<h2>Pachtbericht{% if jahr %} {{ jahr }}{% endif %}</h2>
|
||||
|
||||
{% if pacht_statistik %}
|
||||
<div class="stats-grid">
|
||||
<div class="stat-card">
|
||||
<div class="value">{{ pacht_statistik.aktive_vertraege }}</div>
|
||||
<div class="label">Aktive Pachtverträge</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="value">€{{ pacht_statistik.total_pachtzins|floatformat:2 }}</div>
|
||||
<div class="label">Gesamtpachtzins p.a.</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="value">{{ pacht_statistik.total_flaeche|floatformat:0 }} qm</div>
|
||||
<div class="label">Verpachtete Fläche</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="value">{{ pacht_statistik.auslaufend_12m }}</div>
|
||||
<div class="label">Laufen in 12 Mon. aus</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if pacht_auslaufend %}
|
||||
<h3>Auslaufende Verträge (nächste 12 Monate)</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Länderei</th>
|
||||
<th>Pächter</th>
|
||||
<th>Pachtende</th>
|
||||
<th>Pachtzins</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for v in pacht_auslaufend %}
|
||||
<tr>
|
||||
<td>{{ v.land }}</td>
|
||||
<td>{{ v.paechter.get_full_name }}</td>
|
||||
<td>{{ v.pachtende|date:"d.m.Y" }}</td>
|
||||
<td class="amount">€{{ v.pachtzins_pauschal|floatformat:2 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if verpachtungen %}
|
||||
<h3>Alle Verpachtungen</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Länderei</th>
|
||||
<th>Pächter</th>
|
||||
<th>Fläche</th>
|
||||
<th>Pachtzins</th>
|
||||
<th>Beginn</th>
|
||||
<th>Ende</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for v in verpachtungen %}
|
||||
<tr>
|
||||
<td>{{ v.land }}</td>
|
||||
<td>{{ v.paechter.get_full_name }}</td>
|
||||
<td class="amount">{{ v.verpachtete_flaeche|floatformat:0 }} qm</td>
|
||||
<td class="amount">€{{ v.pachtzins_pauschal|floatformat:2 }}</td>
|
||||
<td>{{ v.pachtbeginn|date:"d.m.Y" }}</td>
|
||||
<td>{% if v.pachtende %}{{ v.pachtende|date:"d.m.Y" }}{% else %}unbefristet{% endif %}</td>
|
||||
<td>
|
||||
<span class="status-badge status-{{ v.status }}">{{ v.get_status_display }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="font-weight: bold; background: #f0f7f4;">
|
||||
<td colspan="3">Gesamtpachtzins</td>
|
||||
<td class="amount">€{{ total_pachtzins|floatformat:2 }}</td>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
30
app/templates/berichte/sektionen/verwaltungskosten.html
Normal file
30
app/templates/berichte/sektionen/verwaltungskosten.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!-- Sektion: Verwaltungskosten -->
|
||||
{% if verwaltungskosten_nach_kategorie %}
|
||||
<div class="section">
|
||||
<h2>Verwaltungskosten {{ jahr }}</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Kategorie</th>
|
||||
<th>Anzahl</th>
|
||||
<th>Betrag</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for k in verwaltungskosten_nach_kategorie %}
|
||||
<tr>
|
||||
<td>{{ k.kategorie|capfirst }}</td>
|
||||
<td>{{ k.anzahl }}</td>
|
||||
<td class="amount">€{{ k.summe|floatformat:2 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="font-weight: bold; background: #f0f7f4;">
|
||||
<td colspan="2">Gesamt</td>
|
||||
<td class="amount">€{{ total_verwaltungskosten|floatformat:2 }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user