|
|
@ -146,7 +146,7 @@ function roblib_bee_limits_check_reservations($user, $form, &$form_state) { |
|
|
|
$event = NULL; |
|
|
|
$event = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
$max_bookings_allowed = roblib_bee_limits_get_max_bookings_allowed($user); |
|
|
|
$max_bookings_allowed = roblib_bee_limits_get_max_bookings_allowed($user); |
|
|
|
if($max_bookings_allowed != -1 && $active_bookings > $max_bookings_allowed){ |
|
|
|
if($max_bookings_allowed != -1 && $active_bookings >= $max_bookings_allowed){ |
|
|
|
$form_state->setError($form, t('Reservation exceeded your maximum number |
|
|
|
$form_state->setError($form, t('Reservation exceeded your maximum number |
|
|
|
of active bookings allowed. You currently have @active_bookings active reservations, |
|
|
|
of active bookings allowed. You currently have @active_bookings active reservations, |
|
|
|
You are allowed @max_bookings .', array('@active_bookings' => $active_bookings, |
|
|
|
You are allowed @max_bookings .', array('@active_bookings' => $active_bookings, |
|
|
|