Commit 50381478 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix ReportService: payment_method → method (actual column name)

Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 977f178d
...@@ -25,8 +25,8 @@ public function financialSummary(string $from, string $to): array ...@@ -25,8 +25,8 @@ public function financialSummary(string $from, string $to): array
->sum('total_amount'), ->sum('total_amount'),
'payment_methods' => Payment::where('status', 'confirmed') 'payment_methods' => Payment::where('status', 'confirmed')
->whereBetween('created_at', [$from, $to]) ->whereBetween('created_at', [$from, $to])
->select('payment_method', DB::raw('SUM(amount) as total'), DB::raw('COUNT(*) as count')) ->select('method', DB::raw('SUM(amount) as total'), DB::raw('COUNT(*) as count'))
->groupBy('payment_method') ->groupBy('method')
->get()->toArray(), ->get()->toArray(),
]; ];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment