Teilnahmerechnungen erstellen
This commit is contained in:
@@ -71,6 +71,9 @@ class EventParticipantResource extends JsonResource
|
||||
'email_1' => $this->resource->email_1,
|
||||
'amountPaid' => ['value' => $this->resource->amount_paid, 'readable' => $this->resource->amount_paid?->toString() ?? '0,00 Euro', 'short' => $this->resource->amount_paid?->getFormattedAmount() ?? '0,00'],
|
||||
'amountExpected' => ['value' => $this->resource->amount, 'readable' => $this->resource->amount?->toString() ?? '0,00 Euro', 'short' => $this->resource->amount?->getFormattedAmount() ?? '0,00'],
|
||||
// Numerisch, damit das Frontend rechnen bzw. auf "kostenlos" prüfen kann -- `value` oben ist
|
||||
// ein Amount-Objekt und serialisiert nicht.
|
||||
'amountExpectedValue' => $this->resource->amount?->getAmount() ?? 0.0,
|
||||
'alcoholicsAllowed' => new Age($this->resource->birthday)->getAge() >= $event->alcoholics_age,
|
||||
'localGroupPostcode' => $this->resource->localGroup()->first()?->postcode ?? '00000',
|
||||
'localGroupCity' => $this->resource->localGroup()->first()?->city ?? '00000',
|
||||
|
||||
Reference in New Issue
Block a user