|
|
@@ -546,7 +546,10 @@ class OrderForm extends Model
|
|
|
|
|
|
// 分期的总期数
|
|
|
$instalment = intval(Cache::getSystemConfig()['instalment']['VALUE'] ?? 3);
|
|
|
- LoggerTool::debug([$instalment, $userStage]);
|
|
|
+ // 分期商品的期数不能大于总分期数限制
|
|
|
+ if (intval($goods['INSTALMENT']) > $instalment) {
|
|
|
+ throw new Exception(Yii::t('app', 'instalmentGoodsNoError'));
|
|
|
+ }
|
|
|
if ($userStage != $instalment){
|
|
|
if ($userInstalmentInfo){
|
|
|
if($userInstalmentInfo['STAGE']>0 && $userInstalmentInfo['ORDER_TYPE']!='FX'){
|
|
|
@@ -895,6 +898,10 @@ class OrderForm extends Model
|
|
|
$userInstalmentInfo = Instalment::getInfo($userId);
|
|
|
// 分期的总期数
|
|
|
$instalment = intval(Cache::getSystemConfig()['instalment']['VALUE'] ?? 3);
|
|
|
+ // 分期商品的期数不能大于总分期数限制
|
|
|
+ if (intval($goods['INSTALMENT']) > $instalment) {
|
|
|
+ throw new Exception(Yii::t('app', 'instalmentGoodsNoError'));
|
|
|
+ }
|
|
|
if ($userStage == $instalment){
|
|
|
|
|
|
}else{
|