|
|
@@ -830,7 +830,7 @@ class OrderForm extends Model
|
|
|
|
|
|
$decUserID = Info::getUserIdByUserName($this->decUserName);
|
|
|
$stockist_user = User::getEnCodeInfo($decUserID);
|
|
|
- if(!$stockist_user){
|
|
|
+ if(!$stockist_user || $stockist_user['IS_DEC'] != 1){
|
|
|
throw new Exception(Yii::t('app', 'stockistDoesNotExist'));
|
|
|
}
|
|
|
|
|
|
@@ -843,7 +843,7 @@ class OrderForm extends Model
|
|
|
$currencyRate = CurrencyConversions::getToUSDRate($country['LOCAL_CURRENCY_ID']);
|
|
|
//判断是否是报单中心
|
|
|
$loginUser = User::getEnCodeInfo(\Yii::$app->user->id);
|
|
|
- if($loginUser['IS_DEC'] != 1){
|
|
|
+ if($loginUser['IS_DEC'] == 1){
|
|
|
if($decUserID != \Yii::$app->user->id){
|
|
|
throw new Exception(Yii::t('app', 'decUserNameIsWrong'));
|
|
|
}
|