Billing: refund a payment; void invoices that aren't paid (none, or all refunded)

Void was refused while any payment was recorded, so a paid-then-refunded
invoice could only be voided by deleting the payment and losing the
record. A payment can now be marked refunded: kept with its receipt, no
longer counted as paid, shown on the statement as money going back out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 13:34:08 +02:00
co-authored by Claude Opus 5.5
parent 9aa06ae894
commit 3706b73879
9 changed files with 92 additions and 11 deletions
+4
View File
@@ -397,6 +397,10 @@ model Payment {
reference String?
notes String?
receiptSentAt DateTime?
// A refund: the money went back to the church. The payment stays on record (and its receipt), but
// no longer counts as paid, so the invoice can be voided or paid again.
refundedAt DateTime? @db.Date
refundNote String?
createdById String?
createdAt DateTime @default(now())