diff --git a/application/views/booking/booking_main.php b/application/views/booking/booking_main.php
index f22c63a..a050d9e 100644
--- a/application/views/booking/booking_main.php
+++ b/application/views/booking/booking_main.php
@@ -500,8 +500,14 @@
//If too far in the future (past the roles booking window)
else if($tNow > (mktime(0,0,0, date("n"), date("j")+1)+($role->booking_window*24*60*60)) ){
- echo '
'.date("g:iA",$tNow).' | ';
+ //If the slot goes past the end of day (possible if building hours for other buildings are longer then current room hours)
+ while(($tNow + 30*$free_slot_width) >= $tEnd){
+ $free_slot_width -=1;
+ }
+
+ echo ''.date("g:iA",$tNow).' | ';
}
+
//If there are not enough hours for the day/week to make a booking
else if($limits['day_used'] >= $room->max_daily_hours || $limits['week_remaining'] <= 0){
echo ''.date("g:iA",$tNow).' | ';