Implement modular report system with 6 report types and composer UI
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled

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:
SysAdmin Agent
2026-03-14 20:55:31 +00:00
parent 042114b1e7
commit faeb7c1073
15 changed files with 1081 additions and 439 deletions

View 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&auml;ge</div>
</div>
<div class="stat-card">
<div class="value">&#8364;{{ 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&auml;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&auml;ge (n&auml;chste 12 Monate)</h3>
<table>
<thead>
<tr>
<th>L&auml;nderei</th>
<th>P&auml;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">&#8364;{{ v.pachtzins_pauschal|floatformat:2 }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if verpachtungen %}
<h3>Alle Verpachtungen</h3>
<table>
<thead>
<tr>
<th>L&auml;nderei</th>
<th>P&auml;chter</th>
<th>Fl&auml;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">&#8364;{{ 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">&#8364;{{ total_pachtzins|floatformat:2 }}</td>
<td colspan="3"></td>
</tr>
</tfoot>
</table>
{% endif %}
</div>