externelize group training registration canel limit minutes into params.php

This commit is contained in:
Roland Schneider
2021-10-08 23:25:10 +02:00
parent f0bf8684e4
commit 15398dc8d1
3 changed files with 8 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
namespace common\manager;
use common\components\Helper;
use common\models\Card;
use common\models\CardEventRegistrationForm;
use common\models\Customer;
@@ -246,7 +247,7 @@ class EventRegistrationManager extends BaseObject
if ($reason != EventRegistration::CANCEL_REASON_CUSTOMER) {
$timeUntilEventStart = $event->start - $now;
if ($timeUntilEventStart < 30 * 60) {
if ($timeUntilEventStart < Helper::getGroupTrainingRegistrationCancelLimitMinutes() * 60) {
throw new BadRequestHttpException('The reservation is already deleted', self::CANCEL_TIME_LIMIT_REACHED);
}
}