Teilnahmerechnungen erstellen

This commit is contained in:
2026-09-03 00:08:46 +02:00
parent a61344395a
commit 9c4c28e566
79 changed files with 4303 additions and 75 deletions
@@ -106,7 +106,24 @@ class AccountTransferPaymentModule extends AbstractEventPaymentModule implements
protected function invoiceClosingStatement(CreateInvoiceRequest $request): string
{
// TODO: In einer Folge-Iteration ausformulieren (z.B. "Bitte überweise bis zum ... auf IBAN ...").
return '';
$config = $request->configuration;
$deadline = $request->event->registration_final_end?->format('d.m.Y');
$sentence = $deadline !== null
? sprintf('Bitte überweise %s bis zum %s auf folgendes Konto:', $request->amount->toString(), $deadline)
: sprintf('Bitte überweise %s auf folgendes Konto:', $request->amount->toString());
$lines = [
'Kontoinhaber*in: ' . (string) ($config['account_owner'] ?? ''),
'IBAN: ' . (string) ($config['iban'] ?? ''),
];
if (($config['bic'] ?? '') !== '') {
$lines[] = 'BIC: ' . (string) $config['bic'];
}
$lines[] = 'Verwendungszweck: ' . (string) $request->participant->payment_purpose;
return $sentence . '<br />' . implode('<br />', array_map(e(...), $lines));
}
}