Teilnahmerechnungen erstellen
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,9 @@ class UndefinedPaymentModule extends AbstractEventPaymentModule
|
||||
|
||||
protected function invoiceClosingStatement(CreateInvoiceRequest $request): string
|
||||
{
|
||||
return '';
|
||||
return sprintf(
|
||||
'Bitte halte den Betrag von %s in bar am ersten Tag der Veranstaltung bereit.',
|
||||
$request->amount->toString()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user