|
|
@@ -663,11 +663,9 @@ class DeclarationForm extends Model
|
|
|
// 报单中心汇率
|
|
|
$decCountryId = User::getEnCodeInfo(\Yii::$app->user->id)['COUNTRY_ID'];
|
|
|
$decCountry = Countries::getById($decCountryId);
|
|
|
- LoggerTool::debug(json_encode(['$decCountry', $decCountry]));
|
|
|
$decUserCurrencyRate = CurrencyConversions::getToUSDRate($decCountry['LOCAL_CURRENCY_ID']);
|
|
|
// 升级会员汇率
|
|
|
$country = Countries::getById($this->countryId);
|
|
|
- LoggerTool::debug(json_encode(['$country', $country]));
|
|
|
$currencyRate = CurrencyConversions::getToUSDRate($country['LOCAL_CURRENCY_ID']);
|
|
|
|
|
|
if($this->decWay==1) {
|
|
|
@@ -916,10 +914,12 @@ class DeclarationForm extends Model
|
|
|
}
|
|
|
|
|
|
// 升级会员
|
|
|
- $userCountry = User::getEnCodeInfo($this->_insertUserId);
|
|
|
+ $userCountryId = User::getEnCodeInfo($this->_insertUserId)['COUNTRY_ID'];
|
|
|
+ $userCountry = Countries::getById($userCountryId);
|
|
|
$userCurrencyRate = CurrencyConversions::getToUSDRate($userCountry['LOCAL_CURRENCY_ID']);
|
|
|
// 报单中心汇率
|
|
|
- $decCountry = User::getEnCodeInfo(\Yii::$app->user->id)['COUNTRY_ID'];
|
|
|
+ $decCountryId = User::getEnCodeInfo(\Yii::$app->user->id)['COUNTRY_ID'];
|
|
|
+ $decCountry = Countries::getById($decCountryId);
|
|
|
$decUserCurrencyRate = CurrencyConversions::getToUSDRate($decCountry['LOCAL_CURRENCY_ID']);
|
|
|
|
|
|
$orderModel = new Order();
|
|
|
@@ -954,7 +954,7 @@ class DeclarationForm extends Model
|
|
|
$orderModel->ORDER_AMOUNT_STANDARD = $this->_decAmountStandard;
|
|
|
$orderModel->PAY_AMOUNT_STANDARD = $this->_standardAmount;
|
|
|
$orderModel->EXCHANGE_RATE = $userCurrencyRate;
|
|
|
- $orderModel->COUNTRY_ID = $userCountry['COUNTRY_ID'];
|
|
|
+ $orderModel->COUNTRY_ID = $userCountryId;
|
|
|
$orderModel->CURRENCY_ID = $userCountry['LOCAL_CURRENCY_ID'] ?? 0;
|
|
|
if($this->province==1){
|
|
|
$orderModel->EXPRESS_TYPE = 1;
|