mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update: optimize commission calculation
This commit is contained in:
parent
03846022ef
commit
8a18bdf9c3
@ -93,6 +93,7 @@ class CheckCommission extends Command
|
||||
0 => 100
|
||||
];
|
||||
}
|
||||
$actualPayCommissionAmount = 0;
|
||||
for ($l = 0; $l < $level; $l++) {
|
||||
$inviter = User::find($inviteUserId);
|
||||
if (!$inviter) continue;
|
||||
@ -118,7 +119,10 @@ class CheckCommission extends Command
|
||||
return false;
|
||||
}
|
||||
$inviteUserId = $inviter->invite_user_id;
|
||||
$actualPayCommissionAmount = $actualPayCommissionAmount + $commissionBalance;
|
||||
}
|
||||
// update order commission balance
|
||||
$order->commission_balance = $actualPayCommissionAmount;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
2
public/assets/admin/umi.js
vendored
2
public/assets/admin/umi.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user