@php $candidate = trim((string) (($pdfFontFile ?? null) ?? ($appFontFile ?? ''))); $candidate = basename($candidate); $primaryPath = $candidate !== '' ? public_path('fonts/' . $candidate) : ''; $primaryPath = ($primaryPath !== '' && is_file($primaryPath)) ? $primaryPath : ''; // Always provide a Sinhala-capable fallback font. $notoCandidates = [ public_path('fonts/NotoSansSinhala.ttf'), public_path('fonts/NotoSerifSinhala.ttf'), public_path('fonts/Noto Sans Sinhala.ttf'), ]; $notoPath = ''; foreach ($notoCandidates as $p) { if (is_file($p)) { $notoPath = $p; break; } } $toFileUri = function (string $absPath): string { $p = str_replace('\\', '/', $absPath); // Encode spaces for CSS url() parsing / Dompdf $p = str_replace(' ', '%20', $p); return 'file:///' . $p; }; $primaryUri = $primaryPath !== '' ? $toFileUri($primaryPath) : ''; $notoUri = $notoPath !== '' ? $toFileUri($notoPath) : ''; @endphp

Supplier Stock Report

Supplier: {{ $supplier->supplier_name }}{{ !empty($supplier->supplier_company) && $supplier->supplier_company !== 'NULL' ? ' - ' . $supplier->supplier_company : '' }}
Generated: {{ $generatedAt ?? '' }}
Scope: {{ $scopeLabel ?? '' }}
@if(($stockScope ?? 'current_stock') === 'purchased_from_supplier') @else @endif @foreach($stockRows as $r) @if(($stockScope ?? 'current_stock') === 'purchased_from_supplier') @else @endif @endforeach
Product Local Name BarcodePurchased Qty Purchased ValueBundle Qty Current Qty
{{ $r->product_name ?? '' }} {{ $r->product_local_name ?? '' }} {{ $r->product_barcode ?? '' }}{{ number_format((float)($r->purchased_qty ?? 0), 2) }} {{ number_format((float)($r->purchased_value ?? 0), 2) }}{{ $r->bundle_qty === null ? '-' : number_format((float)($r->bundle_qty ?? 0), 2) }} {{ number_format((float)($r->current_qty ?? 0), 2) }}