Files
fewo-stommer/app/Process/OutwardSuspension.php
LarsandClaude Opus 5.5 7e22e12cac U-A/U-B: Prozesskern mit Fachmodulen, versionierten Modellen, eingefrorenem Prozessplan, ProcessRunner (harte/weiche Abhängigkeiten), CasePricing, Loyalty nur im Tester
CaseActivities/CaseAutomation sind Fassaden über ProcessRunner. Verhaltensvergleich v0.11:
11 Abläufe und 198 Konstellationen gleich, beabsichtigte Abweichungen I-004/I-005 (F-001/F-002).
Volle Suite vor U-B: 785/785.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 14:49:44 +01:00

33 lines
1.4 KiB
PHP

<?php
namespace App\Process;
use App\Enums\BookingTaskKind;
use App\Enums\BookingTaskStatus;
use App\Models\Booking;
use App\Models\BookingTask;
/**
* Decision O4: while a portal's report of a cancellation or change is open on a case, automatic messages to the guest
* that the report could make wrong or misleading (booking documents, payment reminders, arrival information, review
* request) wait until the landlord has clarified the report. The report itself never changes the booking.
*
* Only reports that the intake reliably assigned to this case count: PortalIntake opens these tasks only for a case
* found by its booking reference or its exact nights (E-019); unassigned portal mails never become a task on a case.
* Internal checks, deadlines, conflict detection and tasks go on as before.
*/
final class OutwardSuspension
{
public const KINDS = [BookingTaskKind::PortalCancellationReported, BookingTaskKind::PortalChangeReported];
/**
* The reason automatic messages to the guest wait, or null when they may go.
*/
public static function reason(Booking $booking): ?string
{
$task = BookingTask::query()->where('booking_id', $booking->id)->whereIn('kind', self::KINDS)->where('status', BookingTaskStatus::Open)->first();
return $task === null ? null : 'Automatische Nachrichten an den Gast warten, bis die Meldung „'.$task->label().'“ geklärt ist.';
}
}