6
0
Fork 0
release
李静 2022-01-24 17:09:27 +08:00
parent 99cd492f3d
commit 08b7dafa4e
1 changed files with 5 additions and 5 deletions

View File

@ -189,14 +189,14 @@ class OrderProcessCommand extends Command
'remark' => "补贴总额={$dealerOrder->total_amount}/{$upgradeAmount}*{$subsidyAmount}",
]);
$fee = bcmul($totalAmount, bcdiv($feeRate, '100', 5), 3);
$fee = bcmul($channelSubsidyLog->total_amount, bcdiv($feeRate, '100', 5), 3);
$fee = round($fee, 2);
$channelSubsidyLog->earning()->create([
'user_id' => $dealer->user_id,
'lvl' => $dealer->lvl,
'total_amount' => $totalAmount,
'total_earnings' => bcsub($totalAmount, $fee, 2),
'user_id' => $channelSubsidyLog->user_id,
'lvl' => $channelSubsidyLog->lvl,
'total_amount' => $channelSubsidyLog->total_amount,
'total_earnings' => bcsub($channelSubsidyLog->total_amount, $fee, 2),
'fee' => $fee,
'fee_rate' => $feeRate,
'payer_id' => $dealerOrder->consignor_id,