diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php index e79e644..7fa8dd8 100755 --- a/app/Http/Controllers/Admin/StatisticsController.php +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -584,11 +584,11 @@ class StatisticsController extends CommonController // ->where('created_at', 'like', '%' . $month . '%') // ->whereIn('bed_id', $beds->pluck('id')) // ->get(); - $refund['order_total'] = Balance::where('created_at', 'like', '%' . $month . '%') + $refund['order_total'] = abs(Balance::where('created_at', 'like', '%' . $month . '%') ->where('belongs_type', 'App\Models\Refund') ->whereHas("order", function ($query) use ($project_id) { $query->where("project_id", $project_id); - })->sum("money"); + })->sum("money")); $refund['shijishouru'] = $refund['order_total']; $refund['guanlifei'] = round($refund['order_total'] * 0.06, 2); // 总计