@php // إعدادات الشركة $company = null; try { $company = \Illuminate\Support\Facades\DB::table('company_settings')->where('id', 1)->first(); } catch (\Throwable $e) { $company = null; } $businessName = $company->business_name ?? 'اسم النشاط التجاري'; $logoUrl = (!empty($company->logo_path)) ? asset('storage/'.$company->logo_path) : null; // المستخدم (name) $printedBy = auth()->check() ? (auth()->user()->name ?? '-') : '-'; // dd/MM/yyyy HH:mm $printedAt = now()->format('d/m/Y H:i'); // الفرع حسب الفلتر $branchLabel = 'كل الفروع'; if ((int)($branchId ?? 0)) { $b = $branches->firstWhere('id', (int)$branchId); $branchLabel = $b ? ($b->branch_no.' - '.$b->name) : ('فرع #' . (int)$branchId); } @endphp
الرئيسية
@csrf
تقرير شامل تقرير المبيعات تقرير المشتريات تقرير المصروفات
{{ $businessName }}
تقرير المبيعات
الفترة: {{ $from }} → {{ $to }}
الفرع: {{ $branchLabel }}
@if(!empty($q))
بحث: {{ $q }}
@endif
طبع بواسطة: {{ $printedBy }}
تاريخ الطباعة: {{ $printedAt }}
عدد الفواتير
{{ (int)($totals->invoices_count ?? 0) }}
إجمالي المبيعات
{{ number_format((float)($totals->total ?? 0), 2) }}
@forelse($rows as $r) @empty @endforelse
التاريخ الفرع رقم الفاتورة الإجمالي طريقة الدفع الكاشير
{{ \Carbon\Carbon::parse($r->bill_date)->format('d/m/Y') }} {{ $r->branch_no }} - {{ $r->branch_name }} {{ $r->bill_no }} {{ number_format((float)$r->grand_total, 2) }} {{ $r->payment_mode ?? '' }} {{ $r->operator ?? '' }}
لا توجد بيانات