@php use App\Helpers\Helper; $billFacilityName = $labBrandName ?? 'Veridian Micro Lab Pvt Ltd'; $billFacilityAddress = $branchAddress ?? config('diagnostic.letterhead.address') ?? ''; $billFacilityPhone = $branchPhone ?? config('diagnostic.brand.phone', ''); $billLogoUrl = $branchLogoUrl ?? Helper::publicAsset('assets/img/logo-white.png'); $billLineBadge = $lineCode ?? ($bill->transaction?->dcn ?: 'L1'); $patient = $bill->patient; $ageSex = $patientDemo['ageSex'] ?? '-'; $billDateTime = $bill->created_at ? $bill->created_at->format('d/m/Y, h:i A') : '-'; $billPatientDisplay = '-'; if ($patient) { $namePart = trim((string) ($patient->name ?? '')); $titlePart = $patient->honorificPrefix(); $billPatientDisplay = trim(($titlePart !== '' ? $titlePart . ' ' : '') . $namePart) ?: '-'; } $formatRs = function ($amount) { $amount = (float) $amount; $decimals = floor($amount) == $amount ? 0 : 2; return 'Rs.' . number_format($amount, $decimals); }; @endphp
{{ trim($addressLine) }}
@endif @endforeach @if (trim((string) $billFacilityAddress) === '')—
@endifPhone no.: {{ $billFacilityPhone }}
Bill / Reg. No. {{ $regNo }}
@if (filled($patient?->uhid))UHID: {{ $patient->uhid }}
@endif| S. NO. | INVESTIGATIONS | AMOUNT |
|---|---|---|
| {{ $index + 1 }}. | {{ $line['title'] }} | {{ $amountDisplay }} |
| 1. | — | {{ $formatRs((float) $bill->total_amount) }} |
| Total amount | {{ $formatRs((float) $billPrintTotal) }} |
| Amount paid | {{ $formatRs((float) $billPrintPaid) }} |
| Amount Paid (in words): {{ $amountInWords }} | |