|
|
@@ -681,10 +681,11 @@ class ApproachDeclarationForm extends Model
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if ($hasInstalment){ // 如果买了分期付款商品,则不判断总pv
|
|
|
- $allData['hasInstalment'] = 1;
|
|
|
- }else if($totalPv<$decLevel['PERF']){
|
|
|
- throw new Exception(Yii::t('app', 'totalBVCanNotLessThanSelectedBV'));
|
|
|
+ if($totalPv<$decLevel['PERF']){
|
|
|
+ if ($hasInstalment && $decLevel['LEVEL_NAME'] == 'Elite'){
|
|
|
+ }else{
|
|
|
+ throw new Exception(Yii::t('app', 'totalBVCanNotLessThanSelectedBV'));
|
|
|
+ }
|
|
|
}
|
|
|
foreach ($decLevelConfig as $key => $val) {
|
|
|
if ($totalPv >= $val['PERF']) {
|
|
|
@@ -692,7 +693,10 @@ class ApproachDeclarationForm extends Model
|
|
|
}
|
|
|
}
|
|
|
if ($this->decLv != $toDecLevel) {
|
|
|
- throw new Exception(Yii::t('app', 'totalBVCanNotLessThanNextSelectedLevelBV'));
|
|
|
+ if ($hasInstalment && $decLevel['LEVEL_NAME'] == 'Elite'){
|
|
|
+ }else{
|
|
|
+ throw new Exception(Yii::t('app', 'totalBVCanNotLessThanNextSelectedLevelBV'));
|
|
|
+ }
|
|
|
}
|
|
|
$this->_decAmount = $totalAmount;
|
|
|
$this->_decPv = $totalPv;
|