Skip to content

Commit

Permalink
Merge branch 'hotfix/1.5.2.d'
Browse files Browse the repository at this point in the history
  • Loading branch information
daveroverts committed Feb 17, 2020
2 parents 5b1cdbf + 59ca390 commit a276f88
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/Http/Controllers/Booking/BookingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ public function index(Request $request, Event $event = null)
abort_unless(auth()->check() && auth()->user()->isAdmin, 404);
}
}
$booked = $bookings->where('status', BookingStatus::BOOKED)->count();

$booked = $bookings->where('status', BookingStatus::BOOKED)
->filter(function ($booking) {
/* @var Booking $booking */
return $booking->flights_count;
})->count();

if ($event->event_type_id == EventType::MULTIFLIGHTS) {
$total = $bookings->count();
return view('booking.overview_multiflights', compact('event', 'bookings', 'filter', 'total', 'booked'));
Expand Down

0 comments on commit a276f88

Please sign in to comment.