Browse Source

分期商品增bugfix

kevin_zhangl 2 years ago
parent
commit
3ac6f2bc34

+ 1 - 2
common/models/forms/ApproachDeclarationUpgradeForm.php

@@ -219,8 +219,7 @@ class ApproachDeclarationUpgradeForm extends Model
                 $checkPv = $totalPv + $diffPerf;
                 if ($hasInstalment){ // 如果买了分期付款商品,则不判断总pv
                     $allData['hasInstalment'] = 1;
-                }
-                if($checkPv < $decLevel['PERF']) {
+                }else if($checkPv < $decLevel['PERF']) {
                     throw new Exception(Yii::t('app', 'totalPVLessThan'), 400);
                 }
                 foreach ($decLevelConfig as $key=>$val){

+ 1 - 2
common/models/forms/DeclarationUpgradeForm.php

@@ -220,8 +220,7 @@ class DeclarationUpgradeForm extends Model
                 $checkPv = $totalPv + $diffPerf;
                 if ($hasInstalment){ // 如果买了分期付款商品,则不判断总pv
                     $allData['hasInstalment'] = 1;
-                }
-                if($checkPv < $decLevel['PERF']) {
+                }else if($checkPv < $decLevel['PERF']) {
                     throw new Exception(Yii::t('app', 'totalPVLessThan'), 400);
                 }
                 foreach ($decLevelConfig as $key=>$val){