|
|
@@ -218,8 +218,8 @@ class ShopGoodsForm extends Model
|
|
|
$shopGoodsNature->GOODS_ID = $shopGoods->ID;
|
|
|
$shopGoodsNature->COUNTRY_ID = $item['ID'];
|
|
|
$shopGoodsNature->LOCAL_CURRENCY_ID = $country['LOCAL_CURRENCY_ID'];
|
|
|
- $shopGoodsNature->MARKET_PRICE = $item['marketPrice']; //$shopGoods->SELL_PRICE_STANDARD * $productRate;
|
|
|
- $shopGoodsNature->SELL_PRICE = $shopGoods->SELL_PRICE_STANDARD * $productRate; // $item['sellPrice'];
|
|
|
+ $shopGoodsNature->SELL_PRICE = $shopGoods->SELL_PRICE_STANDARD * $productRate;
|
|
|
+ $shopGoodsNature->MARKET_PRICE = $item['marketPrice'];
|
|
|
$shopGoodsNature->TAX_RATE = $item['taxRate'];
|
|
|
if (!$shopGoodsNature->save()) {
|
|
|
$transaction->rollBack();
|
|
|
@@ -283,8 +283,8 @@ class ShopGoodsForm extends Model
|
|
|
$shopGoodsNature->GOODS_ID = $model->ID;
|
|
|
$shopGoodsNature->COUNTRY_ID = $item['ID'];
|
|
|
$shopGoodsNature->LOCAL_CURRENCY_ID = $country['LOCAL_CURRENCY_ID'];
|
|
|
- $shopGoodsNature->MARKET_PRICE = $item['marketPrice']; // $model->SELL_PRICE_STANDARD * $productRate;
|
|
|
- $shopGoodsNature->SELL_PRICE = $model->SELL_PRICE_STANDARD * $productRate; // $item['sellPrice'];
|
|
|
+ $shopGoodsNature->SELL_PRICE = $model->SELL_PRICE_STANDARD * $productRate;
|
|
|
+ $shopGoodsNature->MARKET_PRICE = $item['marketPrice'];
|
|
|
$shopGoodsNature->TAX_RATE = $item['taxRate'];
|
|
|
if (!$shopGoodsNature->save()) {
|
|
|
$transaction->rollBack();
|
|
|
@@ -349,8 +349,9 @@ class ShopGoodsForm extends Model
|
|
|
foreach ($shopGoodsNature as $goodsNature) {
|
|
|
// 商品
|
|
|
$shopGoods = ShopGoods::findOne(['ID' => $goodsNature->GOODS_ID]);
|
|
|
- // 刷新销售价格
|
|
|
+ // 刷新销售价格、市场价格
|
|
|
$goodsNature->SELL_PRICE = $shopGoods->SELL_PRICE_STANDARD * $currencyConversions->PRODUCT_RATE;
|
|
|
+ $goodsNature->MARKET_PRICE = $shopGoods->SELL_PRICE_STANDARD * $currencyConversions->PRODUCT_RATE * 1.2;
|
|
|
if (!$goodsNature->save()) {
|
|
|
$transaction->rollBack();
|
|
|
throw new Exception(Form::formatErrorsForApi($goodsNature->getErrors()));
|