| @@ -41,9 +41,9 @@ | ||
| 41 | 41 | foreach ($allDepartures as $departure) { |
| 42 | 42 | $date = $departure->start_date ?: $departure->date; |
| 43 | 43 | |
| 44 | 44 | // Get correct capacity from availability |
| 45 | - $correctCapacity = $this->capacityService->getCapacityForDate($departure->trip_id, $date); | |
| 45 | + $correctCapacity = $this->capacityService->getCapacityForDate($departure->trip_id, $date, $departure->time ?? null); | |
| 46 | 46 | |
| 47 | 47 | // Only update if capacity is different and correct capacity > 0 |
| 48 | 48 | if ($correctCapacity > 0 && $departure->max_capacity !== $correctCapacity) { |
| 49 | 49 | $updated = $this->departureRepository->update($departure->id, [ |