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:
@@ -198,7 +198,17 @@
|
||||
<em class="text-muted">Nicht angegeben</em>
|
||||
{% endif %}
|
||||
</span>
|
||||
<textarea name="adresse" class="form-control edit-mode" style="display: none;" rows="3" placeholder="Straße Nr. PLZ Ort">{{ destinataer.adresse }}</textarea>
|
||||
<div class="edit-mode" style="display: none;">
|
||||
<input name="strasse" class="form-control mb-2" placeholder="Straße" value="{{ destinataer.strasse|default:'' }}">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<input name="plz" class="form-control" placeholder="PLZ" value="{{ destinataer.plz|default:'' }}">
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input name="ort" class="form-control" placeholder="Ort" value="{{ destinataer.ort|default:'' }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -592,13 +602,28 @@
|
||||
title="Bearbeiten (Vollbild)">
|
||||
<i class="fas fa-external-link-alt"></i>
|
||||
</a>
|
||||
{% if nachweis.status == 'eingereicht' and user.is_staff %}
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-outline-success"
|
||||
onclick="approveQuarterly('{{ nachweis.id }}')"
|
||||
title="Freigeben">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
{% if user.is_staff %}
|
||||
{% if nachweis.status == 'eingereicht' %}
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-outline-success"
|
||||
onclick="approveQuarterly('{{ nachweis.id }}')"
|
||||
title="Freigeben">
|
||||
<i class="fas fa-check"></i>
|
||||
</button>
|
||||
{% elif nachweis.status == 'geprueft' %}
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-outline-success"
|
||||
onclick="approveQuarterly('{{ nachweis.id }}')"
|
||||
title="Erneut freigeben / Unterstützung synchronisieren">
|
||||
<i class="fas fa-sync"></i>
|
||||
</button>
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-outline-warning"
|
||||
onclick="resetQuarterly('{{ nachweis.id }}')"
|
||||
title="Status zurücksetzen">
|
||||
<i class="fas fa-undo"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
@@ -1353,5 +1378,28 @@ function approveQuarterly(nachweisId) {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function resetQuarterly(nachweisId) {
|
||||
if (confirm('Möchten Sie den Status dieses Vierteljahresnachweis wirklich zurücksetzen?')) {
|
||||
fetch(`/quarterly-confirmations/${nachweisId}/reset/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRFToken': document.querySelector('[name=csrfmiddlewaretoken]').value,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
})
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
location.reload(); // Reload to show updated status
|
||||
} else {
|
||||
alert('Fehler beim Zurücksetzen des Nachweises.');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
alert('Fehler beim Zurücksetzen des Nachweises.');
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user