mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update
This commit is contained in:
parent
56cabbdc00
commit
2a92ee8b41
@ -208,7 +208,7 @@ class OrderController extends Controller
|
||||
if ($user->invite_user_id && $order->total_amount > 0) {
|
||||
$order->invite_user_id = $user->invite_user_id;
|
||||
$commissionFirstTime = (int)config('v2board.commission_first_time', 1);
|
||||
if ($commissionFirstTime || !($commissionFirstTime && Order::where('user_id', $user->id)->where('status', 3)->first())) {
|
||||
if (!$commissionFirstTime || ($commissionFirstTime && !Order::where('user_id', $user->id)->where('status', 3)->first())) {
|
||||
$inviter = User::find($user->invite_user_id);
|
||||
if ($inviter && $inviter->commission_rate) {
|
||||
$order->commission_balance = $order->total_amount * ($inviter->commission_rate / 100);
|
||||
|
Loading…
Reference in New Issue
Block a user