Files
LarsandClaude Opus 5.5 3bcfc09417
Deploy FeWo mit PipelineManager / deploy (push) Successful in 4m44s
Pakete 8, 5 und 6: Beträge und Zahlungen, Ändern und Stornieren, A6 im Vorgang
- 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>
2026-11-01 22:16:47 +01:00

59 lines
5.0 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{-- Prices and payments of a case, kept apart by who owes whom (package 8). --}}
@php
/** @var \App\Pricing\CaseMoney $money */
$euro = fn (?int $cents): string => $cents === null ? 'noch nicht bekannt' : \App\Support\Money::format($cents);
$row = 'display:flex;justify-content:space-between;gap:1rem;padding:.35rem 0;border-bottom:1px solid rgba(128,128,128,.15)';
$muted = 'color:#6b7280;font-size:.85rem';
$collector = $money->collector();
$payout = $money->payout();
$positions = $money->positions();
@endphp
<div style="font-size:.95rem">
<div style="{{ $row }}"><span><strong>Vereinbarter Gesamtpreis</strong> <span style="{{ $muted }}">{{ $money->totalSource() }}</span></span><strong>{{ $euro($money->total()) }}</strong></div>
@if ($collector === \App\Enums\Responsibility::Landlord)
<div style="{{ $row }}"><span>Vom Gast an uns gezahlt</span><span>{{ $euro($booking->paidToUs()) }}</span></div>
<div style="{{ $row }}"><span>Noch offen – zahlt der Gast an uns</span><span style="color:{{ $money->openForUs() > 0 ? '#dc2626' : '#15803d' }};font-weight:600">{{ $euro($money->openForUs()) }}</span></div>
@elseif ($collector === \App\Enums\Responsibility::Portal)
<div style="{{ $row }}"><span>Zahlung des Gastes läuft über {{ $booking->processChannel()?->name ?? 'das Portal' }}</span><span style="{{ $muted }}">keine Mahnung durch uns</span></div>
<div style="{{ $row }}"><span>Laut Portal vom Gast bezahlt</span><span>{{ $euro($booking->paidViaPortal()) }}</span></div>
<div style="{{ $row }}"><span>Laut Portal noch beim Gast offen</span><span>{{ $euro($money->openAtPortal()) }}</span></div>
@foreach ($money->installmentsDue() as $installment)
<div style="{{ $row }}"><span style="{{ $muted }}">Rate laut Portal fällig{{ $installment->due_on ? ' am '.$installment->due_on->format('d.m.Y') : '' }}</span><span style="{{ $muted }}">{{ $euro($installment->amount) }}</span></div>
@endforeach
<div style="{{ $row }}"><span>Auszahlung an uns angekündigt</span>
<span>{{ $payout['values'] === [] ? 'noch keine Angabe' : implode(' bzw. ', array_map($euro, $payout['values'])) }}</span></div>
@if ($payout['difference'] > 0)
<div style="{{ $row }}"><span style="color:#b45309">Die Angaben zur Auszahlung weichen um {{ $euro($payout['difference']) }} voneinander ab – ungeklärt.</span><span></span></div>
@endif
<div style="{{ $row }}"><span>Auszahlung tatsächlich erhalten</span><span>{{ $euro($payout['received']) }}</span></div>
@if ($payout['outstanding'] !== null)
<div style="{{ $row }}"><span>Noch auszuzahlen (laut Ankündigung)</span><span>{{ $euro($payout['outstanding']) }}</span></div>
@endif
@else
<div style="{{ $row }}"><span>Bezahlt</span><span>{{ $euro($booking->paidAmount()) }}</span></div>
<div style="{{ $row }}"><span style="{{ $muted }}">Keine Zahlungserinnerungen bei eigener Nutzung / privatem Aufenthalt.</span><span></span></div>
@endif
<div style="{{ $row }}"><span>Auf unserem Konto eingegangen</span><span>{{ $euro($money->receivedOnAccount()) }}</span></div>
@if ($positions['positions']->isNotEmpty() || $money->commissions()->isNotEmpty() || $payout['announcements']->isNotEmpty())
<details style="margin-top:.6rem">
<summary style="cursor:pointer;font-weight:600">Einzelangaben laut Portal</summary>
<div style="margin-top:.4rem">
@foreach ($positions['positions'] as $position)
<div style="{{ $row }}"><span>{{ $position->title() }} <span style="{{ $muted }}">{{ $position->source }}{{ $position->stated_on ? ', '.$position->stated_on->format('d.m.Y') : '' }}</span></span><span>{{ $euro($position->amount) }}</span></div>
@endforeach
@if ($positions['positions']->isNotEmpty())
<div style="{{ $row }}"><span style="{{ $muted }}">Summe der Positionen</span><span style="{{ $muted }}">{{ $euro($positions['sum']) }}{{ $positions['difference'] === 0 ? ' = Gesamtpreis' : ($positions['difference'] !== null ? ' – Abweichung zum Gesamtpreis '.$euro($positions['difference']) : '') }}</span></div>
@endif
@foreach ($money->commissions() as $commission)
<div style="{{ $row }}"><span>{{ $commission->title() }} <span style="{{ $muted }}">{{ $commission->source }} · trägt der Vermieter, kein Betrag des Gastes</span></span><span>{{ $euro($commission->amount) }}</span></div>
@endforeach
@foreach ($payout['announcements'] as $announcement)
<div style="{{ $row }}"><span>{{ $announcement->title() }} <span style="{{ $muted }}">{{ $announcement->source }}{{ $announcement->stated_on ? ', '.$announcement->stated_on->format('d.m.Y') : '' }}{{ $announcement->note ? ' · '.$announcement->note : '' }}</span></span><span>{{ $euro($announcement->amount) }}</span></div>
@endforeach
</div>
</details>
@endif
</div>