@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 }}
الفرع: @if($selectedBranch) {{ $selectedBranch->branch_no }} - {{ $selectedBranch->name }} @else كل الفروع @endif من تاريخ: {{ $from ?: '-' }} إلى تاريخ: {{ $to ?: '-' }} بحث: {{ $q ?: '-' }}
ملخص المرتجعات حسب الفرع
@foreach($branchSummary as $s) @endforeach
رقم الفرع اسم الفرع عدد المرتجعات قبل الضريبة الضريبة شامل الضريبة
{{ $s->branch_no }} {{ $s->name }} {{ number_format((int)($s->returns_count ?? 0), 0) }} {{ number_format((float)($s->amount_before_tax ?? 0), 2) }} {{ number_format((float)($s->vat_amount ?? 0), 2) }} {{ number_format((float)($s->total_including_tax ?? 0), 2) }}
الإجمالي {{ number_format((int)($totals->returns_count ?? 0), 0) }} {{ number_format((float)($totals->amount_before_tax ?? 0), 2) }} {{ number_format((float)($totals->vat_amount ?? 0), 2) }} {{ number_format((float)($totals->total_including_tax ?? 0), 2) }}
تفاصيل مرتجعات المبيعات
@forelse($rows as $r) @empty @endforelse
ID رقم المرتجع تاريخ المرتجع الفاتورة الأصلية الفرع قبل الضريبة الضريبة شامل الضريبة الحالة
{{ $r->id }} {{ $r->return_no }} {{ \Carbon\Carbon::parse($r->return_date)->format('d-m-Y') }} {{ $r->original_document_no ?? '-' }} {{ $r->branch_no }} - {{ $r->branch_name ?? '' }} {{ number_format((float)($r->amount_before_tax ?? 0), 2) }} {{ number_format((float)($r->vat_amount ?? 0), 2) }} {{ number_format((float)($r->total_including_tax ?? 0), 2) }} @if(($r->status ?? '') === 'SALES_RETURN') مرتجع مبيعات @else {{ $r->status ?? '-' }} @endif
لا توجد مرتجعات مطابقة للفلتر الحالي.
Generated by {{ $companyName }} - {{ $printedAt }}