修复统计bug

This commit is contained in:
2024-11-14 13:07:08 +08:00
parent 9b6859a2c6
commit 3c5ae528d3
2 changed files with 215 additions and 0 deletions

View File

@@ -690,6 +690,7 @@ class FinanceController extends BaseAdminController
foreach ($model as $v) {
$thisMonth = date($dateStr, $v['created_at']);
if (!isset($saleMoney[$thisMonth])) $saleMoney[$thisMonth] = '0.00';
$saleMoney[$thisMonth] = bcadd($saleMoney[$thisMonth] ?? '0', $v['total_price'], 2);
$totalMoney = bcadd($totalMoney, $v['total_price'], 2);