@extends('layouts.app') @section('title', 'Odemelerim') @section('page-title', 'Odemelerim') @section('content') @if($paymentCount > 0) {{-- Summary Cards --}}
{{-- Total Paid --}}
Toplam Odenen

@money($totalPaid, $currency)

{{ $currency->code ?? 'TRY' }} cinsinden

{{-- Payment Count --}}
Odeme Sayisi

{{ $paymentCount }}

islem yapildi

{{-- Average --}}
Ortalama Odeme

@money($paymentCount > 0 ? $totalPaid / $paymentCount : 0, $currency)

odeme basina

@php $methodColors = [ 1 => ['bg' => 'bg-green-100', 'text' => 'text-green-700', 'icon' => 'bg-green-500'], 2 => ['bg' => 'bg-blue-100', 'text' => 'text-blue-700', 'icon' => 'bg-blue-500'], 3 => ['bg' => 'bg-purple-100', 'text' => 'text-purple-700', 'icon' => 'bg-purple-500'], 4 => ['bg' => 'bg-amber-100', 'text' => 'text-amber-700', 'icon' => 'bg-amber-500'], 5 => ['bg' => 'bg-orange-100', 'text' => 'text-orange-700', 'icon' => 'bg-orange-500'], 99 => ['bg' => 'bg-gray-100', 'text' => 'text-gray-600', 'icon' => 'bg-gray-400'], ]; @endphp {{-- Method Breakdown + Monthly --}}
{{-- Method Breakdown --}}

Odeme Yontemleri

@foreach($methodBreakdown as $method => $data) @php $mc = $methodColors[$method] ?? $methodColors[99]; @endphp
{{ $data['text'] }} ({{ $data['count'] }}x)
@money($data['total'], $currency)
@if($totalPaid > 0)
@endif
@endforeach
{{-- Monthly Summary --}}

Aylik Odeme Gecmisi

@if($monthlyData->count() > 0) @php $maxMonthly = $monthlyData->max('total') ?: 1; @endphp
@foreach($monthlyData as $month)
{{ $month['label'] }} {{ $month['count'] }} islem
@money($month['total'], $currency)
@endforeach
@else

Veri bulunamadi.

@endif
{{-- Payments Table --}}

Tum Odemeler

{{ $paymentCount }} kayit
@foreach($payments as $payment) @endforeach
Tarih Tutar Yontem Makbuz No Aciklama

{{ $payment->payment_date->format('d.m.Y') }}

{{ $payment->payment_date->translatedFormat('l') }}

@money($payment->payment_amount, $currency) @php $mc = $methodColors[$payment->payment_method] ?? $methodColors[99]; @endphp {{ $payment->payment_method_text }} @if($payment->receipt_number) {{ $payment->receipt_number }} @else - @endif @if($payment->notes) {{ Str::limit($payment->notes, 40) }} @else - @endif
{{-- Table Footer --}}
Toplam: @money($totalPaid, $currency)
@else

Henuz odeme kaydi bulunmuyor.

@endif @endsection