Enhanced quarterly confirmation system with approval workflow and export improvements

Features added:
-  Fixed quarterly confirmation approval system with URL pattern
-  Added re-approval and status reset functionality for quarterly confirmations
-  Synchronized quarterly approval status with support payment system
-  Enhanced Destinataer export with missing fields (anrede, titel, mobil)
-  Added quarterly confirmation data and documents to export system
-  Fixed address field display issues in destinataer template
-  Added quarterly statistics dashboard to support payment lists
-  Implemented duplicate support payment prevention and cleanup
-  Added visual indicators for quarterly-linked support payments

Technical improvements:
- Enhanced create_quarterly_support_payment() with duplicate detection
- Added get_related_support_payment() method to VierteljahresNachweis model
- Improved quarterly confirmation workflow with proper status transitions
- Added computed address property to Destinataer model
- Fixed template field mismatches (anrede, titel, mobil vs strasse, plz, ort)
- Enhanced backup system with operation tracking and cancellation

Workflow enhancements:
- Quarterly confirmations now properly sync with support payments
- Single support payment per destinataer per quarter (no duplicates)
- Approval button works for both eingereicht and geprueft status
- Reset functionality allows workflow restart
- Export includes complete quarterly data with uploaded documents
This commit is contained in:
2025-09-28 19:09:08 +02:00
parent b00cf62d87
commit acac8695fd
73 changed files with 283380 additions and 206 deletions

View File

@@ -189,7 +189,7 @@
<!-- Statistics Cards -->
<div class="row mb-4">
<div class="col-md-3">
<div class="col-md-4">
<div class="card bg-primary text-white">
<div class="card-body">
<h5 class="card-title">Gesamtbetrag</h5>
@@ -197,15 +197,7 @@
</div>
</div>
</div>
<div class="col-md-3">
<div class="card bg-success text-white">
<div class="card-body">
<h5 class="card-title">Durchschnitt</h5>
<h3 class="card-text">€{{ avg_betrag|floatformat:2 }}</h3>
</div>
</div>
</div>
<div class="col-md-3">
<div class="col-md-4">
<div class="card bg-info text-white">
<div class="card-body">
<h5 class="card-title">Anzahl</h5>
@@ -213,6 +205,38 @@
</div>
</div>
</div>
<div class="col-md-4">
<div class="card bg-light">
<div class="card-body text-center">
<h6 class="card-title text-muted mb-2">
<i class="fas fa-chart-pie me-2"></i>Vierteljahresnachweis Status
</h6>
<div class="row g-1">
<div class="col-6">
<div class="text-primary fw-bold">{{ total_quarterly }}</div>
<small class="text-muted">Gesamt</small>
</div>
{% for status_code, status_data in quarterly_stats.items %}
{% if status_data.count > 0 %}
<div class="col-6">
<div class="fw-bold
{% if status_code == 'offen' %}text-secondary
{% elif status_code == 'teilweise' %}text-warning
{% elif status_code == 'eingereicht' %}text-info
{% elif status_code == 'geprueft' %}text-success
{% elif status_code == 'nachbesserung' %}text-danger
{% elif status_code == 'abgelehnt' %}text-dark
{% endif %}">
{{ status_data.count }}
</div>
<small class="text-muted">{{ status_data.name }}</small>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<!-- Filters -->