@php $printedAt = now()->format('d-m-Y H:i'); $companyName = config('app.name', 'Laundry Dashboard'); $logoSrc = null; try { $company = \Illuminate\Support\Facades\DB::table('company_settings')->first(); if ($company && !empty($company->business_name)) { $companyName = $company->business_name; } $logoPath = $company && !empty($company->logo_path) ? trim((string)$company->logo_path) : ''; $candidateFiles = []; if ($logoPath !== '') { $candidateFiles[] = storage_path('app/public/' . ltrim($logoPath, '/')); $candidateFiles[] = public_path('storage/' . ltrim($logoPath, '/')); $candidateFiles[] = public_path(ltrim($logoPath, '/')); } $candidateFiles[] = public_path('logo.png'); foreach ($candidateFiles as $file) { if ($file && file_exists($file) && is_file($file)) { $mime = function_exists('mime_content_type') ? mime_content_type($file) : 'image/png'; if (!$mime) $mime = 'image/png'; $logoSrc = 'data:' . $mime . ';base64,' . base64_encode(file_get_contents($file)); break; } } } catch (\Throwable $e) { $companyName = config('app.name', 'Laundry Dashboard'); $logoSrc = null; } @endphp
رجوع
{{ $companyName }}
نظام المشتريات والمدفوعات
@if($logoSrc) Logo @else
LOGO
@endif
تقرير مدفوعات الموردين
تاريخ الطباعة: {{ $printedAt }}
الفرع: {{ $selectedBranch ? ($selectedBranch->branch_no . ' - ' . $selectedBranch->name) : 'كل الفروع' }} المورد: {{ $selectedSupplier ? $selectedSupplier->name : 'كل الموردين' }} طريقة الدفع: {{ $method !== '' ? ($methodLabels[$method] ?? $method) : 'كل الطرق' }} الفترة: {{ \Carbon\Carbon::parse($from)->format('d-m-Y') }} → {{ \Carbon\Carbon::parse($to)->format('d-m-Y') }}
عدد السندات النشطة
{{ number_format((int)$totals->payments_count) }}
إجمالي المدفوع
{{ number_format((float)$totals->total_paid, 2) }}
طريقة الدفع
{{ $method !== '' ? ($methodLabels[$method] ?? $method) : 'كل الطرق' }}
الفترة
{{ \Carbon\Carbon::parse($from)->format('d-m-Y') }} → {{ \Carbon\Carbon::parse($to)->format('d-m-Y') }}
@forelse($byMethod as $r) @empty @endforelse
طريقة الدفععدد السنداتالإجمالي
{{ $r->method_label }} {{ number_format((int)$r->count) }} {{ number_format((float)$r->total_amount, 2) }}
لا توجد بيانات
الإجمالي{{ number_format((int)$totals->payments_count) }}{{ number_format((float)$totals->total_paid, 2) }}
@forelse($rows as $r) @php $methodLabel = $methodLabels[$r->payment_method] ?? $r->payment_method; @endphp @empty @endforelse
رقم التاريخ الفرع المورد الطريقة المرجع المبلغ
{{ $r->voucher_no_branch }} {{ \Carbon\Carbon::parse($r->payment_date)->format('d-m-Y') }} {{ $r->branch_no }} - {{ $r->branch_name }} {{ $r->supplier_name }} {{ $methodLabel }} {{ $r->reference_no ?: '-' }} {{ number_format((float)$r->amount, 2) }}
لا توجد سندات دفع نشطة
الإجمالي {{ number_format((float)$totals->total_paid, 2) }}