{{-- Organisation letterhead block: logo, name, tagline and contact lines. A table rather than flexbox because DomPDF does not lay out flex; the same markup prints from the browser. The logo is a data: URI for the same reason. @param \App\Models\System\Organization|null $org @param string $nameColor Colour of the organisation name (default green) --}} @php $nameColor = $nameColor ?? '#059669'; $orgLogo = $org instanceof \App\Models\System\Organization ? $org->logoDataUri() : null; $addressLine = collect([$org->address ?? null, $org->city ?? null, $org->po_box ?? null])->filter()->implode(', '); $contactLine = collect([$org->email ?? null, $org->contact ?? null, $org->contact_secondary ?? null])->filter()->implode(' · '); $registrationLine = collect([ ! empty($org->tax_identification_number) ? 'TIN: '.$org->tax_identification_number : null, ! empty($org->registration_number) ? 'Reg. No: '.$org->registration_number : null, ])->filter()->implode(' · '); @endphp
|
|
@endif
{{ $org->name ?? '' }}
@if(!empty($org->tagline))
{{ $org->tagline }}
@endif
@if(!empty($org->legal_name) && $org->legal_name !== $org->name)
{{ $org->legal_name }}
@endif
@if($addressLine !== '')
{{ $addressLine }}
@endif
@if($contactLine !== '')
{{ $contactLine }}
@endif
@if($registrationLine !== '')
{{ $registrationLine }}
@endif
|