|
|
@@ -219,15 +219,13 @@ class ShopGoodsForm extends Model
|
|
|
foreach ($this->nature as $item) {
|
|
|
// 国家
|
|
|
$country = Countries::getById($item['ID']);
|
|
|
- // 转换美元汇率
|
|
|
- $productRate = CurrencyConversions::getToUSDRate($country['LOCAL_CURRENCY_ID']);
|
|
|
|
|
|
$shopGoodsNature = new ShopGoodsNature();
|
|
|
$shopGoodsNature->GOODS_ID = $shopGoods->ID;
|
|
|
$shopGoodsNature->COUNTRY_ID = $item['ID'];
|
|
|
$shopGoodsNature->LOCAL_CURRENCY_ID = $country['LOCAL_CURRENCY_ID'];
|
|
|
- $shopGoodsNature->SELL_PRICE = $shopGoods->SELL_PRICE_STANDARD * $productRate;
|
|
|
- $shopGoodsNature->MARKET_PRICE = $item['marketPrice'];
|
|
|
+ $shopGoodsNature->SELL_PRICE = round($item['sellPrice']);
|
|
|
+ $shopGoodsNature->MARKET_PRICE = round($item['marketPrice']);
|
|
|
$shopGoodsNature->TAX_RATE = $item['taxRate'];
|
|
|
if (!$shopGoodsNature->save()) {
|
|
|
$transaction->rollBack();
|
|
|
@@ -291,7 +289,7 @@ class ShopGoodsForm extends Model
|
|
|
$shopGoodsNature->GOODS_ID = $model->ID;
|
|
|
$shopGoodsNature->COUNTRY_ID = $item['ID'];
|
|
|
$shopGoodsNature->LOCAL_CURRENCY_ID = $country['LOCAL_CURRENCY_ID'];
|
|
|
- $shopGoodsNature->SELL_PRICE = round($model->SELL_PRICE_STANDARD * $productRate);
|
|
|
+ $shopGoodsNature->SELL_PRICE = round($item['sellPrice']);
|
|
|
$shopGoodsNature->MARKET_PRICE = round($item['marketPrice']);
|
|
|
$shopGoodsNature->TAX_RATE = $item['taxRate'];
|
|
|
if (!$shopGoodsNature->save()) {
|