@php $companyName = \App\Models\Setting::get('general', 'company_name', config('pos.company.name', '')); $logoEnabled = \App\Models\Setting::get('receipt', 'show_logo', true); $nameEnabled = \App\Models\Setting::get('receipt', 'show_business_name', true); $contactsEnabled = \App\Models\Setting::get('receipt', 'show_business_contacts', true); $logoPath = \App\Models\Setting::get('general', 'logo_path', config('pos.company.logo_path')); $logoRelativePath = ltrim((string) $logoPath, '/'); foreach (['storage/app/public/', 'public/storage/', 'storage/'] as $prefix) { if (str_starts_with($logoRelativePath, $prefix)) { $logoRelativePath = substr($logoRelativePath, strlen($prefix)); break; } } $logoUrl = $logoRelativePath !== '' ? asset('storage/' . $logoRelativePath) : null; $showPhone = \App\Models\Setting::get('receipt', 'show_phone', true); $showAltPhone = \App\Models\Setting::get('receipt', 'show_alternative_phone', false); $showEmail = \App\Models\Setting::get('receipt', 'show_email', false); $showWebsite = \App\Models\Setting::get('receipt', 'show_website', false); $showPin = \App\Models\Setting::get('receipt', 'show_kra_pin', true); $showLandmark = \App\Models\Setting::get('receipt', 'show_landmark', true); $currency = \App\Models\Setting::get('general', 'currency_symbol', config('pos.company.currency_symbol', 'Ksh')); @endphp
@if($logoEnabled && $logoUrl)@endif @if($nameEnabled && $companyName)
{{ $companyName }}
@endif @if($contactsEnabled) @if(config('pos.company.address'))
{{ config('pos.company.address') }}
@endif @if($showLandmark && \App\Models\Setting::get('receipt','show_landmark',true) && \App\Models\Setting::get('receipt','landmark',''))
{{ \App\Models\Setting::get('receipt','landmark','') }}
@endif @if($showPhone && \App\Models\Setting::get('general','business_phone',config('pos.company.phone','')))
{{ \App\Models\Setting::get('general','business_phone',config('pos.company.phone','')) }}
@endif @if($showAltPhone && \App\Models\Setting::get('general','alternative_phone',''))
Alt: {{ \App\Models\Setting::get('general','alternative_phone','') }}
@endif @if($showEmail && \App\Models\Setting::get('general','business_email',''))
{{ \App\Models\Setting::get('general','business_email','') }}
@endif @if($showWebsite && \App\Models\Setting::get('general','business_website',''))
{{ \App\Models\Setting::get('general','business_website','') }}
@endif @if($showPin && \App\Models\Setting::get('general','company_pin',config('pos.company.kra_pin','')))
KRA PIN: {{ \App\Models\Setting::get('general','company_pin',config('pos.company.kra_pin','')) }}
@endif @endif

{{ $quotation->status === 'invoiced' ? 'COMMERCIAL INVOICE' : 'QUOTATION' }}

Reference: {{ $quotation->quotation_number }}
Date: {{ $quotation->created_at->format('d M Y') }}
Customer: {{ $quotation->customer_name }}
@if($quotation->customer_phone)Phone: {{ $quotation->customer_phone }}
@endif @if($quotation->customer_email)Email: {{ $quotation->customer_email }}
@endif @if($quotation->valid_until)Valid until: {{ $quotation->valid_until->format('d M Y') }}@endif

@foreach($quotation->items as $item)@endforeach
DescriptionQtyUnit priceTotal
{{ $item->product_name }}{{ $item->quantity }}{{ number_format($item->unit_price,2) }}{{ number_format($item->line_total,2) }}
Total: {{ $currency }} {{ number_format($quotation->subtotal,2) }}
@if($quotation->notes)

Terms / notes: {{ $quotation->notes }}

@endif @if($quotation->status==='invoiced')

Commercial invoice only — not a KRA eTIMS tax invoice.

@endif