@php // $preview = true renders the same template for an on-screen browser view // (logo by URL rather than base64, which dompdf needs inlined), keeping the // markup/CSS below the single source of truth for both outputs. $preview = $preview ?? false; // $invitation is set when the PDF accompanies one supplier's invitation, so // the document is addressed to them; null for the buyer's own file copy. $invitation = $invitation ?? null; $qty = fn ($value) => rtrim(rtrim(number_format((float) $value, 2), '0'), '.'); $logoData = null; if ($setting?->logo_path) { try { if ($preview) { $logoData = \Illuminate\Support\Facades\Storage::disk('public')->url($setting->logo_path); } else { $logoFull = \Illuminate\Support\Facades\Storage::disk('public')->path($setting->logo_path); if (is_file($logoFull)) { $logoData = 'data:' . (mime_content_type($logoFull) ?: 'image/png') . ';base64,' . base64_encode(file_get_contents($logoFull)); } } } catch (\Throwable $e) { $logoData = null; } } $companyName = $setting?->company_name ?: $rfq->team?->name; $supplier = $invitation?->supplier; @endphp {{ $rfq->rfq_number }}
{{ __('REQUEST FOR QUOTATION') }}
{{ $rfq->title ?: __('Invitation to quote') }}
@if ($logoData)
@endif
{{ $companyName }}
@if ($setting?->address)

{!! nl2br(e($setting->address)) !!}

@endif @if ($setting?->phone)

{{ __('Phone') }}: {{ $setting->phone }}

@endif @if ($setting?->email)

{{ __('Email') }}: {{ $setting->email }}

@endif @if ($setting?->tin_number)

{{ __('TIN') }}: {{ $setting->tin_number }}

@endif
{{ __('Invitation To') }} {{ __('Deliver To') }} {{ __('RFQ Number') }}
{{ $supplier?->name ?: __('Prospective supplier') }}
@if ($supplier?->contact_person)
{{ $supplier->contact_person }}
@endif @if ($supplier?->address)
{!! nl2br(e($supplier->address)) !!}
@endif @if ($supplier?->phone)
{{ __('Phone') }}: {{ $supplier->phone }}
@endif @if ($supplier?->email)
{{ __('Email') }}: {{ $supplier->email }}
@endif
{{ $companyName }}
@if ($rfq->delivery_address)
{!! nl2br(e($rfq->delivery_address)) !!}
@elseif ($setting?->address)
{!! nl2br(e($setting->address)) !!}
@endif @if ($setting?->phone)
{{ __('Phone') }}: {{ $setting->phone }}
@endif
{{ $rfq->rfq_number }}
{{ __('Quote this reference on your quotation and all related correspondence.') }}
{{ __('Issued') }} {{ __('Responses Close') }} {{ __('Goods Required By') }} {{ __('Quote In') }}
{{ optional($rfq->issue_date)->format('d M Y') ?: $rfq->created_at?->format('d M Y') }} {{ optional($rfq->response_deadline)->format('d M Y, H:i') ?: __('Open') }} {{ optional($rfq->required_by)->format('d M Y') ?: '—' }} {{ $rfq->currency_code }} {{ __('or your own currency') }}
@if ($rfq->scope)
{{ __('Scope of requirement') }}

{{ $rfq->scope }}

@endif @forelse ($rfq->lines as $i => $line) @empty @endforelse
# {{ __('Description') }} {{ __('Qty') }} {{ __('Unit') }} {{ __('Unit Price') }} {{ __('Total') }}
{{ $i + 1 }} {{ $line->description ?: '—' }} @if ($line->specification){{ $line->specification }}@endif {{ $qty($line->quantity) }} {{ $line->unit ?: '—' }}
{{ __('No items.') }}
{{ __('Conditions') }}
  • {{ __('Prices must be quoted per unit and state whether tax is included.') }}
  • {{ __('State your lead time, validity period and payment terms.') }}
  • {{ __('Where you cannot supply an item exactly as specified, offer your nearest equivalent and say so.') }}
  • {{ __('This request is not an order and places us under no obligation to purchase.') }}
  • {{ __('Late submissions may be excluded from the evaluation.') }}
@if ($rfq->terms)

{{ $rfq->terms }}

@endif @if ($rfq->payment_terms)

{{ __('Our payment terms') }}: {{ $rfq->payment_terms }}

@endif
{{ __('Supplier response') }}
{{ __('Company') }}
{{ __('Contact / phone') }}
{{ __('Currency') }}
{{ __('Total excl. tax') }}
{{ __('Tax') }}
{{ __('Total incl. tax') }}
{{ __('Lead time (days)') }}
{{ __('Quotation valid until') }}
{{ __('Payment terms') }}
{{ __('Issued by') }}@if ($rfq->creator) — {{ $rfq->creator->name }}@endif
{{ __('Supplier signature & date') }}