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
->sum('total_amount'),
'payment_methods' => Payment::where('status', 'confirmed')
->whereBetween('created_at', [$from, $to])
->select('payment_method', DB::raw('SUM(amount) as total'), DB::raw('COUNT(*) as count'))
->groupBy('payment_method')
->select('method', DB::raw('SUM(amount) as total'), DB::raw('COUNT(*) as count'))
->groupBy('method')
->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