Pakete 8, 5 und 6: Beträge und Zahlungen, Ändern und Stornieren, A6 im Vorgang
Deploy FeWo mit PipelineManager / deploy (push) Successful in 4m44s

- Paket 8: Zahlungsarten (Gast an uns, laut Portal, Auszahlung, Erstattung),
  Portalbeträge als Angaben mit Quelle, Übersicht nach Zuständigkeit (R09).
- Paket 5: Ändern mit Folgenvorschau, vereinbart oder dem Gast vorgeschlagen
  (signierter Link), ein Stornoweg mit Grund und Erstattung, Portalstorno erst
  nach Bestätigung.
- Paket 6: eigene Nutzung, Besuch und Sperre als Vorgang mit Kurabgabe und
  Aufenthaltsbestätigung; Bestandsübernahme der Sperren mit identischem Export.
- Wirksame Einstellungen (Expertenansicht), Abnahmekatalog T01–T14, Ergebnis-,
  Abnahme- und Konfigurationsdokument.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-01 22:16:47 +01:00
1 parent 33f8f899d6
commit 3bcfc09417
77 files changed
+3638 -122

No files matched your search

@@ -3,15 +3,19 @@
namespace App\Filament\Resources\Bookings\RelationManagers;
use App\Actions\RecordPayment;
use App\Enums\PaymentKind;
use App\Enums\PaymentMethod;
use App\Enums\Responsibility;
use App\Filament\Forms\Components\EuroInput;
use App\Models\Booking;
use App\Models\Payment;
use App\Pricing\CaseMoney;
use App\Support\Money;
use Carbon\CarbonImmutable;
use Filament\Actions\Action;
use Filament\Actions\DeleteAction;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Radio;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Notifications\Notification;
@@ -38,11 +42,13 @@ public function table(Table $table): Table
{
return $table
->recordTitleAttribute('amount')
->description(fn (): string => 'Bezahlt: '.Money::format($this->ownerRecord->paidAmount()).' · offen: '.Money::format($this->ownerRecord->openAmount()))
->description(fn (): string => 'Vom Gast bezahlt: '.Money::format($this->ownerRecord->paidAmount()).' (davon an uns '.Money::format($this->ownerRecord->paidToUs()).', laut Portal ans Portal '.Money::format($this->ownerRecord->paidViaPortal()).') · Auszahlungen vom Portal: '.Money::format($this->ownerRecord->payoutsReceived()).' · offen bei uns: '.Money::format(CaseMoney::of($this->ownerRecord)->openForUs()))
->columns([
TextColumn::make('paid_on')->label('Eingang')->date('d.m.Y'),
TextColumn::make('amount')->label('Betrag')->money('EUR', divideBy: 100, locale: 'de'),
TextColumn::make('method')->label('Art'),
TextColumn::make('kind')->label('Was')->badge()->state(fn (Payment $record): PaymentKind => $record->kind ?? PaymentKind::Guest),
TextColumn::make('method')->label('Zahlweg'),
TextColumn::make('source')->label('Quelle')->placeholder('–')->toggleable(isToggledHiddenByDefault: true),
TextColumn::make('note')->label('Notiz')->placeholder('–'),
TextColumn::make('recorded_by')->label('Erfasst von')->placeholder('–'),
])
@@ -54,9 +60,11 @@ public function table(Table $table): Table
'amount' => number_format(($this->ownerRecord->openDeposit() ?: $this->ownerRecord->openAmount()) / 100, 2, '.', ''),
'paid_on' => today(),
'method' => PaymentMethod::Transfer,
'kind' => $this->ownerRecord->process()->payments() === Responsibility::Portal ? PaymentKind::PortalPayout->value : PaymentKind::Guest->value,
])
->schema([
EuroInput::make('amount')->label('Betrag')->helperText('Erstattungen mit Minus erfassen.')->minValue(null)->required(),
Radio::make('kind')->label('Was ist passiert?')->options(PaymentKind::class)->required(),
EuroInput::make('amount')->label('Betrag')->helperText('Immer den Betrag ohne Vorzeichen; eine Erstattung wird automatisch abgezogen.')->required(),
DatePicker::make('paid_on')->label('Zahlungseingang')->required(),
Select::make('method')->label('Art')->options(PaymentMethod::class)->required(),
TextInput::make('note')->label('Notiz')->maxLength(255),
@@ -69,6 +77,8 @@ public function table(Table $table): Table
$data['method'] instanceof PaymentMethod ? $data['method'] : PaymentMethod::from($data['method']),
$data['note'] ?: null,
auth()->user()?->name,
$data['kind'] instanceof PaymentKind ? $data['kind'] : PaymentKind::from($data['kind']),
in_array($data['kind'] instanceof PaymentKind ? $data['kind']->value : $data['kind'], [PaymentKind::GuestViaPortal->value, PaymentKind::PortalPayout->value], true) ? ($this->ownerRecord->processChannel()?->name ?? 'Portal') : null,
);
Notification::make()->title('Zahlung erfasst – Status: '.$this->ownerRecord->fresh()->status->getLabel())->success()->send();