Moved bank transfer logic to special module

This commit is contained in:
2026-08-05 10:00:02 +02:00
parent d1ef092bc3
commit e55cdd1988
22 changed files with 669 additions and 165 deletions
@@ -27,6 +27,8 @@ class EventParticipantResource extends JsonResource
$amountLeft->subtractAmount($this->resource->amount_paid);
}
$paymentSummary = $this->resource->paymentSummary();
$presenceDays = $this->resource->arrival_date->diff($this->resource->departure_date)->days;
if ($presenceDays === 0) {
$presenceDays = 1;
@@ -57,6 +59,12 @@ class EventParticipantResource extends JsonResource
'needs_payment' => $this->resource->amount->getAmount() > 0
&& $this->resource->payment_method === PaymentMethod::PAYMENT_ACCOUNT_TRANSACTION
&& $this->resource->amount_paid?->getAmount() < $this->resource->amount->getAmount(),
'paymentSummary' => [
'hasPaymentInformation' => $paymentSummary->hasPaymentInformation,
'lines' => $paymentSummary->lines,
'html' => $paymentSummary->html,
'showGiroCode' => $paymentSummary->showGiroCode,
],
'nicename' => $this->resource->getNicename(),
'arrival' => $this->resource->arrival_date->format('d.m.Y'),
'departure' => $this->resource->departure_date->format('d.m.Y'),