@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
تقرير الإقرار الضريبي VAT
تاريخ الطباعة: {{ $printedAt }}
الفرع: {{ $selectedBranch ? ($selectedBranch->branch_no . ' - ' . $selectedBranch->name) : 'كل الفروع' }} من تاريخ: {{ $from ?: '-' }} إلى تاريخ: {{ $to ?: '-' }} الحالة: {{ $vatStatus }}
صافي ضريبة المخرجات
{{ number_format((float)$netOutputVat, 2) }}
إجمالي ضريبة المدخلات
{{ number_format((float)$inputVat, 2) }}
{{ $vatStatus }}
{{ number_format((float)$vatDue, 2) }}
تفصيل الإقرار الضريبي
@foreach($rows as $r) @endforeach
البيان عدد المستندات قبل الضريبة قيمة الضريبة الإجمالي شامل الضريبة
{{ $r->label }} {{ $r->count === null ? '-' : number_format((int)$r->count) }} {{ $r->before_tax === null ? '-' : number_format((float)$r->before_tax, 2) }} {{ $r->vat_amount === null ? '-' : number_format((float)$r->vat_amount, 2) }} {{ $r->total_with_tax === null ? '-' : number_format((float)$r->total_with_tax, 2) }}
Generated by {{ $companyName }} - {{ $printedAt }}