@extends('layouts.admin') @section('title', __('Dashboard')) @section('page_title', 'لوحة المحاسبة') @section('content')
لوحة الفواتير والتحصيل فاتورة جديدة تسجيل دفعة
@include('dashboard._kpi', ['label' => 'تحصيل اليوم', 'value' => number_format($kpis['collected_today'], 0), 'color' => 'success', 'icon' => 'cash', 'sub' => 'ج.م']) @include('dashboard._kpi', ['label' => 'تحصيل الشهر', 'value' => number_format($kpis['collected_month'], 0), 'color' => 'primary', 'icon' => 'wallet', 'sub' => 'ج.م']) @include('dashboard._kpi', ['label' => 'فواتير غير مدفوعة','value' => $kpis['unpaid_invoices'], 'color' => 'warning', 'icon' => 'receipt', 'sub' => 'فاتورة']) @include('dashboard._kpi', ['label' => 'متأخرات', 'value' => $kpis['overdue_count'], 'color' => 'danger', 'icon' => 'exclamation-triangle', 'sub' => 'فاتورة'])
@include('dashboard._kpi', ['label' => 'إجمالي المستحقات', 'value' => number_format($kpis['outstanding_total'], 0), 'color' => 'light text-dark', 'col' => 6, 'icon' => 'cash-stack', 'sub' => 'ج.م']) @include('dashboard._kpi', ['label' => 'إجمالي المتأخرات', 'value' => number_format($kpis['overdue_total'], 0), 'color' => 'danger', 'col' => 6, 'icon' => 'exclamation-circle', 'sub' => 'ج.م'])
المتحصلات - آخر 30 يوم
الذمم المتأخرة (Aging)
@foreach($buckets as $bucket => $total) @php $cls = match($bucket) { '0-30' => 'success', '31-60' => 'warning text-dark', '61-90' => 'danger', '90+' => 'dark', default => 'secondary' }; @endphp @endforeach
{{ $bucket }} يوم {{ number_format($total, 2) }}
أكبر 8 مدينين
@forelse($topDebtors as $c) @empty @endforelse
الكودالعميلالهاتفالرصيد
{{ $c->code }} {{ $c->name }} {{ $c->phone }} {{ number_format((float) $c->balance, 2) }}
لا يوجد مدينون
آخر المدفوعات
@forelse($recentPayments as $p) @empty @endforelse
التاريخالعميلالطريقةالمبلغ
{{ $p->payment_date?->format('d/m/Y') }} {{ $p->customer?->name }} {{ $p->method_label }} {{ number_format((float) $p->amount, 2) }}
لا توجد مدفوعات حديثة
@endsection @push('scripts') @endpush