Besseres Handling Rückerstattungen

This commit is contained in:
2026-09-06 20:11:50 +02:00
parent e730d6db63
commit b9795f08f0
26 changed files with 927 additions and 104 deletions
@@ -31,7 +31,9 @@ class RefundAcceptedMail extends Mailable
{
return new Envelope(
subject: sprintf(
'Deine Angaben zur Rückerstattung für %s',
$this->refund->isDonation()
? 'Deine Spende statt Rückerstattung für %s'
: 'Deine Angaben zur Rückerstattung für %s',
$this->participant->event()->first()->name
),
);
@@ -54,6 +56,9 @@ class RefundAcceptedMail extends Mailable
'accountIban' => Iban::format((string) $this->refund->account_iban),
'hasDocument' => $this->pdfContent !== null,
'invoiceNumber' => $invoice?->invoice_number,
// Wurde gespendet, gibt es keine Bankverbindung und keine Überweisung, die angekündigt
// werden könnte. Steht in der Abrechnung, die hier ohnehin gelesen wird.
'donation' => (bool) $invoice?->donation,
// Wird nur ein Teil erstattet, soll der Teili nicht rätseln, wo der Rest geblieben ist.
'hasRetention' => $this->refund->hasRetention(),
'retainedAmount' => $this->refund->retained_amount?->toString() ?? '0,00 Euro',