@extends('layouts.app') @section('title', __('app.invoices')) @section('content') @php $isRtl = app()->getLocale() === 'ar'; $currency = \App\Models\Setting::currencyLabel(app()->getLocale()); @endphp
{{ $isRtl ? 'إدارة الفواتير والمستحقات' : 'Manage invoices and receivables' }}
{{ $isRtl ? 'إجمالي الفواتير' : 'Total' }}
{{ $isRtl ? 'مدفوعة' : 'Paid' }}
{{ $isRtl ? 'غير مدفوعة' : 'Unpaid' }}
{{ $isRtl ? 'متأخرة' : 'Overdue' }}
{{ $isRtl ? 'الإجمالي' : 'Amount' }}
{{ $currency }}
{{ $isRtl ? 'المحصل' : 'Collected' }}
{{ $currency }}
{{ $isRtl ? 'المستحق' : 'Due' }}
{{ $currency }}
| {{ $isRtl ? 'رقم الفاتورة' : 'Invoice #' }} | {{ $isRtl ? 'العميل' : 'Customer' }} | {{ $isRtl ? 'النوع' : 'Type' }} | {{ $isRtl ? 'التاريخ' : 'Date' }} | {{ $isRtl ? 'الإجمالي' : 'Total' }} | {{ $isRtl ? 'المدفوع' : 'Paid' }} | {{ $isRtl ? 'الحالة' : 'Status' }} | {{ $isRtl ? 'الإجراءات' : 'Actions' }} |
|---|---|---|---|---|---|---|---|
| {{ $invoice->invoice_number }} |
@if($invoice->member)
{{ mb_substr($invoice->member->first_name, 0, 1) }}
{{ $invoice->member->full_name }} {{ $invoice->member->phone }} {{ $invoice->customer_name }} @else {{ $isRtl ? 'عميل نقدي' : 'Walk-in' }} @endif |
@php $typeColors = [ 'sale' => 'bg-blue-100 text-blue-700', 'subscription' => 'bg-violet-100 text-violet-700', 'service' => 'bg-cyan-100 text-cyan-700', ]; $typeLabels = [ 'sale' => $isRtl ? 'مبيعات' : 'Sale', 'subscription' => $isRtl ? 'اشتراك' : 'Subscription', 'service' => $isRtl ? 'خدمة' : 'Service', ]; @endphp {{ $typeLabels[$invoice->type] ?? $invoice->type }} | {{ $invoice->invoice_date->format('Y/m/d') }} | {{ number_format($invoice->total) }} | {{ number_format($invoice->paid_amount) }} | @php $statusColors = [ 'paid' => 'bg-emerald-100 text-emerald-700', 'partial' => 'bg-amber-100 text-amber-700', 'unpaid' => 'bg-slate-100 text-slate-700', 'overdue' => 'bg-rose-100 text-rose-700', ]; $statusLabels = [ 'paid' => $isRtl ? 'مدفوعة' : 'Paid', 'partial' => $isRtl ? 'جزئي' : 'Partial', 'unpaid' => $isRtl ? 'غير مدفوعة' : 'Unpaid', 'overdue' => $isRtl ? 'متأخرة' : 'Overdue', ]; $status = $invoice->payment_status; if ($invoice->due_date && $invoice->due_date->isPast() && $invoice->remaining_amount > 0) { $status = 'overdue'; } @endphp {{ $statusLabels[$status] ?? $status }} | |
|
{{ $isRtl ? 'لا توجد فواتير' : 'No invoices found' }} |
|||||||