Pakete 7 und 9: Auskunft und Buchungswunsch, Aufenthalt und Abschluss (Zwischenstand)
- Haltefrist 0: unverbindliche Auskunft mit signiertem Link "Buchung anfragen", erneute Prüfung unter Sperre, automatische oder manuelle Bestätigung, Absage bei vergebenem Zeitraum, Ablauf unbeantworteter Auskünfte - Aufenthalt: Anreisedaten, Aufgaben je Wohnung, gebuchte Leistungen, Abweichungen und Folgeaufgaben als Aufgaben am Vorgang - Abschluss getrennt: Aufenthalt abgeschlossen / kaufmännisch abgeschlossen, Nachläufer (Forderung, Auszahlung) bleiben sichtbar - Zahlungsstatus nur aus Geld auf unserem Konto; Altbestand per Vorschau-Befehl - Verlauf weist Testzustellungen als solche aus - Abnahmetests T16-T25, T23 über isolierten SMTP-Empfänger Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3bcfc09417
commit
40d20cb7d1
52 files changed
+3196
-89
No files matched your search
@@ -17,7 +17,8 @@
|
||||
* Daily booking workflow. Payments are never chased automatically: due payments become tasks for the landlord
|
||||
* (BookingTask, once per booking and kind) who checks the payment and sends the reminder on a click
|
||||
* ({@see SendPaymentReminder}). Only the arrival information goes out by itself, once per booking, the configured
|
||||
* number of days before arrival. Completion after departure.
|
||||
* number of days before arrival. Preparation of the stays and their closing after departure ({@see PrepareStays},
|
||||
* {@see CloseStay}).
|
||||
*/
|
||||
class SendBookingReminders
|
||||
{
|
||||
@@ -27,7 +28,7 @@ class SendBookingReminders
|
||||
private const ARRIVAL_INFO_MAX_DAYS_BEFORE = 14;
|
||||
|
||||
/**
|
||||
* @return array{deposit_overdue: int, balance_request: int, balance_overdue: int, arrival_info: int, completed: int}
|
||||
* @return array{deposit_overdue: int, balance_request: int, balance_overdue: int, arrival_info: int, completed: int, prepared: int}
|
||||
*/
|
||||
public function handle(): array
|
||||
{
|
||||
@@ -68,18 +69,17 @@ public function handle(): array
|
||||
$booking->update(['arrival_info_sent_at' => now()]);
|
||||
}
|
||||
|
||||
$completed = Booking::query()
|
||||
->where('status', BookingStatus::Paid)
|
||||
->whereDate('departure', '<', $today)
|
||||
->get();
|
||||
$completed->each->update(['status' => BookingStatus::Completed]);
|
||||
// Package 9: prepare the coming stays, close the stays whose departure has passed (open money stays as follow-up).
|
||||
$prepared = app(PrepareStays::class)->handle();
|
||||
$completed = app(CloseStay::class)->due();
|
||||
|
||||
return [
|
||||
'deposit_overdue' => $depositTasks,
|
||||
'balance_request' => $requestTasks,
|
||||
'balance_overdue' => $overdueTasks,
|
||||
'arrival_info' => $arrivals->count(),
|
||||
'completed' => $completed->count(),
|
||||
'completed' => $completed,
|
||||
'prepared' => $prepared['arrival_details'] + $prepared['stay_tasks'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user