6
0
Fork 0

order 没有提成 支付时 不分账

base
panliang 2023-10-23 14:09:36 +08:00
parent aafeb15dd2
commit d7da7063db
1 changed files with 2 additions and 1 deletions

View File

@ -1245,8 +1245,9 @@ class OrderService
$user = $order->user;
$agentIds = User::whereIn('id', $user->userInfo->parent_ids)->pluck('agent_id');
$ratio = Agent::whereIn('id', $agentIds)->sum('ratio');
$profit = $ratio * $order->sales_value;
// 没有提成
if ($ratio == 0) {
if ($profit == 0) {
$share = 'N';
}