Skip to content

Commit

Permalink
Fixed: Same table is being reserved for same time slot multiple users
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoyigi committed Jan 9, 2020
1 parent d52a155 commit c5ef431
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/admin/models/Reservations_model.php
Expand Up @@ -266,7 +266,7 @@ public static function findReservedTables($location, $dateTime)
$query = self::with('tables');
$query->whereLocationId($location->getKey());
$query->whereBetweenDate($dateTime->toDateTimeString());
$query->where('status_id', setting('confirmed_reservation_status'));
$query->whereNotIn('status_id', [0, setting('canceled_reservation_status')]);
$result = $query->get();

return $result->pluck('tables')->flatten()->keyBy('table_id');
Expand Down

0 comments on commit c5ef431

Please sign in to comment.