From bf830e5ddaa87c8f687168cbf1893d00e6d2f2ca Mon Sep 17 00:00:00 2001 From: weizong song Date: Tue, 18 May 2021 11:57:23 +0800 Subject: [PATCH] up --- app/Http/Controllers/Manager/StatisticsController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/Manager/StatisticsController.php b/app/Http/Controllers/Manager/StatisticsController.php index d4aeb5b..af4ef05 100644 --- a/app/Http/Controllers/Manager/StatisticsController.php +++ b/app/Http/Controllers/Manager/StatisticsController.php @@ -241,6 +241,7 @@ class StatisticsController extends CommonController $recharge_by_payment = $model_recharge->select("payment", "paid_at", "money", "order_id")->addSelect(DB::raw("sum(`money`) as total"))->groupBy("payment")->get()->keyBy("payment")->toArray(); $recharge = []; $recharge["total"] = collect($recharge_by_payment)->sum("total"); + $recharge["total"] = intval($recharge["total"] * 100) / 100; $recharge["total_online"] = collect($recharge_by_payment)->filter(function ($item) use ($payment_online_methods) { return in_array($item["payment"], array_keys($payment_online_methods)); })->sum("total");