Commit 37a14392 authored by jianghaiming's avatar jianghaiming

updateS:Et

parent 2fefaccd
......@@ -481,14 +481,12 @@ class MarketingService
throw new MarketingException(['cus' => 5]);
}
$colums = [];
$goodCount = !empty($goodsSkuId) ? count($goodsSkuId) : 0;
$goodCount = !empty($goodsSkuId) ? count($goodsSkuId) : 0;
$goodsSkuList = GoodsSku::select('*', ['goods_sku_id' => $goodsSkuId]);
foreach ($goodsSkuList as $key => $value) {
$clearPrice = !empty($value["clear_price"]) ? $value["clear_price"] : 0;
$price = !empty($value["price"]) ? $value["price"] : 0;
$chargeFee = !empty($price) ? bcmul($price , self::CHARGEFEE,2) : 0; //手续费
$chargeFee = !empty($price) ? bcmul($price , self::CHARGEFEE,2) : 0; //手续费 (分)
if (!empty($clearPrice) && $clearPrice > 0) {
if ($commissionMode == Marketing::COMMISSION_MODE_RATE) {
$commissionTotal = ($firstCommissionRate + $secondCommissionRate) / 10000 * $price;
......@@ -498,8 +496,8 @@ class MarketingService
}
if ($commissionMode == Marketing::COMMISSION_MODE_FIXED) {
$commissionTotal = ($firstCommissionRate + $secondCommissionRate)/100;
if (($price - $commissionTotal -$chargeFee)< $clearPrice) {
$commissionTotal = ($firstCommissionRate + $secondCommissionRate);
if (($price - $commissionTotal - $chargeFee)< $clearPrice) {
throw new GoodsException(['cus' => 48]);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment