@extends('agency.layouts.app') @section('title', 'Ödemeler') @section('content') @php use App\Models\Payment\Payment; $dtColumns = [ ['key' => 'code', 'label' => 'Kayıt No', 'sortable' => true, 'sort' => 'code', 'width' => '96px'], ['key' => 'paid_at', 'label' => 'Tarih', 'sortable' => true, 'sort' => 'paid_at', 'width' => '116px'], ['key' => 'counterparty', 'label' => 'Taraf'], ['key' => 'method', 'label' => 'Yöntem', 'sortable' => true, 'sort' => 'method', 'width' => '150px'], ['key' => 'link', 'label' => 'İlişki', 'width' => '150px'], ['key' => 'description', 'label' => 'Açıklama', 'visible' => false], ['key' => 'amount', 'label' => 'Tutar', 'sortable' => true, 'sort' => 'amount', 'align' => 'end', 'width' => '150px'], ['key' => 'status', 'label' => 'Durum', 'sortable' => true, 'sort' => 'status', 'align' => 'center', 'width' => '110px'], ['key' => '_actions', 'label' => '', 'fixed' => true, 'align' => 'end', 'width' => '96px'], ]; $dtFilters = [ ['key' => 'direction', 'label' => 'Yön', 'value' => request('direction'), 'options' => Payment::DIRECTIONS], ['key' => 'status', 'label' => 'Durum', 'value' => request('status'), 'options' => Payment::STATUSES], ['key' => 'method', 'label' => 'Yöntem', 'value' => request('method'), 'options' => Payment::selectableMethods()], ['key' => 'category', 'label' => 'Sınıf', 'value' => request('category'), 'options' => Payment::CATEGORIES], ['key' => 'currency', 'label' => 'Para Birimi', 'value' => request('currency'), 'options' => $currencies->mapWithKeys(fn ($c) => [$c => $c])->all()], ['key' => 'date_from', 'label' => 'Başlangıç', 'type' => 'date', 'value' => request('date_from')], ['key' => 'date_to', 'label' => 'Bitiş', 'type' => 'date', 'value' => request('date_to')], ]; $dtStats = [ ['label' => 'Bu Ay Tahsilat', 'value' => number_format($stats['in_month'], 0, ',', '.') . '₺', 'icon' => 'fa-arrow-down-long', 'color' => '#059669'], ['label' => 'Bu Ay Ödeme', 'value' => number_format($stats['out_month'], 0, ',', '.') . '₺', 'icon' => 'fa-arrow-up-long', 'color' => '#e11d48'], ['label' => 'Bekleyen Hareket', 'value' => number_format($stats['pending'], 0, ',', '.') . '₺', 'icon' => 'fa-hourglass-half', 'color' => '#d97706'], ['label' => 'Tahsil Edilecek Bakiye', 'value' => number_format($stats['receivable'], 0, ',', '.') . '₺', 'icon' => 'fa-hand-holding-dollar', 'color' => '#4f46e5'], ]; @endphp
@if($stats['overdue_count'] > 0) {{ $stats['overdue_count'] }} planlanmış ödemenin tarihi geçti — listeyi görmek için tıklayın. @endif {{-- Tek giriş noktası: yön, formun üstündeki anahtarla seçilir --}} @forelse($payments as $p) {{ $p->code ?? $p->id }}
{{ $p->paid_at?->format('d.m.Y') }}
{{ $p->paid_at?->format('H:i') }}
{{ $p->counterparty_label }}
{{ $p->counterparty_type_label ?? 'Serbest' }} @if($p->category) · {{ $p->category_label }} @endif
{{ $p->method_label }} @if($p->provider)
{{ $p->provider }}
@endif @if($p->sale) @endif @if($p->invoice) @endif @if($p->sale && !$p->invoice && $p->direction === 'in') Faturasız @endif @if(!$p->sale && !$p->invoice)—@endif {{ $p->description ?: '—' }} {{ $p->direction === 'in' ? '+' : '−' }}{{ number_format((float) $p->amount, 2, ',', '.') }} {{ $p->currency }} @if((float) $p->fee_amount > 0)
komisyon {{ number_format((float) $p->fee_amount, 2, ',', '.') }}
@endif {{ $p->status_label }} @if($p->is_overdue)
vadesi geçti
@endif
@if($p->documents_count) {{ $p->documents_count }} @endif
@empty

Henüz ödeme kaydı yok

Sağ üstteki Yeni Ödeme ile ilk tahsilat veya gideri kaydedin.
@endforelse
@endsection