|
|
@@ -852,13 +852,14 @@ class ApproachDeclarationForm extends Model
|
|
|
$warehouse = '01';
|
|
|
}
|
|
|
|
|
|
+ // 升级会员
|
|
|
+ $userCountryId = User::getEnCodeInfo($this->_insertUserId)['COUNTRY_ID'];
|
|
|
+ $userCountry = Countries::getById($userCountryId);
|
|
|
+ $userCurrencyRate = CurrencyConversions::getToUSDRate($userCountry['LOCAL_CURRENCY_ID']);
|
|
|
// 报单中心汇率
|
|
|
$decCountryId = User::getEnCodeInfo(\Yii::$app->user->id)['COUNTRY_ID'];
|
|
|
$decCountry = Countries::getById($decCountryId);
|
|
|
$decUserCurrencyRate = CurrencyConversions::getToUSDRate($decCountry['LOCAL_CURRENCY_ID']);
|
|
|
- // 升级会员汇率
|
|
|
- $country = Countries::getById($this->countryId);
|
|
|
- $currencyRate = CurrencyConversions::getToUSDRate($country['LOCAL_CURRENCY_ID']);
|
|
|
|
|
|
$orderModel = new ApproachOrder();
|
|
|
$orderModel->SN = 'OS' . $ord;
|
|
|
@@ -891,7 +892,7 @@ class ApproachDeclarationForm 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;
|
|
|
$orderModel->DEC_USER_ID = Info::getUserNameByUserId(\Yii::$app->user->id);
|
|
|
if ($this->province==1) {
|