Generische iCal-Kanäle mit Bestandsklärung und sicheren Exporten bereitstellen
Deploy FeWo mit PipelineManager / deploy (push) Successful in 2m33s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 2m33s
This commit is contained in:
1 parent
6fe5bbc6e3
commit
783068501c
42 files changed
+2646
-248
No files matched your search
@@ -66,7 +66,7 @@ private function occupancy(CarbonImmutable $from, CarbonImmutable $until): int
|
||||
$nights = [];
|
||||
$periods = Booking::query()->whereIn('status', BookingStatus::occupying())->overlapping($from, $until)->get(['arrival', 'departure'])
|
||||
->map(fn (Booking $booking): array => [$booking->arrival, $booking->departure])
|
||||
->concat(BlockedPeriod::query()->whereNotNull('channel_id')->overlapping($from, $until)->get(['starts_on', 'ends_on'])
|
||||
->concat(BlockedPeriod::query()->occupying()->whereNotNull('channel_id')->overlapping($from, $until)->get(['starts_on', 'ends_on'])
|
||||
->map(fn (BlockedPeriod $block): array => [$block->starts_on, $block->ends_on]));
|
||||
|
||||
foreach ($periods as [$start, $end]) {
|
||||
|
||||
Reference in new issue
Block a user