U-A: process:check/impact/fingerprint, Modulmatrix, Modul-Vertragstest, O4-Aussetzung der Außenwirkungen (I-002), Bewertungsbitte je Kanal abschaltbar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7e22e12cac
commit
d695566a7a
9 files changed
+466
-3
No files matched your search
@@ -9,6 +9,7 @@
|
||||
use App\Mail\ArrivalInformation;
|
||||
use App\Models\Booking;
|
||||
use App\Models\BookingTask;
|
||||
use App\Process\OutwardSuspension;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
@@ -63,7 +64,9 @@ public function handle(): array
|
||||
->whereDate('arrival', '>=', $today)
|
||||
->whereDate('arrival', '<=', $today->copy()->addDays(self::ARRIVAL_INFO_MAX_DAYS_BEFORE)))
|
||||
->filter(fn (Booking $booking): bool => $booking->process()->guestMessages() === Responsibility::Landlord
|
||||
&& $booking->arrival->lessThanOrEqualTo($today->copy()->addDays($booking->process()->arrivalInfoDaysBefore())));
|
||||
&& $booking->arrival->lessThanOrEqualTo($today->copy()->addDays($booking->process()->arrivalInfoDaysBefore()))
|
||||
// Decision O4: an open portal report of a cancellation or change holds the message back until clarified.
|
||||
&& OutwardSuspension::reason($booking) === null);
|
||||
foreach ($arrivals as $booking) {
|
||||
Mail::to($booking->guest->email, $booking->guest->full_name)->send(new ArrivalInformation($booking));
|
||||
$booking->update(['arrival_info_sent_at' => now()]);
|
||||
|
||||
Reference in new issue
Block a user