@extends('layouts.app') @push('styles') @endpush @section('content')

إحصائيات الفاتورات

إجمالي الفاتورات
{{ $stats['total_invoices'] }}
الفاتورات الصادرة
{{ $stats['issued_invoices'] }}
الفاتورات المدفوعة
{{ $stats['paid_invoices'] }}
مدفوعة جزئياً
{{ $stats['partially_paid_invoices'] }}
الفاتورات الملغاة
{{ $stats['cancelled_invoices'] }}
نسبة الدفع
{{ $stats['total_amount'] > 0 ? round(($stats['paid_amount'] / $stats['total_amount']) * 100, 1) : 0 }}%

الإجمالي المالي

المبلغ الإجمالي: {{ number_format($stats['total_amount'], 2) }} ر.س
المبلغ المدفوع: {{ number_format($stats['paid_amount'], 2) }} ر.س
المبلغ المتبقي: {{ number_format($stats['remaining_amount'], 2) }} ر.س

الملخص

إجمالي الفاتورات: {{ $stats['total_invoices'] }}
فاتورة / يوم: {{ round($stats['total_invoices'] / max(1, now()->diffInDays($startDate)), 2)) }}
متوسط الفاتورة: {{ $stats['total_invoices'] > 0 ? number_format($stats['total_amount'] / $stats['total_invoices'], 2) : 0 }} ر.س
نسبة الدفع: {{ $stats['total_amount'] > 0 ? round(($stats['paid_amount'] / $stats['total_amount']) * 100, 2) : 0 }}%
← العودة إلى الفاتورات
@endsection