Besseres Handling Rückerstattungen
This commit is contained in:
@@ -22,6 +22,8 @@ class AcceptRefundController extends CommonController
|
||||
accountOwner: (string) $request->input('accountOwner'),
|
||||
accountIban: (string) $request->input('accountIban'),
|
||||
declarationAccepted: $request->boolean('declarationAccepted'),
|
||||
donation: $request->boolean('donation'),
|
||||
accountDeclarationAccepted: $request->boolean('accountDeclarationAccepted'),
|
||||
);
|
||||
|
||||
$response = new AcceptRefundCommand($acceptRequest)->execute();
|
||||
|
||||
@@ -18,7 +18,11 @@ class RefundDocumentController extends CommonController
|
||||
abort(403, 'Zugriff verweigert.');
|
||||
}
|
||||
|
||||
$documentResponse = new CreateRefundDocumentCommand(new CreateRefundDocumentRequest($refund))->execute();
|
||||
$documentResponse = new CreateRefundDocumentCommand(new CreateRefundDocumentRequest(
|
||||
refund: $refund,
|
||||
// Beim Nachdruck steht die Abrechnung längst -- sie führt die Spende.
|
||||
donation: $refund->isDonation(),
|
||||
))->execute();
|
||||
|
||||
if (!$documentResponse->success) {
|
||||
abort(422, $documentResponse->message ?? 'Der Beleg konnte nicht erstellt werden.');
|
||||
|
||||
@@ -53,6 +53,8 @@ class RefundPageController extends CommonController
|
||||
return array_merge($common, [
|
||||
'state' => 'accepted',
|
||||
'acceptedAt' => $refund->accepted_at?->format('d.m.Y'),
|
||||
// Wurde gespendet, darf der Abschlusstext keine Überweisung ankündigen, die nicht kommt.
|
||||
'donation' => $refund->isDonation(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@ class ReleaseRefundController extends CommonController
|
||||
// Leer, wenn der volle Beitrag erstattet wird -- dann gibt es nichts zu begründen.
|
||||
retentionReason: Text::nullIfBlank($request->input('retentionReason')),
|
||||
retentionReasonNote: Text::nullIfBlank($request->input('retentionReasonNote')),
|
||||
// Der Teili hat der Aktionsleitung gesagt, dass er spenden möchte -- dann entfällt die
|
||||
// Bankverbindung und die Erstattung wird sofort als Spende eingereicht.
|
||||
donation: $request->boolean('donation'),
|
||||
);
|
||||
|
||||
$response = new ReleaseRefundCommand($refundRequest)->execute();
|
||||
|
||||
Reference in New Issue
Block a user