@php $bankAccount = method_exists($company, 'defaultBankAccount') ? $company->defaultBankAccount() : null; $qrPath = $company->qr_code_path ? storage_path('app/public/' . $company->qr_code_path) : null; $hasQr = $qrPath && file_exists($qrPath); // Embed the image so Dompdf and the browser print window can always render it. $qrDataUri = null; if ($hasQr && is_readable($qrPath)) { $mimeType = mime_content_type($qrPath) ?: 'image/png'; $qrDataUri = 'data:' . $mimeType . ';base64,' . base64_encode(file_get_contents($qrPath)); } @endphp @if($qrDataUri || $bankAccount)
@if($qrDataUri)
Payment QR
Scan to pay
@endif @if($bankAccount)
Company's Bank Details
A/c Holder {{ $bankAccount->name ?? $company->name }}
Bank Name {{ $bankAccount->bank_name ?: '-' }}
A/c No. {{ $bankAccount->account_no ?: '-' }}
Branch & IFSC {{ trim(($bankAccount->branch ?: '') . ' ' . ($bankAccount->ifsc ?: '')) ?: '-' }}
@endif
@endif