改进 统计
This commit is contained in:
parent
aa0dd7582d
commit
ef3b393712
@ -55,8 +55,8 @@ public function handle()
|
|||||||
$total_should = 0;
|
$total_should = 0;
|
||||||
|
|
||||||
foreach ($months as $month => $m) {
|
foreach ($months as $month => $m) {
|
||||||
$total += $m['balance'];
|
$total += round($m['balance'], 2);
|
||||||
$total_should += $m['should_balance'];
|
$total_should += round($m['should_balance'], 2);
|
||||||
$this->info("{$module->name} {$year}年 {$month}月 实收: {$total}元 应得: {$total_should} 元");
|
$this->info("{$module->name} {$year}年 {$month}月 实收: {$total}元 应得: {$total_should} 元");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -275,17 +275,15 @@ public function addLog($type = 'drops', float $amount = 0)
|
|||||||
if ($type == 'drops') {
|
if ($type == 'drops') {
|
||||||
// 换成 余额
|
// 换成 余额
|
||||||
|
|
||||||
// 如果小于 0.00,则不四舍五入
|
|
||||||
// $c = $amount / $rate;
|
|
||||||
//
|
|
||||||
// if ($c > 0.01) {
|
|
||||||
// $amount = $amount / $rate;
|
|
||||||
// }
|
|
||||||
|
|
||||||
$amount = $amount / $rate;
|
$amount = $amount / $rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
$amount = round($amount, 2);
|
// $amount = round($amount, 2);
|
||||||
|
// Log::debug('addLog', [
|
||||||
|
// 'amount' => $amount,
|
||||||
|
// 'rate' => $rate,
|
||||||
|
// 'commission' => $commission,
|
||||||
|
// ]);
|
||||||
|
|
||||||
|
|
||||||
$should_amount = round($amount * $commission, 2);
|
$should_amount = round($amount * $commission, 2);
|
||||||
|
@ -49,8 +49,8 @@ public function toGroup($notifiable)
|
|||||||
$total_should = 0;
|
$total_should = 0;
|
||||||
|
|
||||||
foreach ($months as $month => $m) {
|
foreach ($months as $month => $m) {
|
||||||
$total += $m['balance'];
|
$total += round($m['balance'], 2);
|
||||||
$total_should += $m['should_balance'];
|
$total_should += round($m['should_balance'], 2);
|
||||||
$text .= <<<EOF
|
$text .= <<<EOF
|
||||||
|
|
||||||
==========
|
==========
|
||||||
|
Loading…
Reference in New Issue
Block a user