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
+12
View File
@@ -117,6 +117,18 @@ class ParticipantRefund extends InstancedModel
return $this->captured_by !== null;
}
/**
* Ob auf die Auszahlung verzichtet und der Betrag gespendet wurde.
*
* Steht in der Abrechnung und nicht am Vorgang -- wie der Auszahlungsstand, aus demselben Grund: eine
* zweite Spalte könnte davon abweichen. Vor dem Einreichen gibt es keine Abrechnung und nichts zu
* entscheiden, dann ist die Antwort `false`.
*/
public function isDonation(): bool
{
return (bool) $this->invoice()->first()?->donation;
}
public function isPending(): bool
{
return $this->status === self::STATUS_PENDING;