Stornoregeln mit automatischer Kostenberechnung, Storno-Verwaltung, Vertragsanlagen
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m34s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m34s
- Stornoregel (Stufen nach Tagen vor Anreise, Mietpreis oder Gesamtpreis, Ersatzmieter-Gebuehr), je Vertragsvorlage, beim Angebot eingefroren, als Platzhalter im Vertrag - Stornierung (Gast-Link oder Verwaltung) berechnet die Kosten, legt einen Stornofall an; Verwaltung Stornierungen mit Vorschlag, Festlegung, Saldo, Abrechnung und Erlass; Gast sieht die Kosten vorab auf der Storno-Seite - Vertragsanlagen als eigene versionierte Dokumente mit Bedingung (immer, Zusatzleistung, Portal, von Hand), je Angebot ausgewaehlt und eingefroren; Zusatzleistungen in der Buchung erfassbar - FeWo-direkt-Installation legt die Stornoregel aus Paragraf 13 an Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5baf39441f
commit
0c4187edaf
37 files changed
+1440
-10
No files matched your search
@@ -11,6 +11,7 @@
|
||||
use App\Mail\CancellationRequested;
|
||||
use App\Models\Booking;
|
||||
use App\Models\BookingTask;
|
||||
use App\Support\CancellationCost;
|
||||
use App\Support\Settings;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
@@ -34,7 +35,9 @@ public function modeFor(Booking $booking): CancellationMode
|
||||
|
||||
return match ($property->cancellation_mode) {
|
||||
CancellationMode::Instant => CancellationMode::Instant,
|
||||
CancellationMode::InstantWhenFree => today()->lessThanOrEqualTo($freeUntil) ? CancellationMode::Instant : CancellationMode::Request,
|
||||
CancellationMode::InstantWhenFree => ($cost = CancellationCost::calculate($booking)) !== null
|
||||
? ($cost['free'] ? CancellationMode::Instant : CancellationMode::Request)
|
||||
: (today()->lessThanOrEqualTo($freeUntil) ? CancellationMode::Instant : CancellationMode::Request),
|
||||
default => CancellationMode::Request,
|
||||
};
|
||||
}
|
||||
@@ -60,6 +63,7 @@ public function handle(Booking $booking, ?string $message = null): ?Cancellation
|
||||
$mode = $this->modeFor($booking);
|
||||
if ($mode === CancellationMode::Instant) {
|
||||
$booking->update(['status' => BookingStatus::Cancelled, 'cancelled_at' => now()]);
|
||||
app(RecordCancellation::class)->handle($booking, 'guest');
|
||||
}
|
||||
BookingTask::query()->create([
|
||||
'booking_id' => $booking->id,
|
||||
|
||||
Reference in new issue
Block a user