Refundings without contacting the participant

This commit is contained in:
2026-09-03 23:36:21 +02:00
parent efee20c16b
commit 5beb2b1d97
16 changed files with 723 additions and 37 deletions
+16
View File
@@ -22,6 +22,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
* @property string|null $reason_note
* @property string|null $account_owner
* @property string|null $account_iban
* @property int|null $captured_by
* @property int|null $invoice_id
* @property int|null $released_by
* @property \Illuminate\Support\Carbon|null $released_at
@@ -52,6 +53,7 @@ class ParticipantRefund extends InstancedModel
'reason_note',
'account_owner',
'account_iban',
'captured_by',
'invoice_id',
'released_by',
'released_at',
@@ -93,6 +95,20 @@ class ParticipantRefund extends InstancedModel
return $this->belongsTo(Invoice::class);
}
/**
* Wer die Bankverbindung aufgenommen hat -- leer, wenn der Teili sie selbst eingetragen hat.
*/
public function capturedBy(): BelongsTo
{
return $this->belongsTo(User::class, 'captured_by');
}
/** Ob die Angaben von der Aktionsleitung stammen und nicht vom Teili selbst. */
public function wasCapturedByManagement(): bool
{
return $this->captured_by !== null;
}
public function isPending(): bool
{
return $this->status === self::STATUS_PENDING;