Add a dues-invoicing feature: send, track and remind on membership fees

New DuesInvoice model (one per membership, resendable) plus
club.services.invoicing: resolves the best email to invoice (the
member's own, else a parent/guardian's), snapshots the outstanding
balance and a due date on send, and mails a branded HTML invoice
(same club-colour email shell as the parent-claim email) with a
WeasyPrint PDF attached when the native libs are available.

Dues & billing gains a bulk "Send invoice" action (checkbox selection
+ a shared due-in-days prompt), a per-row invoice status column, a
staff-facing invoice detail/PDF page, and a push-button "Send
reminders" action for every sent, unpaid invoice past its own due
date.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
2026-08-20 21:23:06 +02:00
parent 44ddf7b6eb
commit 94d6cbd4e9
19 changed files with 1334 additions and 8 deletions

View File

@@ -13,6 +13,10 @@ urlpatterns = [
path("memberships/export/", views.MembershipExportPdfView.as_view(), name="membership_export_pdf"),
path("memberships/<uuid:pk>/mark-fully-paid/", views.MembershipMarkFullyPaidView.as_view(), name="membership_mark_fully_paid"),
path("memberships/<uuid:pk>/record-payment/", views.MembershipRecordPaymentView.as_view(), name="membership_record_payment"),
path("memberships/send-invoices/", views.MembershipSendInvoicesView.as_view(), name="membership_send_invoices"),
path("memberships/send-invoice-reminders/", views.MembershipSendInvoiceRemindersView.as_view(), name="membership_send_invoice_reminders"),
path("memberships/<uuid:pk>/invoice/", views.DuesInvoiceDetailView.as_view(), name="membership_invoice_detail"),
path("memberships/<uuid:pk>/invoice/pdf/", views.DuesInvoicePdfView.as_view(), name="membership_invoice_pdf"),
path("members/new/", views.MemberCreateView.as_view(), name="member_create"),
path("members/import/template/", views.MemberImportTemplateView.as_view(), name="member_import_template"),
path("members/import/", views.MemberImportView.as_view(), name="member_import"),