Просмотр исходного кода

bugfix: EK-1569: 报单时无法使用PayStack支付.

kevinElken 8 месяцев назад
Родитель
Сommit
ee8c8862e3
1 измененных файлов с 3 добавлено и 4 удалено
  1. 3 4
      common/models/forms/ApproachDeclarationForm.php

+ 3 - 4
common/models/forms/ApproachDeclarationForm.php

@@ -852,14 +852,13 @@ 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;