@php $candidate = trim((string) ($pdfFontFile ?? '')); $candidate = basename($candidate); $primaryPath = $candidate !== '' ? public_path('fonts/' . $candidate) : ''; $primaryExists = $primaryPath !== '' && is_file($primaryPath); $primaryUrl = $primaryExists ? asset('fonts/' . rawurlencode($candidate)) : ''; $notoCandidates = ['NotoSansSinhala.ttf', 'NotoSerifSinhala.ttf', 'Noto Sans Sinhala.ttf']; $notoUrl = ''; foreach ($notoCandidates as $f) { if (is_file(public_path('fonts/' . $f))) { $notoUrl = asset('fonts/' . rawurlencode($f)); break; } } @endphp @if($primaryUrl !== '') @endif @if($notoUrl !== '') @endif
@if(request()->query('autoprint') != '1')| Product | අයිතමය | Barcode | @if(($stockScope ?? 'current_stock') === 'purchased_from_supplier')Purchased Qty | Purchased Value | @elseBundle Qty | Current Qty | @endif
|---|---|---|---|---|---|---|
| {{ $r->product_name ?? '' }} | {{ $r->product_local_name ?? '' }} | {{ $r->product_barcode ?? '' }} | @if(($stockScope ?? 'current_stock') === 'purchased_from_supplier'){{ number_format((float)($r->purchased_qty ?? 0), 2) }} | {{ number_format((float)($r->purchased_value ?? 0), 2) }} | @else{{ $r->bundle_qty === null ? '-' : number_format((float)($r->bundle_qty ?? 0), 2) }} | {{ number_format((float)($r->current_qty ?? 0), 2) }} | @endif