|
|
@@ -327,6 +327,7 @@ class BaApproachOrderForm extends Model
|
|
|
$totalAmount = 0;
|
|
|
$totalPv = 0;
|
|
|
$goodsType = ShopGoods::GOODS_TYPE;
|
|
|
+ $exchangeRate = floatval(Cache::getSystemConfig()['exchangeRate']['VALUE'] ?? 0); // 汇率
|
|
|
foreach ($this->goodsNum as $k => $v) {
|
|
|
if ($v) {
|
|
|
$goods = ShopGoods::findOneAsArray('ID = :ID AND STATUS = 1', [':ID' => $ids[$k]]);
|
|
|
@@ -335,10 +336,12 @@ class BaApproachOrderForm extends Model
|
|
|
$discount = $goodsType[$goods['TYPE']]['discount'];
|
|
|
$realPrice = $goods['SELL_PRICE'] * $discount/100;
|
|
|
$realPv = $goods['PRICE_PV'] * $discount/100;
|
|
|
+ $realPriceStandard = $goods['SELL_PRICE_STANDARD'] * $discount/100;
|
|
|
} else {
|
|
|
$discount = $goods['SELL_DISCOUNT'];
|
|
|
$realPrice = $goods['SELL_PRICE'] * $discount;
|
|
|
$realPv = $goods['PRICE_PV'] * $discount;
|
|
|
+ $realPriceStandard = $goods['SELL_PRICE_STANDARD'] * $discount;
|
|
|
}
|
|
|
$totalAmount += $realPrice * intval($v);
|
|
|
$totalPv += $realPv * intval($v);
|
|
|
@@ -357,6 +360,9 @@ class BaApproachOrderForm extends Model
|
|
|
'CATEGORY_TYPE' => $goods['CATEGORY_TYPE'],
|
|
|
'PAY_TYPE' => $this->payType,
|
|
|
'EMAIL' => $this->email,
|
|
|
+ 'STANDARD_PRICE' => $goods['SELL_PRICE_STANDARD'],
|
|
|
+ 'REAL_STANDARD_PRICE' => $realPriceStandard,
|
|
|
+ 'EXCHANGE_RATE' => $exchangeRate,
|
|
|
];
|
|
|
}
|
|
|
}
|