|
|
@@ -2494,6 +2494,7 @@ class StoreOrder extends BaseModel
|
|
|
$cartInfo = StoreOrderCartInfo::whereIn('cart_id', $order['cart_id'])->column('cart_info');
|
|
|
$suit = 0;
|
|
|
$suit_price = 0;
|
|
|
+ $extra_price = 0;
|
|
|
foreach ($cartInfo as $value) {
|
|
|
$product = json_decode($value, true);
|
|
|
if (isset($product['productInfo'])) {
|
|
|
@@ -2502,6 +2503,9 @@ class StoreOrder extends BaseModel
|
|
|
$suit += $product['cart_num'] ?? 0;
|
|
|
$suit_price += ($productInfo['attrInfo']['price'] ?? $product['price']) * $product['cart_num'];
|
|
|
}
|
|
|
+ if (!$product['is_award']) {
|
|
|
+ $extra_price += ($productInfo['attrInfo']['price'] ?? $product['price']) * $product['cart_num'];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
$res = true;
|
|
|
@@ -2588,8 +2592,8 @@ class StoreOrder extends BaseModel
|
|
|
// }
|
|
|
}
|
|
|
if ($group_level) {
|
|
|
- $brokeragePrice = bcmul(bcdiv($group_level['group_award'], 100, 4), bcsub($order['pay_price'], $suit_price, 2), 2);
|
|
|
- if ($order['use_integral'] > 0) $brokeragePrice = bcmul(bcdiv($group_level['integral_group_award'], 100, 4), bcsub($order['pay_price'], $suit_price, 2), 2);
|
|
|
+ $brokeragePrice = bcmul(bcdiv($group_level['group_award'], 100, 4), bcsub(bcsub($order['pay_price'], $suit_price, 2), $extra_price, 2), 2);
|
|
|
+ if ($order['use_integral'] > 0) $brokeragePrice = bcmul(bcdiv($group_level['integral_group_award'], 100, 4), bcsub(bcsub($order['pay_price'], $suit_price, 2), $extra_price, 2), 2);
|
|
|
if ($brokeragePrice > $send_normal) {
|
|
|
$real_send = bcsub($brokeragePrice, $send_normal, 2);
|
|
|
if ($real_send > 0) {
|