|
@@ -189,7 +189,7 @@ class GuestDeclarationOrderService
|
|
|
$levels = Cache::getDecLevelConfig();
|
|
$levels = Cache::getDecLevelConfig();
|
|
|
$minimumPv = $levels ? min(array_map(static function ($level) { return (float) $level['PERF']; }, $levels)) : 0;
|
|
$minimumPv = $levels ? min(array_map(static function ($level) { return (float) $level['PERF']; }, $levels)) : 0;
|
|
|
if ($pv < $minimumPv) {
|
|
if ($pv < $minimumPv) {
|
|
|
- throw new BadRequestHttpException(Yii::t('app', 'totalBVCanNotLessThanSelectedBV').1);
|
|
|
|
|
|
|
+ throw new BadRequestHttpException(Yii::t('app', 'totalBVCanNotLessThanSelectedBV').‘1’);
|
|
|
}
|
|
}
|
|
|
if ((string) ($input['decWay'] ?? '') !== '1') {
|
|
if ((string) ($input['decWay'] ?? '') !== '1') {
|
|
|
$selectedLevel = $levels[$input['decLv'] ?? ''] ?? null;
|
|
$selectedLevel = $levels[$input['decLv'] ?? ''] ?? null;
|
|
@@ -197,7 +197,7 @@ class GuestDeclarationOrderService
|
|
|
throw new BadRequestHttpException(Yii::t('app', 'pleaseSelectTheEntryLevel'));
|
|
throw new BadRequestHttpException(Yii::t('app', 'pleaseSelectTheEntryLevel'));
|
|
|
}
|
|
}
|
|
|
if ($pv < (float) $selectedLevel['PERF']) {
|
|
if ($pv < (float) $selectedLevel['PERF']) {
|
|
|
- throw new BadRequestHttpException(Yii::t('app', 'totalBVCanNotLessThanSelectedBV').2);
|
|
|
|
|
|
|
+ throw new BadRequestHttpException(Yii::t('app', 'totalBVCanNotLessThanSelectedBV').'2');
|
|
|
}
|
|
}
|
|
|
$actualLevel = null;
|
|
$actualLevel = null;
|
|
|
foreach ($levels as $levelId => $level) {
|
|
foreach ($levels as $levelId => $level) {
|
|
@@ -206,7 +206,7 @@ class GuestDeclarationOrderService
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if ($actualLevel !== null && (string) $input['decLv'] !== (string) $actualLevel) {
|
|
if ($actualLevel !== null && (string) $input['decLv'] !== (string) $actualLevel) {
|
|
|
- throw new BadRequestHttpException(Yii::t('app', 'totalBVCanNotLessThanNextSelectedLevelBV').3);
|
|
|
|
|
|
|
+ throw new BadRequestHttpException(Yii::t('app', 'totalBVCanNotLessThanNextSelectedLevelBV').'3');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if ($amount <= 0 || empty($input['email']) || !filter_var($input['email'], FILTER_VALIDATE_EMAIL)) {
|
|
if ($amount <= 0 || empty($input['email']) || !filter_var($input['email'], FILTER_VALIDATE_EMAIL)) {
|