WIP
parent
99cd492f3d
commit
08b7dafa4e
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue