add property and property definition
This commit is contained in:
@@ -3,11 +3,13 @@
|
||||
namespace common\manager;
|
||||
|
||||
use common\components\Helper;
|
||||
use common\helpers\AppArrayHelper;
|
||||
use common\models\Card;
|
||||
use common\models\CardEventRegistrationForm;
|
||||
use common\models\Customer;
|
||||
use common\models\Event;
|
||||
use common\models\EventRegistration;
|
||||
use common\models\PropertyDefinition;
|
||||
use common\models\Ticket;
|
||||
use customerapi\models\available\EventInterval;
|
||||
use customerapi\models\registrations\EventRegistrationAvailable;
|
||||
@@ -247,7 +249,12 @@ class EventRegistrationManager extends BaseObject
|
||||
|
||||
if ($reason == EventRegistration::CANCEL_REASON_CUSTOMER) {
|
||||
$timeUntilEventStart = $event->start - $now;
|
||||
if ($timeUntilEventStart < Helper::getGroupTrainingRegistrationCancelLimitMinutes() * 60) {
|
||||
$settingsManager = new PropertySettingsManager();
|
||||
$limitMinutes = $settingsManager->getSetting(
|
||||
PropertyDefinition::DEFINITION_GROUP_TRAINING_CUSTOMER_CANCEL_TIME_LIMIT,
|
||||
Helper::getGroupTrainingRegistrationCancelLimitMinutes()
|
||||
);
|
||||
if ($timeUntilEventStart <= $limitMinutes* 60) {
|
||||
throw new BadRequestHttpException('The reservation can\'t be deleted', self::CANCEL_TIME_LIMIT_REACHED);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user