Code improvements
This commit is contained in:
@@ -141,7 +141,7 @@ class AcceptRefundCommand
|
||||
* Die Kostenstelle der Veranstaltung.
|
||||
*
|
||||
* Ohne Zugriffsprüfung, weil hier niemand angemeldet ist -- der Teili bestätigt über seinen Token.
|
||||
* Der Repository-Check greift sonst auf `auth()->user()->id` zu und liefe in einen Fehler.
|
||||
* Der Repository-Check greift sonst auf `currentUserOrFail()->id` zu und liefe in einen Fehler.
|
||||
*
|
||||
* Bewusst ohne Prüfung auf `allow_new`/`archived`: Eine Erstattung fällt oft erst nach dem Ende der
|
||||
* Veranstaltung an, wenn die Kostenstelle längst geschlossen ist. Sie gehört trotzdem dorthin -- und
|
||||
|
||||
@@ -63,7 +63,7 @@ class ReleaseRefundCommand
|
||||
'retained_amount' => $this->request->retainedAmount(),
|
||||
'retention_reason' => $this->retentionReason(),
|
||||
'retention_reason_note' => $this->retentionReasonNote(),
|
||||
'released_by' => auth()->id(),
|
||||
'released_by' => currentUser()?->id,
|
||||
'released_at' => now(),
|
||||
]);
|
||||
|
||||
@@ -101,7 +101,7 @@ class ReleaseRefundCommand
|
||||
accountIban: (string) $this->request->accountIban,
|
||||
// Niemand kreuzt hier eine Erklärung an; wer die Angaben aufgenommen hat, hält `captured_by`
|
||||
// fest, und der Beleg weist es aus.
|
||||
capturedBy: auth()->id(),
|
||||
capturedBy: currentUser()?->id,
|
||||
))->execute();
|
||||
|
||||
if (!$acceptResponse->success) {
|
||||
|
||||
Reference in New Issue
Block a user